forked from M-Labs/zynq-rs
libcortex_a9/boot: enable IRQ on reset.
This commit is contained in:
parent
2927c43309
commit
c1f61b5673
@ -33,3 +33,9 @@ pub fn dsb() {
|
|||||||
pub fn isb() {
|
pub fn isb() {
|
||||||
unsafe { llvm_asm!("isb" :::: "volatile") }
|
unsafe { llvm_asm!("isb" :::: "volatile") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Enable IRQ
|
||||||
|
#[inline]
|
||||||
|
pub unsafe fn enable_irq() {
|
||||||
|
llvm_asm!("cpsie i":::: "volatile");
|
||||||
|
}
|
||||||
|
@ -57,6 +57,7 @@ unsafe fn boot_core0() -> ! {
|
|||||||
asm::dmb();
|
asm::dmb();
|
||||||
asm::dsb();
|
asm::dsb();
|
||||||
|
|
||||||
|
asm::enable_irq();
|
||||||
main_core0();
|
main_core0();
|
||||||
panic!("return from main");
|
panic!("return from main");
|
||||||
});
|
});
|
||||||
@ -77,6 +78,7 @@ unsafe fn boot_core1() -> ! {
|
|||||||
asm::dmb();
|
asm::dmb();
|
||||||
asm::dsb();
|
asm::dsb();
|
||||||
|
|
||||||
|
asm::enable_irq();
|
||||||
main_core1();
|
main_core1();
|
||||||
panic!("return from main_core1");
|
panic!("return from main_core1");
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user