Add coreboot firmware settings UI - #2197
Draft
Sean-StarLabs wants to merge 1 commit into
Draft
Conversation
Sean-StarLabs
force-pushed
the
sean/heads-cfr-qemu-20260827
branch
from
August 27, 2026 12:33
d5714d0 to
5532cdc
Compare
Sean-StarLabs
marked this pull request as ready for review
August 27, 2026 12:33
Sean-StarLabs
force-pushed
the
sean/heads-cfr-qemu-20260827
branch
from
August 27, 2026 12:37
5532cdc to
e0e5127
Compare
Sean-StarLabs
marked this pull request as draft
August 27, 2026 12:47
Sean-StarLabs
force-pushed
the
sean/heads-cfr-qemu-20260827
branch
from
August 27, 2026 13:24
e0e5127 to
173735a
Compare
Sean-StarLabs
marked this pull request as ready for review
August 27, 2026 13:24
Sean-StarLabs
force-pushed
the
sean/heads-cfr-qemu-20260827
branch
from
August 27, 2026 14:08
173735a to
138bc8e
Compare
Heads has no setup browser for settings described by coreboot CFR. Without a payload UI, users must boot another operating system or carry product-specific policy outside firmware to change an otherwise supported setting. Expose firmware settings through the Linux firmware-attributes ABI when a board explicitly enables CFR support. Validate firmware-provided metadata, confirm every write, and report reboot-required updates. Allow boards to pin exact Linux and coreboot revisions so CFR support can be integrated without changing existing release-based builds. Add a host UI fixture for malformed, read-only, disappearing, and cancelled settings. Link: https://patchew.org/linux/cover.1787003659.git.sean@starlabs.systems/ Link: https://review.coreboot.org/q/topic:heads-cfr-settings TEST=On a Star Labs StarBook Horizon, Heads enumerated the writable Bluetooth setting, changed it from Enabled to Disabled through the confirmation flow, and immediately read back Disabled. Reboot persistence was not tested. Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Sean-StarLabs
force-pushed
the
sean/heads-cfr-qemu-20260827
branch
from
August 27, 2026 14:34
138bc8e to
dbf0213
Compare
Sean-StarLabs
added a commit
to StarLabsLtd/coreboot
that referenced
this pull request
Aug 27, 2026
CFR describes firmware settings, but non-UEFI payloads such as Heads do not have a firmware setup browser or an EFI runtime service that can safely coordinate persistence and immediate hardware application. The Linux CFR firmware-attributes backend therefore needs a bounded firmware transaction rather than direct variable writes plus a second, non-atomic apply request. Allocate one firmware-owned CBMEM mailbox and expose typed GET and compare-and-set transactions through SMM. Persist and read back the value, verify optional runtime application, roll back both states on failure, and fault later writes if recovery becomes indeterminate. Exact request retries return the cached result without applying twice. Qubes already carries product-specific dom0 policy where platform behavior is otherwise unavailable to the OS. The linked display patch does not consume CFR, but is a concrete example of the board-specific workarounds this generic settings path is intended to avoid for options that coreboot does describe. Link: https://patchew.org/linux/cover.1787003659.git.sean@starlabs.systems/ Link: linuxboot/heads#2197 Link: QubesOS/qubes-core-admin-linux#222 TEST=On a Star Labs StarBook Horizon, Heads enumerated the writable Bluetooth setting, changed it from Enabled to Disabled, and immediately read back Disabled. Reboot persistence was not tested. Change-Id: I8d5ff6d4c7b7df548bdb0288a51bdde627dec7ac Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Sean-StarLabs
added a commit
to StarLabsLtd/coreboot
that referenced
this pull request
Aug 27, 2026
CFR describes firmware settings, but non-UEFI payloads such as Heads do not have a firmware setup browser or an EFI runtime service that can safely coordinate persistence and immediate hardware application. The Linux CFR firmware-attributes backend therefore needs a bounded firmware transaction rather than direct variable writes plus a second, non-atomic apply request. Allocate one firmware-owned CBMEM mailbox and expose typed GET and compare-and-set transactions through SMM. Persist and read back the value, verify optional runtime application, roll back both states on failure, and fault later writes if recovery becomes indeterminate. Exact request retries return the cached result without applying twice. Qubes already carries product-specific dom0 policy where platform behavior is otherwise unavailable to the OS. The linked display patch does not consume CFR, but is a concrete example of the board-specific workarounds this generic settings path is intended to avoid for options that coreboot does describe. Link: https://patchew.org/linux/cover.1787003659.git.sean@starlabs.systems/ Link: linuxboot/heads#2197 Link: QubesOS/qubes-core-admin-linux#222 TEST=On a Star Labs StarBook Horizon, Heads enumerated the writable Bluetooth setting, changed it from Enabled to Disabled, and immediately read back Disabled. Reboot persistence was not tested. Change-Id: I8d5ff6d4c7b7df548bdb0288a51bdde627dec7ac Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Sean-StarLabs
marked this pull request as draft
August 27, 2026 15:29
tlaurion
reviewed
Aug 27, 2026
| $(if $(COREBOOT_UTIL_CFLAGS),CFLAGS="$(COREBOOT_UTIL_CFLAGS)") \ | ||
| ) | ||
|
|
||
| $(COREBOOT_UTIL_DIR)/cbmem/cbmem: COREBOOT_UTIL_CFLAGS := \ |
Collaborator
There was a problem hiding this comment.
What was wrong with the current way cbmem was built from Makefile into tools.cpio?
Collaborator
There was a problem hiding this comment.
Also ideally, everything built for Heads tools.cpio should be Oz not O2
tlaurion
requested changes
Aug 27, 2026
tlaurion
left a comment
Collaborator
There was a problem hiding this comment.
Just glanced through, will try to make time to review thoroughly in the next days
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Functional validation
The production UI entry point passes the host sysfs fixture while running as root, including writable-mode changes, malformed data, disappearing settings, cancelled confirmation, write failures, and fbwhiptail cursor-control output.
On a Star Labs StarBook Horizon with the matching coreboot atomic CFR service and Linux driver, Heads enumerated the writable Bluetooth setting and changed it from Enabled to Disabled through the confirmation flow. The refreshed menu immediately read back and displayed Disabled.
Reboot persistence was not exercised on physical hardware. The QEMU integration fixture has been dropped from this branch.