1
0
Fork 0
zynq-rs/libsupport_zynq/src/abort.rs

24 lines
470 B
Rust
Raw Normal View History

2020-06-25 04:23:05 +08:00
use libregister::RegisterR;
2020-06-25 07:27:23 +08:00
use libcortex_a9::regs::{DFSR, MPIDR};
use libboard_zynq::{println, slcr, stdio};
2019-11-11 09:37:06 +08:00
#[no_mangle]
pub unsafe extern "C" fn PrefetchAbort() {
stdio::drop_uart();
2019-11-11 09:37:06 +08:00
println!("PrefetchAbort");
2019-11-11 09:37:06 +08:00
loop {}
}
#[no_mangle]
pub unsafe extern "C" fn DataAbort() {
stdio::drop_uart();
2020-06-25 07:27:23 +08:00
const CORE_MASK: u32 = 0x3;
2020-06-25 04:23:05 +08:00
println!("DataAbort on core {}", MPIDR.read() & CORE_MASK);
println!("DFSR: {:03X}", DFSR.read());
2019-11-11 09:37:06 +08:00
loop {}
}