Set arm64 exception handler before entering the rust world

This commit is contained in:
bjorn3
2025-09-13 18:49:40 +02:00
committed by Jeremy Soller
parent d31e552d08
commit 4b16e66164
2 changed files with 4 additions and 16 deletions
-14
View File
@@ -47,17 +47,3 @@ pub unsafe fn halt() {
asm!("wfi");
}
}
#[inline(always)]
pub unsafe fn init() {
unsafe {
// Setup interrupt handlers
asm!(
"
ldr {tmp}, =exception_vector_base
msr vbar_el1, {tmp}
",
tmp = out(reg) _,
);
}
}
+4 -2
View File
@@ -45,6 +45,10 @@ global_asm!("
mov x2, {stack_size}-16
add sp, x1, x2
// Setup interrupt handlers
ldr x9, =exception_vector_base
msr vbar_el1, x9
mov lr, 0
b {start}
@@ -93,8 +97,6 @@ unsafe extern "C" fn start(args_ptr: *const KernelArgs) -> ! {
info!("Redox OS starting...");
args.print();
interrupt::init();
// Initialize RMM
crate::startup::memory::init(&args, None, None);