Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[runtime] Start recovery flow in the runtime #1904

Open
wants to merge 9 commits into
base: main-2.x
Choose a base branch
from
Open
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions auth-manifest/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use zeroize::Zeroize;

pub const AUTH_MANIFEST_MARKER: u32 = 0x4154_4D4E;
pub const AUTH_MANIFEST_IMAGE_METADATA_MAX_COUNT: usize = 127;
pub const AUTH_MANIFEST_PREAMBLE_SIZE: usize = 7168;

bitflags::bitflags! {
#[derive(Default, Copy, Clone, Debug)]
Expand Down Expand Up @@ -187,3 +188,17 @@ pub struct AuthorizationManifest {

pub image_metadata_col: AuthManifestImageMetadataCollection,
}

#[cfg(test)]
mod test {
use crate::{AuthManifestPreamble, AUTH_MANIFEST_PREAMBLE_SIZE};
use zerocopy::AsBytes;

#[test]
fn test_auth_preamble_size() {
assert_eq!(
AUTH_MANIFEST_PREAMBLE_SIZE,
AuthManifestPreamble::default().as_bytes().len()
);
}
}
2 changes: 1 addition & 1 deletion common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub use pcr::{PcrLogEntry, PcrLogEntryId, RT_FW_CURRENT_PCR, RT_FW_JOURNEY_PCR};
pub const FMC_ORG: u32 = 0x40000000;
pub const FMC_SIZE: u32 = 21 * 1024;
pub const RUNTIME_ORG: u32 = FMC_ORG + FMC_SIZE;
pub const RUNTIME_SIZE: u32 = 100 * 1024;
pub const RUNTIME_SIZE: u32 = 128 * 1024;

pub use memory_layout::{DATA_ORG, FHT_ORG, FHT_SIZE, MAN1_ORG};
pub use wdt::{restart_wdt, start_wdt, stop_wdt, WdtTimeout};
Loading