From 24fbe32226543ed17120e464d9c95561cd278e1d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 21 Aug 2018 00:03:00 +0100 Subject: [PATCH] z80thunked: Fix some more bugs - Interrupt return to kernel must restore the saved low page or an interrupt during a user copy explodes - System call and interrupt entry routines must be high --- Kernel/lowlevel-z80-thunked.s | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kernel/lowlevel-z80-thunked.s b/Kernel/lowlevel-z80-thunked.s index 9f8097cb..b1317031 100644 --- a/Kernel/lowlevel-z80-thunked.s +++ b/Kernel/lowlevel-z80-thunked.s @@ -85,9 +85,9 @@ _doexec: ld sp,hl ex de,hl ld iy,#PROGLOAD + ld a,(U_DATA__U_PAGE+1) ; pass high page to trampoline jp _platform_doexec ; jump into the low memory stub - .area _CODE ; ; This is the entry point from the platform wrapper. When we hit this ; our stack is above 32K and the upper 32K of kernel space is mapped @@ -193,6 +193,7 @@ traphl: call outstring call _platform_monitor + .area _HIGH ; ; The stub caller has already saved AF DE HL, mapped the kernel high ; and switched to the istack as well as saving the old sp in @@ -255,6 +256,7 @@ intret: ret interrupt_kernel: + call map_restore_low xor a ld e,a jr intret -- 2.34.1