cromemco: update WIP port to new int/z80 handling
authorAlan Cox <alan@linux.intel.com>
Mon, 1 Oct 2018 12:38:59 +0000 (13:38 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 1 Oct 2018 12:38:59 +0000 (13:38 +0100)
Kernel/platform-cromemco/cromemco.s
Kernel/platform-cromemco/devtty.c

index df6f222..633cbd9 100644 (file)
            .globl map_kernel
            .globl map_process
            .globl map_process_always
+           .globl map_kernel_di
+           .globl map_process_di
+           .globl map_process_always_di
            .globl map_process_a
-           .globl map_save
+           .globl map_save_kernel
            .globl map_restore
 
            .globl _platform_reboot
 
+           .globl _int_disabled
+
             ; exported debugging tools
             .globl _platform_monitor
             .globl outchar
@@ -58,6 +63,9 @@ _platform_monitor:
 platform_interrupt_all:
            ret
 
+_int_disabled:
+           .db 1
+
 ; -----------------------------------------------------------------------------
 ; KERNEL MEMORY BANK (below 0xF000, only accessible when the kernel is mapped)
 ; -----------------------------------------------------------------------------
@@ -151,6 +159,7 @@ _program_vectors:
 
             ; put the paging back as it was -- we're in kernel mode so this is predictable
 map_kernel:
+map_kernel_di:
            push af
            ld a,#1
            out (0x40), a
@@ -158,6 +167,7 @@ map_kernel:
            pop af              ; our common is r/o common so writes won't
             ret                        ; cross a bank
 map_process:
+map_process_di:
            ld a, h
            or l
            jr z, map_kernel
@@ -167,17 +177,18 @@ map_process_a:
            out (0x40), a
             ret
 map_process_always:
+map_process_always_di:
            push af
            ld a, (U_DATA__U_PAGE)
            ld (map_page),a     ; save before we map out kernel
            out (0x40), a
            pop af
            ret
-map_save:                      ; this is a bit naughty, but we know
-           push af             ; map_save will always be followed by
+map_save_kernel:
+           push af             ; map_save will always do a map_kernel
            ld a, #1            ; map_kernel so we do the map_kernel
-           out (0x40), a       ; a shade early.
-           ld a, (map_page)    ; then we can get the vars
+           out (0x40), a       ; first so we can get the variables
+           ld a, (map_page)    ;
            ld (map_store), a
            pop af
            ret     
index 99d534d..7141779 100644 (file)
@@ -98,7 +98,7 @@ static uint8_t baudbits[] = {
     16
 };
 
-void tty_setup(uint8_t minor)
+void tty_setup(uint8_t minor, uint8_t flags)
 {
     struct termios *t = &ttydata[minor].termios;
     uint8_t baud = t->c_cflag & CBAUD;