mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
we're at least booting now and talking to the pddb service
This commit is contained in:
parent
a4e86eead5
commit
8e161d7e9d
1 changed files with 24 additions and 3 deletions
|
|
@ -368,8 +368,12 @@ extern crate bitfield;
|
||||||
Gen2 porting notes:
|
Gen2 porting notes:
|
||||||
|
|
||||||
Todo list:
|
Todo list:
|
||||||
|
-[x] Rewrite pddb to use 'keystore' server instead of rootkeys/modals/ux integrations.
|
||||||
|
-[x] Fill in 'keystore' server for hosted mode emulation
|
||||||
|
-[x] Make a simple PDDB test in the baosec console app
|
||||||
|
-[ ] Fix the bugs in hosted mode
|
||||||
-[ ] Rewrite xous-swapper/swap layer to understand virtual pages mapped to SPI flash (see notes below)
|
-[ ] Rewrite xous-swapper/swap layer to understand virtual pages mapped to SPI flash (see notes below)
|
||||||
-[ ] Rewrite pddb to use 'keystore' server instead of rootkeys/modals/ux integrations.
|
-[ ] Fix the bugs in real hardware
|
||||||
|
|
||||||
Xous-swapper refactor notes:
|
Xous-swapper refactor notes:
|
||||||
|
|
||||||
|
|
@ -662,7 +666,10 @@ fn wrapped_main() -> ! {
|
||||||
|
|
||||||
// the PDDB resets the hardware RTC to a new random starting point every time it is reformatted
|
// the PDDB resets the hardware RTC to a new random starting point every time it is reformatted
|
||||||
// it is the only server capable of doing this.
|
// it is the only server capable of doing this.
|
||||||
|
#[cfg(feature = "gen1")]
|
||||||
let time_resetter = xns.request_connection_blocking(crate::TIME_SERVER_PDDB).unwrap();
|
let time_resetter = xns.request_connection_blocking(crate::TIME_SERVER_PDDB).unwrap();
|
||||||
|
#[cfg(feature = "gen2")]
|
||||||
|
let time_resetter = 0; // dummy
|
||||||
|
|
||||||
// track processes that want a notification of a mount event
|
// track processes that want a notification of a mount event
|
||||||
let mut mount_notifications = Vec::<xous::MessageSender>::new();
|
let mut mount_notifications = Vec::<xous::MessageSender>::new();
|
||||||
|
|
@ -2562,7 +2569,13 @@ fn try_mount_or_format(
|
||||||
}
|
}
|
||||||
// correct password but no mount -> offer to format; uninit -> offer to format
|
// correct password but no mount -> offer to format; uninit -> offer to format
|
||||||
if pw_state == PasswordState::Correct || pw_state == PasswordState::Uninit {
|
if pw_state == PasswordState::Correct || pw_state == PasswordState::Uninit {
|
||||||
#[cfg(any(feature = "precursor", feature = "renode", feature = "test-rekey"))]
|
#[cfg(any(
|
||||||
|
feature = "precursor",
|
||||||
|
feature = "renode",
|
||||||
|
feature = "test-rekey",
|
||||||
|
feature = "board-baosec",
|
||||||
|
feature = "board-baosor"
|
||||||
|
))]
|
||||||
{
|
{
|
||||||
log::debug!("PDDB did not mount; requesting format");
|
log::debug!("PDDB did not mount; requesting format");
|
||||||
modals.add_list_item(t!("pddb.okay", locales::LANG)).expect("couldn't build radio item list");
|
modals.add_list_item(t!("pddb.okay", locales::LANG)).expect("couldn't build radio item list");
|
||||||
|
|
@ -2614,6 +2627,7 @@ fn try_mount_or_format(
|
||||||
// hygiene we want to restart our RTC counter from a random duration between
|
// hygiene we want to restart our RTC counter from a random duration between
|
||||||
// epoch and 10 years to give some deniability about how long the device has
|
// epoch and 10 years to give some deniability about how long the device has
|
||||||
// been in use.
|
// been in use.
|
||||||
|
#[cfg(feature = "gen1")]
|
||||||
let _ = xous::send_message(
|
let _ = xous::send_message(
|
||||||
time_resetter,
|
time_resetter,
|
||||||
xous::Message::new_blocking_scalar(
|
xous::Message::new_blocking_scalar(
|
||||||
|
|
@ -2643,9 +2657,16 @@ fn try_mount_or_format(
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(not(any(feature = "precursor", feature = "renode", feature = "test-rekey")))]
|
#[cfg(not(any(
|
||||||
|
feature = "precursor",
|
||||||
|
feature = "renode",
|
||||||
|
feature = "test-rekey",
|
||||||
|
feature = "board-baosec",
|
||||||
|
feature = "board-baosor"
|
||||||
|
)))]
|
||||||
{
|
{
|
||||||
pddb_os.pddb_format(false, Some(&modals)).expect("couldn't format PDDB");
|
pddb_os.pddb_format(false, Some(&modals)).expect("couldn't format PDDB");
|
||||||
|
#[cfg(feature = "gen1")]
|
||||||
let _ = xous::send_message(
|
let _ = xous::send_message(
|
||||||
time_resetter,
|
time_resetter,
|
||||||
xous::Message::new_blocking_scalar(
|
xous::Message::new_blocking_scalar(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue