mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
kernel: services: use exception stack for kernel interrupts
When the kernel is processing an interrupt, use the exception stack. This ensures that the kernel interrupt handler can switch processes without having its stack go away. This is used for debug information. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
ce66a6bde2
commit
5b92dd9874
1 changed files with 5 additions and 1 deletions
|
|
@ -527,7 +527,11 @@ impl SystemServices {
|
|||
// function returns, it will jump to the RETURN_FROM_ISR address,
|
||||
// causing an instruction fault and exiting the interrupt.
|
||||
ArchProcess::with_current_mut(|arch_process| {
|
||||
let sp = arch_process.current_thread().stack_pointer();
|
||||
let sp = if pid.get() == 1 {
|
||||
arch::mem::EXCEPTION_STACK_TOP
|
||||
} else {
|
||||
arch_process.current_thread().stack_pointer()
|
||||
};
|
||||
|
||||
// Activate the current context
|
||||
arch_process.set_thread(arch::process::IRQ_TID).unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue