socz80: update to new behaviour
authorAlan Cox <alan@linux.intel.com>
Fri, 28 Sep 2018 22:38:07 +0000 (23:38 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 28 Sep 2018 22:38:07 +0000 (23:38 +0100)
Kernel/platform-socz80/config.h
Kernel/platform-socz80/devtty.c
Kernel/platform-socz80/socz80.s
Kernel/platform-socz80/tricks.s

index 92cce9b..f0218bf 100644 (file)
@@ -39,3 +39,4 @@
 #define SD_DRIVE_COUNT 1
 
 #define platform_discard()
+#define platform_copyright()
index bba94fc..c1e6f2f 100644 (file)
@@ -25,7 +25,7 @@ void kputchar(char c)
 }
 
 /* Called to set baud rate etc */
-void tty_setup(uint8_t minor)
+void tty_setup(uint8_t minor, uint8_t flag)
 {
     minor;
 }
index 4dd4f01..cebe7d5 100644 (file)
            .globl map_kernel
            .globl map_process
            .globl map_process_always
-           .globl map_save
+           .globl map_kernel_di
+           .globl map_process_di
+           .globl map_process_always_di
+           .globl map_save_kernel
            .globl map_restore
            .globl platform_interrupt_all
            .globl _need_resched
            .globl _irqwork
+           .globl _int_disabled
 
             ; exported debugging tools
             .globl _platform_monitor
@@ -56,6 +60,8 @@
             .area _COMMONMEM
 _need_resched:
            .db 0
+_int_disabled:
+           .db 1
 trapmsg:    .ascii "Trapdoor: SP="
             .db 0
 trapmsg2:   .ascii ", PC="
@@ -390,6 +396,7 @@ mmumsg:     .ascii "MMU page "
 ; HL points to the page array for this task, or NULL for kernel
 ; Preserve all but a, hl
 map_process:
+map_process_di:
            ld a, h
            or l
            jr nz, map_loadhl
@@ -400,6 +407,7 @@ map_process:
 ; map the current process, preserves all registers
 ;
 map_process_always:
+map_process_always_di:
            push hl
            ld hl, #U_DATA__U_PAGE
            call map_loadhl
@@ -409,6 +417,7 @@ map_process_always:
 ; map the kernel. preserves all registers
 ;
 map_kernel:
+map_kernel_di:
            push hl
            ld hl, #os_bank
            call map_loadhl
@@ -423,7 +432,7 @@ map_restore:
            pop hl
             ret
 
-map_save:
+map_save_kernel:
            ; FIXME: Save the current mapping registers. Preserves all
            ; registers
            push hl
@@ -431,6 +440,8 @@ map_save:
            ld (saved_map), hl
            ld hl, (map_current + 2)
            ld (saved_map + 2), hl
+           ld hl, #os_bank
+           call map_loadhl
            pop hl
            ret
 
index 5292efe..4b45d69 100644 (file)
@@ -17,6 +17,7 @@
         .globl unix_syscall_entry
         .globl map_process
         .globl interrupt_handler
+       .globl _int_disabled
 
         ; imported debug symbols
         .globl outstring, outde, outhl, outbc, outnewline, outchar, outcharhex
@@ -124,6 +125,7 @@ _switchin:
 
         ; 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