1
0
Fork 0

runtime: use naked function for IRQ

non-naked IRQ would somehow trigger interrupts after several kernel
restarts, investigating
This commit is contained in:
pca006132 2021-01-18 10:38:50 +08:00
parent 35204d4716
commit b4ff6dda24
2 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ static CORE1_RESTART: AtomicBool = AtomicBool::new(false);
#[link_section = ".text.boot"] #[link_section = ".text.boot"]
#[no_mangle] #[no_mangle]
#[naked]
pub unsafe extern "C" fn IRQ() { pub unsafe extern "C" fn IRQ() {
if MPIDR.read().cpu_id() == 1 { if MPIDR.read().cpu_id() == 1 {
let mpcore = mpcore::RegisterBlock::mpcore(); let mpcore = mpcore::RegisterBlock::mpcore();

View File

@ -6,6 +6,7 @@
#![feature(c_variadic)] #![feature(c_variadic)]
#![feature(const_btree_new)] #![feature(const_btree_new)]
#![feature(const_in_array_repeat_expressions)] #![feature(const_in_array_repeat_expressions)]
#![feature(naked_functions)]
extern crate alloc; extern crate alloc;