forked from M-Labs/zynq-rs
1
0
Fork 0

libcortex_a9/boot: enable IRQ on reset.

This commit is contained in:
pca006132 2020-08-03 11:21:38 +08:00 committed by Gitea
parent 2927c43309
commit c1f61b5673
2 changed files with 8 additions and 0 deletions

View File

@ -33,3 +33,9 @@ pub fn dsb() {
pub fn isb() {
unsafe { llvm_asm!("isb" :::: "volatile") }
}
/// Enable IRQ
#[inline]
pub unsafe fn enable_irq() {
llvm_asm!("cpsie i":::: "volatile");
}

View File

@ -57,6 +57,7 @@ unsafe fn boot_core0() -> ! {
asm::dmb();
asm::dsb();
asm::enable_irq();
main_core0();
panic!("return from main");
});
@ -77,6 +78,7 @@ unsafe fn boot_core1() -> ! {
asm::dmb();
asm::dsb();
asm::enable_irq();
main_core1();
panic!("return from main_core1");
});