From b4ff6dda24fdbfce2c7a8b6a897c3cd6be56ab76 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Mon, 18 Jan 2021 10:38:50 +0800 Subject: [PATCH] runtime: use naked function for IRQ non-naked IRQ would somehow trigger interrupts after several kernel restarts, investigating --- src/runtime/src/irq.rs | 1 + src/runtime/src/main.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/runtime/src/irq.rs b/src/runtime/src/irq.rs index 030739a..84b6afe 100644 --- a/src/runtime/src/irq.rs +++ b/src/runtime/src/irq.rs @@ -16,6 +16,7 @@ static CORE1_RESTART: AtomicBool = AtomicBool::new(false); #[link_section = ".text.boot"] #[no_mangle] +#[naked] pub unsafe extern "C" fn IRQ() { if MPIDR.read().cpu_id() == 1 { let mpcore = mpcore::RegisterBlock::mpcore(); diff --git a/src/runtime/src/main.rs b/src/runtime/src/main.rs index 63711b6..f8b7c6a 100644 --- a/src/runtime/src/main.rs +++ b/src/runtime/src/main.rs @@ -6,6 +6,7 @@ #![feature(c_variadic)] #![feature(const_btree_new)] #![feature(const_in_array_repeat_expressions)] +#![feature(naked_functions)] extern crate alloc;