Skip to content

UefiPayloadPkg: add coreboot CFR setup support#12869

Open
Sean-StarLabs wants to merge 8 commits into
tianocore:masterfrom
StarLabsLtd:agent/upstream-cfr
Open

UefiPayloadPkg: add coreboot CFR setup support#12869
Sean-StarLabs wants to merge 8 commits into
tianocore:masterfrom
StarLabsLtd:agent/upstream-cfr

Conversation

@Sean-StarLabs

@Sean-StarLabs Sean-StarLabs commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Expose coreboot CFR settings through the UefiPayload HII setup menu.

The series includes the current coreboot format: root versioning, numeric limits, dependencies, runtime variable attributes and runtime-apply records. CFR trees are validated before HOB creation, and malformed HII configuration strings return errors instead of relying on debug assertions.

Runtime-accessible numeric settings are also published in the volatile CorebootCfrSettings variable so operating-system tools can discover their limits and runtime-apply method. Metadata construction fails closed instead of publishing a partial table.

  • Breaking change?
  • Impacts security?
  • Includes tests?

How This Was Tested

PatchCheck.py passed for all eight commits.

An X64 DEBUG UefiPayloadPkg build passed with GCC using the coreboot bootloader target.

On StarFighter MTL, CorebootCfrSettings reported the runtime kbl_timeout setting and fwupd changed it in S0.

Integration Instructions

N/A

Sean-StarLabs and others added 6 commits July 23, 2026 14:16
Add a driver and helper library that expose coreboot CFR settings
through HII. Parse the CFR coreboot table into form HOBs and create
the matching variables.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Add the coreboot CFR version field and reject records using an
incompatible format.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
Use the minimum, maximum, step and display format supplied by
coreboot when creating numeric HII options.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
Use coreboot's non-reflected CRC32 implementation when checking CFR
records.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
Translate coreboot dependency values into HII conditions so dependent
settings are only shown when their parent has a matching value.

Honor the inactive and runtime flags used by current coreboot CFR data.

Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Rewrite existing CFR variables when their volatile or runtime flags
change so the stored value keeps the attributes advertised by coreboot.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Validate record sizes, strings and child ordering before creating CFR
HOBs. Reject malformed data instead of relying on debug assertions.

Handle runtime-apply records, use coreboot's varchar child order and
return errors for invalid HII configuration strings.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Publish a volatile EFI variable describing runtime CFR options so OS
tools can discover and apply them.

Test=StarFighter MTL exposed CorebootCfrSettings. fwupd changed
kbl_timeout in S0.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
@github-actions github-actions Bot added impact:security This change has a direct security impact such as changing a crypto algorithm. impact:testing This contribution includes tests such as unit and/or integration tests. labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:security This change has a direct security impact such as changing a crypto algorithm. impact:testing This contribution includes tests such as unit and/or integration tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants