From dc98351df59de4693796e656a77d3059203ec86f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 28 Sep 2018 23:36:38 +0100 Subject: [PATCH] mtx: update to the new behaviours --- Kernel/platform-mtx/devtty.c | 4 ++-- Kernel/platform-mtx/mtx.s | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Kernel/platform-mtx/devtty.c b/Kernel/platform-mtx/devtty.c index 0edf18ba..6029f952 100644 --- a/Kernel/platform-mtx/devtty.c +++ b/Kernel/platform-mtx/devtty.c @@ -123,13 +123,13 @@ static uint8_t dartbits[] = { 0x00, 0x40, 0x80, 0xC0 }; -void tty_setup(uint8_t minor) +void tty_setup(uint8_t minor, uint8_t flagbits) { irqflags_t flags; int i; char *p = dart_setup; struct tty *t = &ttydata[minor]; - uint8_t cf = t->termios.c_cflag; + uint16_t cf = t->termios.c_cflag; uint8_t r; /* Console */ diff --git a/Kernel/platform-mtx/mtx.s b/Kernel/platform-mtx/mtx.s index 0df83bca..4a4194bc 100644 --- a/Kernel/platform-mtx/mtx.s +++ b/Kernel/platform-mtx/mtx.s @@ -12,12 +12,17 @@ .globl platform_interrupt_all .globl map_kernel + .globl map_kernel_di .globl map_process + .globl map_process_di .globl map_process_a .globl map_process_always - .globl map_save + .globl map_process_always_di + .globl map_save_kernel .globl map_restore + .globl _int_disabled + .globl _sil_memcpy .globl _irqvector @@ -67,6 +72,9 @@ intvectors: .dw trace_int ; can be used for CPU tracing etc .dw serial_int ; we don't use the vector mod functions +_int_disabled: + .db 1 + _platform_monitor: di halt @@ -274,6 +282,7 @@ _program_vectors: ; put the paging back as it was -- we're in kernel mode so this is predictable map_kernel: +map_kernel_di: push af ld a, #0x80 ; ROM off bank 0 ; the map port is write only, so keep a local stash @@ -282,6 +291,7 @@ map_kernel: pop af ret map_process: +map_process_di: ld a, h or l jr z, map_kernel @@ -291,6 +301,7 @@ map_process_a: out (0), a ret map_process_always: +map_process_always_di: push af ld a, (U_DATA__U_PAGE) map_set_a: @@ -298,12 +309,16 @@ map_set_a: out (0), a pop af ret -map_save: +map_save_kernel: push af ld a, (map_copy) ld (map_store), a + ld a, #0x80 ; ROM off bank 0 + ; the map port is write only, so keep a local stash + ld (map_copy), a + out (0), a pop af - ret + ret map_restore: push af ld a, (map_store) -- 2.34.1