From: Alan Cox Date: Fri, 28 Sep 2018 22:37:07 +0000 (+0100) Subject: rc2014: update to the new behaviour (and update README) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9470dca20d506ea0c891e958fd3dd6a3cc403efa;p=FUZIX.git rc2014: update to the new behaviour (and update README) --- diff --git a/Kernel/platform-rc2014/README b/Kernel/platform-rc2014/README index e7d86361..2cfdf74e 100644 --- a/Kernel/platform-rc2014/README +++ b/Kernel/platform-rc2014/README @@ -83,3 +83,7 @@ Stuff To Do * TMS9918A support once there is a suitable card * Sound support once we have the core sound layer + + * tty_setup + + * Clean up the SIO init mess to just use otir properly \ No newline at end of file diff --git a/Kernel/platform-rc2014/config.h b/Kernel/platform-rc2014/config.h index 1823eef3..19bad411 100644 --- a/Kernel/platform-rc2014/config.h +++ b/Kernel/platform-rc2014/config.h @@ -86,3 +86,5 @@ extern unsigned int swap_dev; /* You'll need to define this if you have a Scott Baker SIO2 card, or submit a fancier autodetect! Also you'll need to change rc2014.s */ #undef CONFIG_SIO_BAKER + +#define platform_copyright() // for now \ No newline at end of file diff --git a/Kernel/platform-rc2014/devtty.c b/Kernel/platform-rc2014/devtty.c index 4cd196be..203fa144 100644 --- a/Kernel/platform-rc2014/devtty.c +++ b/Kernel/platform-rc2014/devtty.c @@ -19,7 +19,7 @@ struct s_queue ttyinq[NUM_DEV_TTY + 1] = { /* ttyinq[0] is never used */ {tbuf2, tbuf2, tbuf2, TTYSIZ, 0, TTYSIZ / 2}, }; -void tty_setup(uint8_t minor) +void tty_setup(uint8_t minor, uint8_t flag) { if (minor == 1) { } diff --git a/Kernel/platform-rc2014/rc2014.s b/Kernel/platform-rc2014/rc2014.s index 29178ff6..3c9f478c 100644 --- a/Kernel/platform-rc2014/rc2014.s +++ b/Kernel/platform-rc2014/rc2014.s @@ -8,8 +8,11 @@ .globl _program_vectors .globl map_kernel .globl map_process + .globl map_kernel_di + .globl map_process_di .globl map_process_always - .globl map_save + .globl map_process_always_di + .globl map_save_kernel .globl map_restore .globl map_for_swap .globl platform_interrupt_all @@ -18,6 +21,7 @@ .globl _kernel_pages .globl _platform_reboot .globl _bufpool + .globl _int_disabled ; imported symbols .globl _ramsize @@ -237,6 +241,9 @@ _platform_reboot: ;========================================================================= +_int_disabled: + .db 1 + platform_interrupt_all: ret @@ -292,6 +299,7 @@ _program_vectors: ; Outputs: none; all registers preserved ;========================================================================= map_process_always: +map_process_always_di: push hl ld hl,#U_DATA__U_PAGE jr map_process_2_pophl_ret @@ -302,6 +310,7 @@ map_process_always: ; Outputs: none; A and HL destroyed ;========================================================================= map_process: +map_process_di: ld a,h or l ; HL == 0? jr nz,map_process_2 ; HL == 0 - map the kernel @@ -312,6 +321,7 @@ map_process: ; Outputs: none; all registers preserved ;========================================================================= map_kernel: +map_kernel_di: push hl ld hl,#_kernel_pages jr map_process_2_pophl_ret @@ -357,18 +367,19 @@ map_process_2_pophl_ret: ret ;========================================================================= -; map_save - save the current page mapping to map_savearea +; map_save_kernel - save the current page mapping to map_savearea and +; switch to kernel maps ; Inputs: none ; Outputs: none ;========================================================================= -map_save: +map_save_kernel: push hl ld hl,(mpgsel_cache) ld (map_savearea),hl ld hl,(mpgsel_cache+2) ld (map_savearea+2),hl - pop hl - ret + ld hl,#_kernel_pages + jr map_process_2_pophl_ret ;========================================================================= ; map_for_swap - map a page into a bank for swap I/O diff --git a/Kernel/platform-rc2014/tricks.s b/Kernel/platform-rc2014/tricks.s index 6e8917f9..1b4a4564 100644 --- a/Kernel/platform-rc2014/tricks.s +++ b/Kernel/platform-rc2014/tricks.s @@ -108,6 +108,7 @@ _switchin: ; enable interrupts, if the ISR isn't already running ld a, (U_DATA__U_ININTERRUPT) + ld (_int_disable),a or a ret nz ; in ISR, leave interrupts off ei