From: Alan Cox Date: Sat, 29 Sep 2018 15:25:41 +0000 (+0100) Subject: pcw8256: update to match core changes X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=dce4564e338cd2d20b9a12a8267ef7aead9c4965;p=FUZIX.git pcw8256: update to match core changes --- diff --git a/Kernel/platform-pcw8256/Makefile b/Kernel/platform-pcw8256/Makefile index f7af3232..512b4deb 100644 --- a/Kernel/platform-pcw8256/Makefile +++ b/Kernel/platform-pcw8256/Makefile @@ -20,8 +20,6 @@ NOBJS = $(patsubst ../dev/net/%.c,%.rel, $(NSRCS)) OBJS = $(COBJS) $(AOBJS) $(DOBJS) $(DISCARD_DOBJS) $(NOBJS) -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 @@ -40,6 +38,6 @@ $(NOBJS): %.rel: ../dev/net/%.c $(CROSS_CC) $(CROSS_CCOPTS) -c $< clean: - rm -f $(OBJS) $(JUNK) core *~ + rm -f $(OBJS) *.lst *.asm *.sym *.rst *.lk core *~ image: diff --git a/Kernel/platform-pcw8256/config.h b/Kernel/platform-pcw8256/config.h index 3d1a6d94..7f2c507c 100644 --- a/Kernel/platform-pcw8256/config.h +++ b/Kernel/platform-pcw8256/config.h @@ -59,6 +59,7 @@ #define NBUFS 6 /* Number of block buffers */ #define NMOUNTS 2 /* Number of mounts at a time */ +#define CONFIG_LARGE_IO_DIRECT #define swap_map(x) (uint8_t *)(0x4000 + ((x) & 0x3FFF)) /* For now */ diff --git a/Kernel/platform-pcw8256/devtty.c b/Kernel/platform-pcw8256/devtty.c index 116c6957..f7dca186 100644 --- a/Kernel/platform-pcw8256/devtty.c +++ b/Kernel/platform-pcw8256/devtty.c @@ -114,7 +114,7 @@ void tty_irq(void) } /* Called to set baud rate etc */ -void tty_setup(uint8_t minor) +void tty_setup(uint8_t minor, uint8_t flags) { minor; } diff --git a/Kernel/platform-pcw8256/devtty.h b/Kernel/platform-pcw8256/devtty.h index 35d6d3e5..635ac5bf 100644 --- a/Kernel/platform-pcw8256/devtty.h +++ b/Kernel/platform-pcw8256/devtty.h @@ -1,7 +1,6 @@ #ifndef __DEVTTY_DOT_H__ #define __DEVTTY_DOT_H__ -void tty_putc(uint8_t minor, char c); void tty_init_port(void); void tty_irq(void); diff --git a/Kernel/platform-pcw8256/pcw8256.s b/Kernel/platform-pcw8256/pcw8256.s index 1742cf72..42a0e04b 100644 --- a/Kernel/platform-pcw8256/pcw8256.s +++ b/Kernel/platform-pcw8256/pcw8256.s @@ -11,8 +11,12 @@ .globl map_kernel .globl map_process .globl map_process_always + .globl map_kernel_di + .globl map_process_di + .globl map_process_always_di .globl _need_resched - .globl map_save + .globl _int_disabled + .globl map_save_kernel .globl map_restore .globl map_for_swap .globl platform_interrupt_all @@ -173,6 +177,7 @@ _program_vectors: kmap: .db 0x80, 0x81, 0x82, 0x83 map_kernel: +map_kernel_di: push af push hl ld hl, #kmap @@ -187,6 +192,7 @@ map_for_swap: ret map_process_always: +map_process_always_di: push af push hl ld hl, #U_DATA__U_PAGE @@ -196,6 +202,7 @@ map_process_always: ret map_process: +map_process_di: ld a, h or l jr z, map_kernel @@ -223,7 +230,8 @@ map_loop: ei ret -map_save: push hl +map_save_kernel: + push hl push de push bc ld hl, #map_current @@ -231,6 +239,10 @@ map_save: push hl ldi ldi ldi + push af + ld hl, #kmap + call map_process_1 + pop af pop bc pop de pop hl @@ -499,3 +511,7 @@ map_save_area: _need_resched: .db 0 + +_int_disabled: + .db 1 + diff --git a/Kernel/platform-pcw8256/tricks.s b/Kernel/platform-pcw8256/tricks.s index 10b4579f..ec1ce16a 100644 --- a/Kernel/platform-pcw8256/tricks.s +++ b/Kernel/platform-pcw8256/tricks.s @@ -16,6 +16,7 @@ .globl map_process .globl map_kernel .globl _swapper + .globl _int_disabled ; imported debug symbols .globl outstring, outde, outhl, outbc, outnewline, outchar, outcharhex @@ -134,6 +135,7 @@ not_swapped: ; 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