2020-06-25 04:23:05 +08:00
|
|
|
use libregister::RegisterR;
|
|
|
|
use libcortex_a9::regs::{DFSR, MPIDR, CORE_MASK};
|
2020-01-24 05:45:05 +08:00
|
|
|
use libboard_zynq::{println, slcr, stdio};
|
2019-11-11 09:37:06 +08:00
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub unsafe extern "C" fn PrefetchAbort() {
|
2020-01-24 05:34:37 +08:00
|
|
|
stdio::drop_uart();
|
|
|
|
|
2019-11-11 09:37:06 +08:00
|
|
|
println!("PrefetchAbort");
|
2020-01-24 05:45:05 +08:00
|
|
|
|
|
|
|
slcr::RegisterBlock::unlocked(|slcr| slcr.soft_reset());
|
2019-11-11 09:37:06 +08:00
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub unsafe extern "C" fn DataAbort() {
|
2020-01-24 05:34:37 +08:00
|
|
|
stdio::drop_uart();
|
|
|
|
|
2020-06-25 04:23:05 +08:00
|
|
|
println!("DataAbort on core {}", MPIDR.read() & CORE_MASK);
|
|
|
|
println!("DFSR: {:03X}", DFSR.read());
|
2020-01-24 05:45:05 +08:00
|
|
|
|
|
|
|
slcr::RegisterBlock::unlocked(|slcr| slcr.soft_reset());
|
2019-11-11 09:37:06 +08:00
|
|
|
loop {}
|
|
|
|
}
|