mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add a function to nab the decrypt buffer
HIGHLY unsafe, but saves us a decryption operation as we interleave between the various states of the loader.
This commit is contained in:
parent
35082c4688
commit
999cb320ed
2 changed files with 10 additions and 0 deletions
|
|
@ -269,4 +269,9 @@ impl SwapHal {
|
||||||
Err(e) => panic!("Decryption error in swap: {:?}", e),
|
Err(e) => panic!("Decryption error in swap: {:?}", e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Grabs a slice of the internal buffer. Useful for re-using the decrypted page
|
||||||
|
/// between elements of the bootloader (saving us from redundant decrypt ops),
|
||||||
|
/// but extremely unsafe because we have to track the use of this buffer manually.
|
||||||
|
pub unsafe fn get_decrypt(&self) -> &[u8] { &self.buf.data }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,4 +71,9 @@ impl SwapHal {
|
||||||
Err(e) => panic!("Decryption error in swap: {:?}", e),
|
Err(e) => panic!("Decryption error in swap: {:?}", e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Grabs a slice of the internal buffer. Useful for re-using the decrypted page
|
||||||
|
/// between elements of the bootloader (saving us from redundant decrypt ops),
|
||||||
|
/// but extremely unsafe because we have to track the use of this buffer manually.
|
||||||
|
pub unsafe fn get_decrypt(&self) -> &[u8] { &self.buf.data }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue