8080: turn on interrupt support and pre-emption
authorAlan Cox <alan@linux.intel.com>
Fri, 15 Feb 2019 21:57:41 +0000 (21:57 +0000)
committerAlan Cox <alan@linux.intel.com>
Fri, 15 Feb 2019 21:57:41 +0000 (21:57 +0000)
Fix one small bug in the process

Kernel/lib/8080fixedbank-core.s
Kernel/lowlevel-8080.s

index 0ee44ab..37f82de 100644 (file)
@@ -167,7 +167,7 @@ skip_copyback:
        !       own saves so the cost is paid in the right place
        !
        pop h
-       mov l,a
+       mov a,l
        sta .areg       ! FIXME: add a pad byte to .areg instead
        pop h
        shld .tmp1
index 2b3f4ea..ae1edf0 100644 (file)
@@ -236,12 +236,12 @@ interrupt_handler:
        push d
        push h
        call platform_interrupt_all
-       jmp interrupt_pop                       !! FIXME
        ! Switch stacks
        lxi h,0
        dad sp
        shld istack_switched_sp
        lxi sp,istack_top
+
        !
        ! Map the kernel
        !
@@ -270,7 +270,7 @@ interrupt_handler:
        push h
        call _platform_interrupt
        pop h
-       mov l,a
+       mov a,l
        sta .areg       ! FIXME: add a pad byte to .areg instead
        pop h
        shld .tmp1
@@ -334,7 +334,6 @@ trap_signal:
 preemption:
        xra a
        sta _need_resched
-       call map_restore
        !
        !       Save our original stack in syscall_s
        !       Move to our kernel stack (free because we don't preempt
@@ -344,10 +343,6 @@ preemption:
        shld U_DATA__U_SYSCALL_SP
        lxi sp,kstack_top
        !
-       !       Fix up the mappings
-       !
-       call map_kernel_di
-       !
        !       Mark ourselves as in a system call
        !
        mvi a,1