mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix clean state bookkeeping on the basisroot cache record
This commit is contained in:
parent
a5da30de37
commit
e1d00ef57c
1 changed files with 30 additions and 27 deletions
|
|
@ -555,6 +555,7 @@ impl BasisCacheEntry {
|
||||||
|
|
||||||
/// Syncs this cache entry to the hardware.
|
/// Syncs this cache entry to the hardware.
|
||||||
pub(crate) fn basis_sync(&mut self, hw: &mut PddbOs) {
|
pub(crate) fn basis_sync(&mut self, hw: &mut PddbOs) {
|
||||||
|
if !self.clean {
|
||||||
let basis_root = BasisRoot {
|
let basis_root = BasisRoot {
|
||||||
magic: PDDB_MAGIC,
|
magic: PDDB_MAGIC,
|
||||||
version: PDDB_VERSION,
|
version: PDDB_VERSION,
|
||||||
|
|
@ -583,6 +584,8 @@ impl BasisCacheEntry {
|
||||||
}
|
}
|
||||||
).unwrap();
|
).unwrap();
|
||||||
hw.patch_data(&[nonce.as_slice(), &ciphertext].concat(), pp.page_number() * PAGE_SIZE as u32);
|
hw.patch_data(&[nonce.as_slice(), &ciphertext].concat(), pp.page_number() * PAGE_SIZE as u32);
|
||||||
|
self.clean = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue