Skip to content

Commit 68cc0d2

Browse files
committed
[runtime] Start recovery flow in the runtime
This stubs out the recovery flow in the runtime. We also update the DMA peripheral so that it can be used as a `ureg::Mmio`, which will allow us to use the autogenerated I3C recovery register interface instead of hardcoding offsets. We also had to modify `ureg` slightly to remove the unused `impl Uint` for `u64` (because we don't don't support 64-bit AXI transfers) and add a `from_u32()` method for the (unused) `u8` and `u16` implementations. This builds on #1867 and rewrites it to use the updated DMA interface.
1 parent 91adef8 commit 68cc0d2

File tree

13 files changed

+508
-199
lines changed

13 files changed

+508
-199
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/src/mailbox.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ impl CommandId {
5555
// The download firmware from recovery interface command.
5656
pub const RI_DOWNLOAD_FIRMWARE: Self = Self(0x5249_4644); // "RIFD"
5757

58-
// The get IDevID CSR command.
59-
pub const GET_IDEV_CSR: Self = Self(0x4944_4352); // "IDCR"
58+
// The get IDevID ECC CSR command.
59+
pub const GET_IDEV_ECC_CSR: Self = Self(0x4944_4352); // "IDCR"
6060
}
6161

6262
impl From<u32> for CommandId {

auth-manifest/types/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use zeroize::Zeroize;
2424

2525
pub const AUTH_MANIFEST_MARKER: u32 = 0x4154_4D4E;
2626
pub const AUTH_MANIFEST_IMAGE_METADATA_MAX_COUNT: usize = 127;
27+
pub const AUTH_MANIFEST_PREAMBLE_SIZE: usize = 7168;
2728

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

188189
pub image_metadata_col: AuthManifestImageMetadataCollection,
189190
}
191+
192+
#[cfg(test)]
193+
mod test {
194+
use crate::{AuthManifestPreamble, AUTH_MANIFEST_PREAMBLE_SIZE};
195+
use zerocopy::AsBytes;
196+
197+
#[test]
198+
fn test_auth_preamble_size() {
199+
assert_eq!(
200+
AUTH_MANIFEST_PREAMBLE_SIZE,
201+
AuthManifestPreamble::default().as_bytes().len()
202+
);
203+
}
204+
}

common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub use pcr::{PcrLogEntry, PcrLogEntryId, RT_FW_CURRENT_PCR, RT_FW_JOURNEY_PCR};
4141
pub const FMC_ORG: u32 = 0x40000000;
4242
pub const FMC_SIZE: u32 = 21 * 1024;
4343
pub const RUNTIME_ORG: u32 = FMC_ORG + FMC_SIZE;
44-
pub const RUNTIME_SIZE: u32 = 100 * 1024;
44+
pub const RUNTIME_SIZE: u32 = 128 * 1024;
4545

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

0 commit comments

Comments
 (0)