mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
print a message if memory reads timeout
This commit is contained in:
parent
6c74948f93
commit
aa8d84f007
1 changed files with 7 additions and 2 deletions
|
|
@ -358,11 +358,16 @@ impl SwapHal {
|
||||||
// cheaper than the Refcell bookkeeping.
|
// cheaper than the Refcell bookkeeping.
|
||||||
let mut aad = [0u8; 64];
|
let mut aad = [0u8; 64];
|
||||||
aad[..self.aad_len].copy_from_slice(self.aad());
|
aad[..self.aad_len].copy_from_slice(self.aad());
|
||||||
self.flash_spim.mem_read(
|
if !self.flash_spim.mem_read(
|
||||||
(self.image_mac_start + (offset / 4096) * size_of::<Tag>()) as u32,
|
(self.image_mac_start + (offset / 4096) * size_of::<Tag>()) as u32,
|
||||||
&mut tag,
|
&mut tag,
|
||||||
false,
|
false,
|
||||||
);
|
) {
|
||||||
|
println!(
|
||||||
|
" ** Memory read timed out reading {:x}",
|
||||||
|
(self.image_mac_start + (offset / 4096) * size_of::<Tag>()) as u32
|
||||||
|
);
|
||||||
|
};
|
||||||
match self.src_cipher.decrypt_in_place_detached(
|
match self.src_cipher.decrypt_in_place_detached(
|
||||||
Nonce::from_slice(&nonce),
|
Nonce::from_slice(&nonce),
|
||||||
&aad[..self.aad_len],
|
&aad[..self.aad_len],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue