Skip to content

Standardize logging - #48

Open
diondokter wants to merge 6 commits into
OpenDevicePartnership:mcxa-secure-bootfrom
diondokter:standardize-logging
Open

Standardize logging#48
diondokter wants to merge 6 commits into
OpenDevicePartnership:mcxa-secure-bootfrom
diondokter:standardize-logging

Conversation

@diondokter

Copy link
Copy Markdown
Member

Built on top of #47

I tried gh stack because it seems good for this, but apparently it doesn't support cross repo PRs?

@diondokter
diondokter requested a review from a team as a code owner September 8, 2026 08:29

if let Some(cmpa_rotkh) = load_rotkh_from_cmpa() {
parms.soc_RoTNVM.soc_rkh = cmpa_rotkh;
parms.soc_ro_tnvm.soc_rkh = cmpa_rotkh;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be rot_nvm

// Start as unused by default for safety; will be updated with real values from CMPA if read is successful.
soc_root_key_usage: [NbootRootKeyUsage::Unused; 4],
soc_root_key_type_and_length: NbootRootKeyType::EcdsaP384Mldsa87, //FIXED TO THIS because we are CNSA 2.0 compliant.
soc_lifecycle: 0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know these are supposed to be updated by real values, BUT 0 is not a valid LC state. It should be encoded as the default NBoot LC values (ideally production for a strict start)

@diondokter

Copy link
Copy Markdown
Member Author

@alamfarjadf you're reviewing changes from #47
Best to do that there. This PR includes those changes but builds on top of it and should be merged after 47

parms.soc_RoTNVM.soc_rkh_1.copy_from_slice(&pqc_rkth_words);
parms.soc_ro_tnvm.soc_rkh_1.copy_from_slice(&pqc_rkth_words);
} else {
verify_warn!("Production: image PQC RKTH differs; not copying, will not call verify");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to maintain the deinit call, without it the secure Ctx remains intact.


verify_error!("Auth failed with status {:?}: {:?}", status, boot_error);
Err(boot_error)
Ok(true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wouldn't we want to use the NXP Hamming bit pattern?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants