Skip to content

Formalize the IFR - #49

Merged
jerrysxie merged 34 commits into
OpenDevicePartnership:mcxa-secure-bootfrom
diondokter:ifr
Oct 13, 2026
Merged

jerrysxie merged 34 commits into
OpenDevicePartnership:mcxa-secure-bootfrom
diondokter:ifr

Conversation

@diondokter

@diondokter diondokter commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Closes #43

This PR gets rid of a lot of code and replaces it with:

  • A typed model of the IFR using bitbybit
  • A sort of builder for IFR provisioning

@diondokter

Copy link
Copy Markdown
Member Author

Oh, are we ok with increasing the MSRV to 1.95?

@diondokter
diondokter marked this pull request as ready for review September 28, 2026 12:41
@diondokter
diondokter requested a review from a team as a code owner September 28, 2026 12:41
@diondokter

Copy link
Copy Markdown
Member Author

Ok, status:

  • The bootloader can set the initial config
  • The NXP tooling is fighting me very hard, so I haven't had it boot to a signed image, but I think that's because my image is not signed correctly
  • I can't really test the rest of the provisioning since I don't have that code. But the provisioning now is a builder pattern. All functionality should be the same, you just have to migrate to the builder

@diondokter diondokter left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Some pointers to help with review

Comment thread libs/mcxa-ifr/src/lib.rs
Comment thread libs/mcxa-security-provisioning/src/lib.rs
Comment thread examples/mcxa-577app/bootloader/src/main.rs
Comment thread libs/ec-slimloader-mcxa/src/verification.rs
RobertZ2011
RobertZ2011 previously approved these changes Oct 1, 2026

@felipebalbi felipebalbi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we get miri in CI at the same time?

Comment thread libs/mcxa-ifr/src/lib.rs
Comment thread libs/mcxa-security-provisioning/src/lib.rs
Comment thread libs/mcxa-security-provisioning/src/lib.rs
Comment thread libs/ec-slimloader-mcxa/src/lifecycle.rs
Comment thread libs/ec-slimloader-mcxa/src/verification.rs Outdated
Comment thread libs/mcxa-security-provisioning/src/lib.rs
Comment thread libs/mcxa-security-provisioning/src/lib.rs
@alamfarjadf

Copy link
Copy Markdown

You can have the CFPA provisioned but CMPA left alone. On a dev unit, you will skip the initial provision step if anyone ever configures ACL settings (or any other CFPA bits) but leaves CMPA alone.

I think we should also check that CMPA header is 0xFFFF_FFFF along with CFPA page version 0xFFFF_FFFF.

Comment thread libs/ec-slimloader-mcxa/src/verification.rs Outdated
@alamfarjadf

Copy link
Copy Markdown

Will the basic fusing /secure boot status helper functions make a comeback? Those would be helpful to expose to the application side (e.g. Is MCU fused? Hybrid SB tuned on? etc.)

@diondokter

Copy link
Copy Markdown
Member Author

I did add check_production_settings in the provisioning builder that does those checks. The application can call that during the provisioning process

@diondokter

diondokter commented Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

TODO:

Only go into dev mode when the development lifecycle is active AND secure boot is not enabled.
This allows people to turn on secure boot and then find out if their hashes are wrong

@diondokter

Copy link
Copy Markdown
Member Author

Ok, as discussed, the last extra check got in

Comment thread libs/ec-slimloader-mcxa/src/verification.rs Outdated
@alamfarjadf

Copy link
Copy Markdown

You can have the CFPA provisioned but CMPA left alone. On a dev unit, you will skip the initial provision step if anyone ever configures ACL settings (or any other CFPA bits) but leaves CMPA alone.

I think we should also check that CMPA header is 0xFFFF_FFFF along with CFPA page version 0xFFFF_FFFF.

@diondokter last open item I believe.

Comment thread libs/mcxa-ifr/src/lib.rs Outdated
@diondokter

Copy link
Copy Markdown
Member Author

CI seems to be failing due to a rust bug: rust-lang/rust#164093

@felipebalbi

Copy link
Copy Markdown
Contributor

@jerrysxie, this PR is ready. We need one more approval and a bypass because the "doc" failure is a known rustc regression.

@alamfarjadf

Copy link
Copy Markdown

#49 is all set! Thank you!

@jerrysxie
jerrysxie merged commit 86e5815 into OpenDevicePartnership:mcxa-secure-boot Oct 13, 2026
8 of 9 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in EC Oct 13, 2026
@diondokter
diondokter deleted the ifr branch October 13, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants