forked from M-Labs/artiq
1
0
Fork 0

ICAP: prevent sayma from using it (#1740)

This commit is contained in:
Star Chen 2021-08-06 15:08:30 +08:00 committed by GitHub
parent dc546630e4
commit 5111132ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -114,6 +114,7 @@ pub unsafe fn write(mut addr: usize, mut data: &[u8]) {
} }
} }
#[cfg(any(soc_platform = "kasli", soc_platform = "metlino", soc_platform = "kc705"))]
pub unsafe fn reload () -> ! { pub unsafe fn reload () -> ! {
csr::icap::iprog_write(1); csr::icap::iprog_write(1);
loop {} loop {}

View File

@ -332,7 +332,8 @@ pub fn panic_impl(info: &core::panic::PanicInfo) -> ! {
println!("{:#08x}", ip - 2 * 4); println!("{:#08x}", ip - 2 * 4);
}); });
if config::read_str("panic_reset", |r| r == Ok("1")) && cfg!(has_spiflash) { if config::read_str("panic_reset", |r| r == Ok("1")) &&
cfg!(any(soc_platform = "kasli", soc_platform = "metlino", soc_platform = "kc705")) {
println!("restarting..."); println!("restarting...");
unsafe { unsafe {
kernel::stop(); kernel::stop();