-
-
Notifications
You must be signed in to change notification settings - Fork 211
Add coreboot firmware settings UI #2197
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
Draft
Sean-StarLabs
wants to merge
1
commit into
linuxboot:master
Choose a base branch
from
StarLabsLtd:sean/heads-cfr-qemu-20260827
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Coreboot Firmware Settings | ||
|
|
||
| Heads can optionally show the standard Linux firmware-attributes interface | ||
| published by the coreboot CFR driver. The feature is disabled unless a board | ||
| sets `CONFIG_HEADS_CFR=y` in its board configuration. Its build-generated | ||
| `/etc/heads-cfr-enabled` marker is immutable at runtime, so `config.user` | ||
| cannot enable or disable the feature. | ||
|
|
||
| The UI reads only: | ||
|
|
||
| ```text | ||
| /sys/class/firmware-attributes/coreboot-cfr/attributes | ||
| ``` | ||
|
|
||
| It does not parse the coreboot table, access EFI variables or SMMSTORE, or | ||
| invoke an SMI. A board must therefore provide a kernel and firmware stack that | ||
| implements this standard interface before enabling the feature. | ||
|
|
||
| The current Heads Linux module supports the historical kernel tarballs, | ||
| including 6.1.8. A CFR board must not pretend that the v13 CFR driver works on | ||
| 6.1.8. For an interim CFR board, set both variables below to a git repository | ||
| and an exact commit: | ||
|
|
||
| ```make | ||
| export CONFIG_HEADS_CFR=y | ||
| export CONFIG_LINUX_REPO=https://github.com/REPLACE/linux.git | ||
| export CONFIG_LINUX_COMMIT=REPLACE_WITH_CFR_V13_COMMIT | ||
| export CONFIG_COREBOOT_REPO=https://github.com/REPLACE/coreboot.git | ||
| export CONFIG_COREBOOT_COMMIT=REPLACE_WITH_CFR_SERVICE_COMMIT | ||
| ``` | ||
|
|
||
| The generic modules fetch the exact revisions, check them out, and use the | ||
| board's normal configuration. Existing boards that only set | ||
| `CONFIG_LINUX_VERSION` and `CONFIG_COREBOOT_VERSION` continue to use their | ||
| verified sources unchanged. | ||
|
|
||
| An integration board may set `CONFIG_LINUX_CONFIG_FRAGMENT` to append a small | ||
| Kconfig fragment before `olddefconfig`, and | ||
| `CONFIG_COREBOOT_TOOLCHAIN_VERSION` to reuse a compatible, already-defined | ||
| coreboot toolchain. Existing boards that do not set these variables are | ||
| unchanged. | ||
|
|
||
| The settings menu is available under Options only when both the immutable | ||
| feature marker and the firmware-attributes class/device exist. Missing, | ||
| malformed, disappearing, or unwritable attributes are handled as unavailable | ||
| or read-only. Every selected write requires an explicit confirmation showing | ||
| the display name, current value, requested value, and pending-reboot status; | ||
| cancelling that confirmation does not write. | ||
|
|
||
| The Linux driver currently exposes writability through the `current_value` mode | ||
| and does not publish a `flags` attribute. The UI works with no `flags` files. | ||
| It tolerates an optional flags file for forward compatibility, hiding | ||
| `inactive`/`suppressed` entries and treating `readonly` as non-writable, but | ||
| that file is not part of the required ABI. Enumeration values use the standard | ||
| semicolon delimiter; labels containing spaces are preserved. A literal | ||
| semicolon cannot be represented unambiguously by that sysfs ABI and is rejected | ||
| rather than guessed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was wrong with the current way cbmem was built from Makefile into tools.cpio?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ideally, everything built for Heads tools.cpio should be Oz not O2