forked from M-Labs/zynq-rs
fix exception vectors
This commit is contained in:
parent
0c60d684e4
commit
e430600683
@ -1,14 +1,4 @@
|
||||
ENTRY(_boot_cores);
|
||||
|
||||
/* Provide some defaults */
|
||||
PROVIDE(Reset = _boot_cores);
|
||||
PROVIDE(UndefinedInstruction = Reset);
|
||||
PROVIDE(SoftwareInterrupt = Reset);
|
||||
PROVIDE(PrefetchAbort = Reset);
|
||||
PROVIDE(DataAbort = Reset);
|
||||
PROVIDE(ReservedException = Reset);
|
||||
PROVIDE(IRQ = Reset);
|
||||
PROVIDE(FIQ = Reset);
|
||||
ENTRY(Reset);
|
||||
|
||||
MEMORY
|
||||
{
|
||||
|
@ -2,16 +2,36 @@ use libregister::RegisterR;
|
||||
use libcortex_a9::regs::{DFSR, MPIDR};
|
||||
use libboard_zynq::{println, slcr, stdio};
|
||||
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn PrefetchAbort() {
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn UndefinedInstruction() {
|
||||
stdio::drop_uart();
|
||||
|
||||
println!("PrefetchAbort");
|
||||
|
||||
println!("UndefinedInstruction");
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn SoftwareInterrupt() {
|
||||
stdio::drop_uart();
|
||||
println!("SoftwareInterrupt");
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn PrefetchAbort() {
|
||||
stdio::drop_uart();
|
||||
println!("PrefetchAbort");
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn DataAbort() {
|
||||
stdio::drop_uart();
|
||||
|
||||
@ -21,3 +41,30 @@ pub unsafe extern "C" fn DataAbort() {
|
||||
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn ReservedException() {
|
||||
stdio::drop_uart();
|
||||
println!("ReservedException");
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn IRQ() {
|
||||
stdio::drop_uart();
|
||||
println!("IRQ");
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn FIQ() {
|
||||
stdio::drop_uart();
|
||||
println!("FIQ");
|
||||
loop {}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ static mut CORE1_ENABLED: VolatileCell<bool> = VolatileCell::new(false);
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn _boot_cores() -> ! {
|
||||
pub unsafe extern "C" fn Reset() -> ! {
|
||||
const CORE_MASK: u32 = 0x3;
|
||||
|
||||
match MPIDR.read() & CORE_MASK {
|
||||
|
Loading…
Reference in New Issue
Block a user