From: Alan Cox Date: Sat, 6 Oct 2018 21:15:27 +0000 (+0100) Subject: kernel: add other needed map_buffers instances X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d63e9f167a0406f5800035196f453531a54b57fb;p=FUZIX.git kernel: add other needed map_buffers instances As we add it to more stuff it may be more generally needed. For the moment get the cases that matter --- diff --git a/Kernel/cpu-z180/z180.s b/Kernel/cpu-z180/z180.s index 52ad7720..790bb657 100644 --- a/Kernel/cpu-z180/z180.s +++ b/Kernel/cpu-z180/z180.s @@ -28,6 +28,7 @@ .globl _switchin .globl _platform_switchout .globl _dofork + .globl map_buffers .globl map_kernel .globl map_process_always .globl map_kernel_di @@ -773,6 +774,7 @@ switchinfail: call outstring jp _platform_monitor +map_buffers: map_kernel_di: map_kernel: ; map the kernel into the low 60K, leaves common memory unchanged push af diff --git a/Kernel/platform-genie-eg64/trs80-bank.s b/Kernel/platform-genie-eg64/trs80-bank.s index a788d93f..4edbf40e 100644 --- a/Kernel/platform-genie-eg64/trs80-bank.s +++ b/Kernel/platform-genie-eg64/trs80-bank.s @@ -9,6 +9,7 @@ .globl map_kernel .globl map_kernel_di .globl map_kernel_restore + .globl map_buffers .globl map_process .globl map_process_di .globl map_process_always @@ -76,6 +77,7 @@ init_hardware: ; mark the low 16K R/O to protect it from user but then need to ; flip r/w on syscall and irq entry/exit.. FIXME. ; +map_buffers: map_kernel: map_kernel_di: map_kernel_restore: diff --git a/Kernel/platform-pcw8256/pcw8256.s b/Kernel/platform-pcw8256/pcw8256.s index 16cd75a6..f13418f8 100644 --- a/Kernel/platform-pcw8256/pcw8256.s +++ b/Kernel/platform-pcw8256/pcw8256.s @@ -8,6 +8,7 @@ .globl init_early .globl init_hardware .globl _program_vectors + .globl map_buffers .globl map_kernel .globl map_process .globl map_process_always @@ -171,11 +172,13 @@ _program_vectors: ; ; map_kernel - map in the kernel, trashes nothing ; map_process_always - map in the current process, ditto +; map_buffers - map in the kernel + buffers, ditto ; map_process - map the pages pointed to by hl, eats ; a, hl ; kmap: .db 0x80, 0x81, 0x82, 0x83 +map_buffers: map_kernel: map_kernel_di: push af diff --git a/Kernel/platform-rc2014-tiny/rc2014.s b/Kernel/platform-rc2014-tiny/rc2014.s index 75063b07..6e327c9d 100644 --- a/Kernel/platform-rc2014-tiny/rc2014.s +++ b/Kernel/platform-rc2014-tiny/rc2014.s @@ -326,9 +326,11 @@ map_process_always_di: ;========================================================================= ; map_kernel - map kernel pages +; map_buffers - map kernel and buffers (no difference for us) ; Inputs: none ; Outputs: none; all registers preserved ;========================================================================= +map_buffers: map_kernel: map_kernel_di: push af diff --git a/Kernel/platform-sbcv2/sbcv2.s b/Kernel/platform-sbcv2/sbcv2.s index b92cd948..2b9b4da4 100644 --- a/Kernel/platform-sbcv2/sbcv2.s +++ b/Kernel/platform-sbcv2/sbcv2.s @@ -12,6 +12,7 @@ .globl init_hardware .globl interrupt_handler .globl _program_vectors + .globl map_buffers .globl map_kernel .globl map_kernel_di .globl map_process @@ -208,6 +209,9 @@ _program_vectors: ; are definitely off. In our case it's not useful information so both ; symbols end up at the same code. ; +map_buffers: + ; for us no difference. We could potentially use a low 32K bank + ; for buffers but it's not clear it would gain us much value map_kernel_di: map_kernel: push af diff --git a/Kernel/platform-ubee/ubee.s b/Kernel/platform-ubee/ubee.s index 8fb0bab9..e19541d4 100644 --- a/Kernel/platform-ubee/ubee.s +++ b/Kernel/platform-ubee/ubee.s @@ -9,6 +9,7 @@ .globl init_hardware .globl interrupt_handler .globl _program_vectors + .globl map_buffers .globl map_kernel .globl map_kernel_di .globl map_process @@ -364,7 +365,10 @@ _program_vectors: ; ; The top 32K bank holds kernel code and pieces of common memory ; The lower 32K is switched between the various user banks. +; We don't have a separate 32K for buffers as memory is too precious +; on must Microbees ; +map_buffers: map_kernel: map_kernel_di: push af diff --git a/Kernel/platform-z280rc/z280rc.s b/Kernel/platform-z280rc/z280rc.s index 52ba7296..d483aefa 100644 --- a/Kernel/platform-z280rc/z280rc.s +++ b/Kernel/platform-z280rc/z280rc.s @@ -11,6 +11,7 @@ .globl init_hardware .globl interrupt_handler .globl _program_vectors + .globl map_buffers .globl map_kernel .globl map_kernel_di .globl map_process @@ -242,8 +243,12 @@ _program_vectors: ; We map the low 64K 1:1 in kernel mode, keep the top 8K fixed and ; map the others by 'bank' for user mode. We don't actually use the ; hardware user mode yet. It's all just a bodge to get us up and -; running +; running. ; +; Some day we probably want the buffers outside of the main map, at +; least until we do split I/D somehow. +; +map_buffers: map_kernel: map_kernel_di: push af