From 321b767eb9ec08e8a3d15b8ceca9cd09a9aaa949 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 28 Sep 2018 23:36:54 +0100 Subject: [PATCH] nc100: update to the new behaviours --- Kernel/platform-amstradnc/config.h | 1 + Kernel/platform-amstradnc/devtty.c | 2 +- Kernel/platform-amstradnc/nc100.s | 23 ++++++++++++++++++++--- Kernel/platform-amstradnc/tricks.s | 2 ++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Kernel/platform-amstradnc/config.h b/Kernel/platform-amstradnc/config.h index 0da8f5e9..9a2284d9 100644 --- a/Kernel/platform-amstradnc/config.h +++ b/Kernel/platform-amstradnc/config.h @@ -68,3 +68,4 @@ #define CONFIG_LARGE_IO_DIRECT /* Definite win as our I/O is as fast as a memcpy! */ #define platform_discard() +#define platform_copyright() diff --git a/Kernel/platform-amstradnc/devtty.c b/Kernel/platform-amstradnc/devtty.c index beb90732..5f31d3dc 100644 --- a/Kernel/platform-amstradnc/devtty.c +++ b/Kernel/platform-amstradnc/devtty.c @@ -122,7 +122,7 @@ void tty_data_consumed(uint8_t minor) } /* Called to set baud rate etc */ -void tty_setup(uint8_t minor) +void tty_setup(uint8_t minor, uint8_t flags) { uint16_t b; if (minor == 1) diff --git a/Kernel/platform-amstradnc/nc100.s b/Kernel/platform-amstradnc/nc100.s index ca5a2c04..7ecb3829 100644 --- a/Kernel/platform-amstradnc/nc100.s +++ b/Kernel/platform-amstradnc/nc100.s @@ -12,8 +12,12 @@ .globl map_kernel .globl map_process .globl map_process_always - .globl map_save + .globl map_kernel_di + .globl map_process_di + .globl map_process_always_di + .globl map_save_kernel .globl map_restore + .globl _int_disabled ; for the PCMCIA disc driver .globl _rd_memcpy @@ -65,6 +69,9 @@ ; ----------------------------------------------------------------------------- .area _COMMONMEM +_int_disabled: + .db 1 + _platform_monitor: di halt @@ -274,6 +281,7 @@ no_irq_on: pop af ; All registers preserved ; map_process_always: +map_process_always_di: push hl push af ld hl, #U_DATA__U_PAGE @@ -285,6 +293,7 @@ map_process_always: ; HL is the page table to use, A is eaten, HL is eaten ; map_process: +map_process_di: ld a, h or l jr nz, map_process_2 @@ -292,6 +301,7 @@ map_process: ; Map in the kernel below the current common, all registers preserved ; map_kernel: +map_kernel_di: push af ; kernel is in banks 3/4/5, common starts at 6 but then gets ; copied into each task @@ -328,11 +338,19 @@ map_restore: ; ; Save the current mapping. ; -map_save: +map_save_kernel: push hl push af ld hl, #map_savearea call save_maps + ; kernel is in banks 3/4/5, common starts at 6 but then gets + ; copied into each task + ld a, #0x83 + out (0x10), a + inc a + out (0x11), a + inc a + out (0x12), a pop af pop hl ret @@ -765,4 +783,3 @@ endline: pop de pop af out (0x11), a ret - diff --git a/Kernel/platform-amstradnc/tricks.s b/Kernel/platform-amstradnc/tricks.s index cd119bd4..a165b031 100644 --- a/Kernel/platform-amstradnc/tricks.s +++ b/Kernel/platform-amstradnc/tricks.s @@ -17,6 +17,7 @@ .globl map_kernel .globl _ramtop .globl _need_resched + .globl _int_disabled ; imported debug symbols .globl outstring, outde, outhl, outbc, outnewline, outchar, outcharhex @@ -106,6 +107,7 @@ _switchin: ; enable interrupts, if the ISR isn't already running ld a, (U_DATA__U_ININTERRUPT) + ld (_int_disabled),a or a ret nz ; in ISR, leave interrupts off ei -- 2.34.1