From c900f57be865c96564bca8139199674a36fa0a23 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 23 Jan 2020 22:45:05 +0100 Subject: [PATCH] libboard_zc706::abort: soft_reset on PrefetchAbort/DataAbort --- libboard_zc706/src/abort.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libboard_zc706/src/abort.rs b/libboard_zc706/src/abort.rs index f3c16d0..3d6592f 100644 --- a/libboard_zc706/src/abort.rs +++ b/libboard_zc706/src/abort.rs @@ -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 {} }