kernel: use correct fake interrupt cause

Previously, we were creating a fake interrupt that was a "user software
interrupt". Update this to be a "supervisor external interrupt" to fix
hardware resume.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2023-04-09 15:31:06 +08:00
parent 38026e67ff
commit dbf28fbd61
7 changed files with 2 additions and 2 deletions

View file

@ -49,10 +49,10 @@ _start:
// restore the SIM with the value previously socked away by the interrupt handler routine during the suspend half
jal ra, _enable_all_irqs
// set scause to simulate an interrupt's occurence -- this makes the resume "feel like" an interrupt
// set scause to simulate an interrupt's occurrence -- this makes the resume "feel like" an interrupt
// vectored into the same routine that caused the suspend, but without having gone through the typical
// interrupt handler mechanisms
li t0, 0x80000000
li t0, 0x80000009
csrw scause, t0
// this is the same path the suspend interrupt took, but we set it up manually