From 4e7905a0214a3dafe7b1b07b9225c5fc871ecede Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 29 Sep 2018 16:25:17 +0100 Subject: [PATCH] nascom: update to match core changes --- Kernel/platform-nascom/Makefile | 4 +--- Kernel/platform-nascom/config.h | 3 +++ Kernel/platform-nascom/devnascom.c | 2 +- Kernel/platform-nascom/nascom-pagemode.s | 14 ++++++++++++-- Kernel/platform-nascom/nascom.s | 10 +++++++--- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Kernel/platform-nascom/Makefile b/Kernel/platform-nascom/Makefile index e292a329..2d5e4260 100644 --- a/Kernel/platform-nascom/Makefile +++ b/Kernel/platform-nascom/Makefile @@ -18,8 +18,6 @@ OBJS = $(COBJS) $(AOBJS) $(DISCARD_COBJS) $(DOBJS) $(DISCARD_DOBJS) CROSS_CCOPTS += -I../dev/ -JUNK = $(CSRCS:.c=.lst) $(CSRCS:.c=.asm) $(CSRCS:.c=.sym) $(ASRCS:.s=.lst) $(ASRCS:.s=.sym) $(CSRCS:.c=.rst) $(ASRCS:.s=.rst) - all: $(OBJS) $(COBJS): %.rel: %.c @@ -38,7 +36,7 @@ $(DISCARD_COBJS): %.rel: %.c $(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEGDISC) -c $< clean: - rm -f $(OBJS) $(JUNK) core *~ *.asm *.rst *.lst *.sym + rm -f $(OBJS) core *~ *.asm *.rst *.lst *.sym image: sdasz80 -o nasboot.s diff --git a/Kernel/platform-nascom/config.h b/Kernel/platform-nascom/config.h index 454adc76..54016c44 100644 --- a/Kernel/platform-nascom/config.h +++ b/Kernel/platform-nascom/config.h @@ -64,6 +64,9 @@ #define SWAPDEV (swap_dev) /* Device for swapping (dynamic). */ #define NBUFS 10 /* Number of block buffers - keep in sync with asm! */ #define NMOUNTS 4 /* Number of mounts at a time */ + +/* Do I/O direct to user space */ +#define CONFIG_LARGE_IO_DIRECT /* Reclaim the discard space for buffers */ #define CONFIG_DYNAMIC_BUFPOOL diff --git a/Kernel/platform-nascom/devnascom.c b/Kernel/platform-nascom/devnascom.c index f94bb26d..567b2413 100644 --- a/Kernel/platform-nascom/devnascom.c +++ b/Kernel/platform-nascom/devnascom.c @@ -58,7 +58,7 @@ void tty_poll(void) } } -void tty_setup(uint8_t minor) +void tty_setup(uint8_t minor, uint8_t flags) { /* The console is a crt/keyboard, the 6402 is set by jumpers */ } diff --git a/Kernel/platform-nascom/nascom-pagemode.s b/Kernel/platform-nascom/nascom-pagemode.s index a18dffac..e2349ab0 100644 --- a/Kernel/platform-nascom/nascom-pagemode.s +++ b/Kernel/platform-nascom/nascom-pagemode.s @@ -7,10 +7,13 @@ ; exported symbols .globl init_hardware .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 ; imported symbols @@ -119,6 +122,7 @@ pagesave: .db 0x11 ; saved copy ; of unbanked memory. ; map_kernel: +map_kernel_di: push af ld a,#0x11 ld (pagereg),a @@ -131,6 +135,7 @@ map_kernel: ; selects how the upper bank decodes ; map_process: +map_process_di: ld a, h or l jr z, map_kernel @@ -141,6 +146,7 @@ map_process_a: ; used by bankfork ret map_process_always: +map_process_always_di: push af push hl ld hl, #U_DATA__U_PAGE @@ -151,9 +157,13 @@ map_process_always: pop af ret -map_save: push af +map_save_kernel: + push af ld a,(pagereg) ld (pagesave), a + ld a,#0x11 + ld (pagereg),a + out (0xFF), a pop af ret diff --git a/Kernel/platform-nascom/nascom.s b/Kernel/platform-nascom/nascom.s index 1bd30d74..61d61f17 100644 --- a/Kernel/platform-nascom/nascom.s +++ b/Kernel/platform-nascom/nascom.s @@ -11,6 +11,7 @@ .globl _program_vectors .globl platform_interrupt_all .globl _nmikey + .globl _int_disabled ; exported debugging tools .globl _platform_monitor @@ -29,7 +30,7 @@ .globl map_process .globl map_process_a .globl map_process_always - .globl map_save + .globl map_save_kernel .globl map_restore .globl s__COMMONMEM @@ -54,8 +55,11 @@ platform_interrupt_all: _platform_monitor: _platform_reboot: - di - jr _platform_reboot + di + jr _platform_reboot + +_int_disabled: + .db 1 ; ----------------------------------------------------------------------------- ; KERNEL MEMORY BANK (below 0xE800, only accessible when the kernel is mapped) -- 2.34.1