mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
kernel: fix isr context handling
We were loading both the context and the banked context, which resulted in an invalid context being selected. This caused a cascading failure. Load only the lower halfword in order to correctly enter the interrupt context. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
fb01359821
commit
fa22d9bad8
6 changed files with 4 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -51,10 +51,10 @@ _start:
|
|||
_start_trap:
|
||||
csrw sscratch, sp
|
||||
li sp, 0xff801000
|
||||
STORE x1, 0*REGBYTES(sp)
|
||||
LOAD x1, 1*REGBYTES(sp)
|
||||
slli x1, x1, 7
|
||||
add sp, sp, x1
|
||||
STORE x1, 0*REGBYTES(sp) // Store x1 in the scratch field
|
||||
lh x1, 1*REGBYTES(sp) // Load current context number
|
||||
slli x1, x1, 7 // Multiply current context number by 32
|
||||
add sp, sp, x1 // Set $sp to 0xff801000 + (current_context * 32)
|
||||
|
||||
STORE x1, 0*REGBYTES(sp)
|
||||
// Skip SP for now
|
||||
|
|
|
|||
Loading…
Reference in a new issue