mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
cleanup some gen1/gen2 differences
This commit is contained in:
parent
5aece73f3c
commit
a4e86eead5
1 changed files with 5 additions and 10 deletions
|
|
@ -186,6 +186,7 @@ pub(crate) struct PddbOs {
|
||||||
/// reference to a TrngPool object that's shared among all the hardware functions
|
/// reference to a TrngPool object that's shared among all the hardware functions
|
||||||
entropy: Rc<RefCell<TrngPool>>,
|
entropy: Rc<RefCell<TrngPool>>,
|
||||||
/// connection to the password request manager
|
/// connection to the password request manager
|
||||||
|
#[cfg(feature = "gen1")]
|
||||||
pw_cid: xous::CID,
|
pw_cid: xous::CID,
|
||||||
/// Number of consecutive failed login attempts
|
/// Number of consecutive failed login attempts
|
||||||
failed_logins: u64,
|
failed_logins: u64,
|
||||||
|
|
@ -279,6 +280,7 @@ impl PddbOs {
|
||||||
migration_dna: dna,
|
migration_dna: dna,
|
||||||
dna_mode: DnaMode::Normal,
|
dna_mode: DnaMode::Normal,
|
||||||
entropy: trngpool,
|
entropy: trngpool,
|
||||||
|
#[cfg(feature = "gen1")]
|
||||||
pw_cid,
|
pw_cid,
|
||||||
failed_logins: 0,
|
failed_logins: 0,
|
||||||
#[cfg(all(feature = "pddbtest", feature = "autobasis"))]
|
#[cfg(all(feature = "pddbtest", feature = "autobasis"))]
|
||||||
|
|
@ -320,6 +322,7 @@ impl PddbOs {
|
||||||
migration_dna: dna,
|
migration_dna: dna,
|
||||||
dna_mode: DnaMode::Normal,
|
dna_mode: DnaMode::Normal,
|
||||||
entropy: trngpool,
|
entropy: trngpool,
|
||||||
|
#[cfg(feature = "gen1")]
|
||||||
pw_cid,
|
pw_cid,
|
||||||
failed_logins: 0,
|
failed_logins: 0,
|
||||||
#[cfg(all(feature = "pddbtest", feature = "autobasis"))]
|
#[cfg(all(feature = "pddbtest", feature = "autobasis"))]
|
||||||
|
|
@ -406,17 +409,9 @@ impl PddbOs {
|
||||||
pub(crate) fn timestamp_now(&self) -> u64 { self.tt.elapsed_ms() }
|
pub(crate) fn timestamp_now(&self) -> u64 { self.tt.elapsed_ms() }
|
||||||
|
|
||||||
/// checks if the root keys are initialized, which is a prerequisite to formatting and mounting
|
/// checks if the root keys are initialized, which is a prerequisite to formatting and mounting
|
||||||
|
#[cfg(feature = "gen1")]
|
||||||
pub(crate) fn rootkeys_initialized(&self) -> bool {
|
pub(crate) fn rootkeys_initialized(&self) -> bool {
|
||||||
#[cfg(feature = "gen1")]
|
self.rootkeys.is_initialized().expect("couldn't query initialization state of the rootkeys server")
|
||||||
{
|
|
||||||
self.rootkeys
|
|
||||||
.is_initialized()
|
|
||||||
.expect("couldn't query initialization state of the rootkeys server")
|
|
||||||
}
|
|
||||||
// on gen-2 devices, the key is automatically filled in. We don't have to go through a user-mixing
|
|
||||||
// password step because we don't have the Starbleed vulnerability.
|
|
||||||
#[cfg(feature = "gen2")]
|
|
||||||
true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// patches data at an offset starting from the data physical base address, which corresponds
|
/// patches data at an offset starting from the data physical base address, which corresponds
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue