From: Alan Cox Date: Sat, 29 Sep 2018 22:06:18 +0000 (+0100) Subject: z280rc: update to match kernel core changes X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=199113c4a37a69414a015d14840f193cbd7f9726;p=FUZIX.git z280rc: update to match kernel core changes --- diff --git a/Kernel/platform-z280rc/Makefile b/Kernel/platform-z280rc/Makefile index fc6123cd..fdafb17a 100644 --- a/Kernel/platform-z280rc/Makefile +++ b/Kernel/platform-z280rc/Makefile @@ -52,4 +52,11 @@ $(DAOBJS): %.rel: ../dev/%.s clean: rm -f $(OBJS) $(JUNK) core *~ -image: +image: boot + +boot: boot.s + sdasz80 -o boot.s + sdldz80 -i boot.rel + makebin -s 65535 boot.ihx boot.tmp + # Skip to F000, copy the rest + dd if=boot.tmp of=boot.raw bs=512 skip=126 count=4 diff --git a/Kernel/platform-z280rc/config.h b/Kernel/platform-z280rc/config.h index b9e20ad4..19d43f24 100644 --- a/Kernel/platform-z280rc/config.h +++ b/Kernel/platform-z280rc/config.h @@ -120,3 +120,5 @@ extern unsigned int swap_dev; /* This can optionally be set to force a default baud rate, eg if the system console should match a firmware set rate */ #define TTY_INIT_BAUD B38400 /* To match ROMWBW */ + +#define platform_copyright() diff --git a/Kernel/platform-z280rc/devtty.c b/Kernel/platform-z280rc/devtty.c index e9295b16..baa3088d 100644 --- a/Kernel/platform-z280rc/devtty.c +++ b/Kernel/platform-z280rc/devtty.c @@ -124,7 +124,7 @@ static uint16_t clocks[] = { * That needs tidying up in many platforms and we also need a proper way * to say 'this port is fixed config' before making it so. */ -void tty_setup(uint8_t minor) +void tty_setup(uint8_t minor, uint8_t flags) { used(minor); } diff --git a/Kernel/platform-z280rc/z280rc.s b/Kernel/platform-z280rc/z280rc.s index 877467ed..52ba7296 100644 --- a/Kernel/platform-z280rc/z280rc.s +++ b/Kernel/platform-z280rc/z280rc.s @@ -12,14 +12,18 @@ .globl interrupt_handler .globl _program_vectors .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 map_for_swap .globl platform_interrupt_all .globl _kernel_flag + .globl _int_disabled ; exported debugging tools .globl _platform_monitor @@ -201,6 +205,8 @@ mapsave: .db 0 ; Saved copy of the previous map (see map_save) _kernel_flag: .db 1 ; We start in kernel mode +_int_disabled: + .db 1 ; With interrupts off ; ; This is invoked with a NULL argument at boot to set the kernel ; vectors and then elsewhere in the kernel when the kernel knows @@ -239,6 +245,7 @@ _program_vectors: ; running ; map_kernel: +map_kernel_di: push af xor a call map_process_a ; do all the logic in one place with @@ -247,6 +254,7 @@ map_kernel: ; map_process is called with HL either NULL or pointing to the ; page mapping. Unlike the other calls it's allowed to trash AF map_process: +map_process_di: ld a, h or l jr z, map_kernel @@ -298,6 +306,7 @@ map_process_a: ; used by bankfork ; the bank value from u_page. ; map_process_always: +map_process_always_di: push af push hl ld hl, #U_DATA__U_PAGE @@ -310,9 +319,12 @@ map_process_always: ; Save the existing mapping. The place you save it to needs to ; be in common memory as you have no idea what bank is live ; -map_save: push af +map_save_kernel: + push af ld a, (mapreg) ld (mapsave), a + xor a + call map_process_a ; kernel is map 0 pop af ret ;