trs80m1: update to new tty and irq handling
authorAlan Cox <alan@linux.intel.com>
Mon, 1 Oct 2018 12:41:48 +0000 (13:41 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 1 Oct 2018 12:41:48 +0000 (13:41 +0100)
Kernel/platform-trs80m1/devtty.c
Kernel/platform-trs80m1/trs80-bank.s
Kernel/platform-trs80m1/trs80.s

index 75c4f38..2683dd5 100644 (file)
@@ -204,7 +204,7 @@ static const uint8_t trssize[4] = {
        0x00, 0x40, 0x20, 0x60
 };
 
-void tty_setup(uint8_t minor)
+void tty_setup(uint8_t minor, uint8_t flags)
 {
        uint8_t baud;
        uint8_t ctrl = 3;               /* DTR|RTS */
index b945956..9b7db3d 100644 (file)
            .globl map_process
            .globl map_process_a
            .globl map_process_always
+           .globl map_kernel_di
+           .globl map_process_di
+           .globl map_process_always_di
            .globl map_process_save
            .globl map_kernel_restore
-           .globl map_save
+           .globl map_save_kernel
            .globl map_restore
            .globl map_save_kmap
            .globl map_restore_kmap
@@ -188,6 +191,7 @@ map_store:  .db 0x1f
 ;      before jumping out of common. Thus we don't need to do anything but
 ;      restore the last saved kernel map!
 ;
+map_kernel_di:
 map_kernel:
 map_kernel_restore:
            push bc
@@ -207,6 +211,7 @@ fork_mapsave:
 ;      Select the bank for the relevant process. Update the ksave_map so we
 ;      can restore the correct kernel mapping when banked.
 ;
+map_process_di:
 map_process:
            ld a, h
            or l
@@ -231,6 +236,7 @@ map_process_a:                      ; used by bankfork
 
 map_process_save:
 map_process_always:
+map_process_always_di:
            push af
            push bc
            ld bc, (map_reg)
@@ -243,9 +249,13 @@ map_process_always:
            pop af
            ret
 
-map_save:   push bc
+map_save_kernel:
+           push bc
            ld bc, (map_reg)
            ld (map_store), bc
+           ld bc, (ksave_map)
+           ld (map_reg), bc
+           out (c), b
            pop bc
            ret
 
index 4dc95a2..4d5ca7b 100644 (file)
@@ -13,7 +13,7 @@
            .globl map_process
            .globl map_process_a
            .globl map_process_always
-           .globl map_save
+           .globl map_save_kernel
            .globl map_restore
            .globl map_kernel_restore
 
@@ -24,6 +24,7 @@
            .globl l__COMMONMEM
 
            .globl _trs80_model
+           .globl _int_disabled
 
            ; hard disk helpers
            .globl _hd_xfer_in
@@ -74,11 +75,14 @@ platform_interrupt_all:
            ret
 
 _platform_reboot:
-          di
-          ld sp,#0xffff
-          xor a
-          out (0x43),a
-          rst 0
+           di
+           ld sp,#0xffff
+           xor a
+           out (0x43),a
+           rst 0
+
+_int_disabled:
+           .db 1
 
 ; -----------------------------------------------------------------------------
 ; BOOT MEMORY BANK (below 0x8000)