From 47a16b6ce4af0b884512ace9ca1bfee072a07b84 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 8 Mar 2024 04:11:22 +0800 Subject: [PATCH] add RETURN_FROM_ISR magic address this is picked to not conflict with other addresses used by the ARM implementation. I think it should be OK? --- kernel/src/arch/riscv/process.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/src/arch/riscv/process.rs b/kernel/src/arch/riscv/process.rs index 178a29644..45908d123 100644 --- a/kernel/src/arch/riscv/process.rs +++ b/kernel/src/arch/riscv/process.rs @@ -27,6 +27,9 @@ pub const EXIT_THREAD: usize = 0xff80_3000; /// This is the address a thread will return to when it finishes handling an exception. pub const RETURN_FROM_EXCEPTION_HANDLER: usize = 0xff80_4000; +/// This is the address the swapper returns from +pub const RETURN_FROM_SWAPPER: usize = 0xff80_8000; + /// Support processing interrupts, which normally are TID 0. Since /// the TID is a NonZeroU8, we must pick a value here that can be /// used throughout the rest of the kernel.