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

libboard_zc706::abort: soft_reset on PrefetchAbort/DataAbort

This commit is contained in:
Astro 2020-01-23 22:45:05 +01:00
parent aae85981e2
commit c900f57be8
1 changed files with 5 additions and 1 deletions

View File

@ -1,10 +1,12 @@
use libboard_zynq::{println, stdio};
use libboard_zynq::{println, slcr, stdio};
#[no_mangle]
pub unsafe extern "C" fn PrefetchAbort() {
stdio::drop_uart();
println!("PrefetchAbort");
slcr::RegisterBlock::unlocked(|slcr| slcr.soft_reset());
loop {}
}
@ -13,5 +15,7 @@ pub unsafe extern "C" fn DataAbort() {
stdio::drop_uart();
println!("DataAbort");
slcr::RegisterBlock::unlocked(|slcr| slcr.soft_reset());
loop {}
}