z80pack: update to new behaviours
authorAlan Cox <alan@linux.intel.com>
Fri, 28 Sep 2018 22:42:57 +0000 (23:42 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 28 Sep 2018 22:42:57 +0000 (23:42 +0100)
Kernel/platform-z80pack/z80pack.s

index 6346ced..337a62c 100644 (file)
            .globl platform_interrupt_all
 
            .globl map_kernel
+           .globl map_kernel_di
            .globl map_process
+           .globl map_process_di
            .globl map_process_always
+           .globl map_process_always_di
            .globl map_process_a
-           .globl map_save
+           .globl map_save_kernel
            .globl map_restore
 
            .globl _fd_bankcmd
 
+           .globl _int_disabled
+
            .globl _platform_reboot
 
             ; exported debugging tools
@@ -85,10 +90,10 @@ _fd_bankcmd:pop de          ; return
            ld a, i
            di
            push af             ; save DI state
-           call map_process    ; HL alread holds our bank
+           call map_process_di ; HL alread holds our bank
            ld a, c             ; issue the command
            out (13), a         ;
-           call map_kernel     ; return to kernel mapping
+           call map_kernel_di  ; return to kernel mapping
            pop af
            ret po
            ei
@@ -133,6 +138,8 @@ init_hardware:
 
             .area _COMMONMEM
 
+_int_disabled:
+           .byte 1
 
 _program_vectors:
             ; we are called, with interrupts disabled, by both newproc() and crt0
@@ -182,12 +189,14 @@ _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
            xor a
            out (21), a
            pop af
             ret
 map_process:
+map_process_di:
            ld a, h
            or l
            jr z, map_kernel
@@ -196,15 +205,18 @@ map_process_a:
            out (21), a
             ret
 map_process_always:
+map_process_always_di:
            push af
            ld a, (U_DATA__U_PAGE)
            out (21), a
            pop af
            ret
-map_save:
+map_save_kernel:
            push af
            in a, (21)
            ld (map_store), a
+           xor a
+           out (21),a
            pop af
            ret     
 map_restore:
@@ -340,8 +352,7 @@ badstack_doirq:
            out (23),a                  ; MMU off so we can do our job
 ;          ld a,#'!'
 ;          call outchar
-           call map_save
-           call map_kernel
+           call map_save_kernel
            ld hl,#9
            push hl
            ld hl,(U_DATA__U_PTAB)