Repository navigation
Handle A/B images and refuse unread options - #1
Open
walterchris wants to merge 2 commits into
Open
walterchris wants to merge 2 commits into
walterchris wants to merge 2 commits into
Conversation
With AMD PSP A/B recovery or Intel Top Swap, coreboot builds the RO CBFS twice (COREBOOT, COREBOOT_B) and keeps the metadata hash anchors in the BOOTBLOCK and BOOTBLOCK_B regions. payload replace changed only COREBOOT, and the edit guard rejected the anchor update in BOOTBLOCK, so these images could not be changed at all. Replace the payload in both CBFS copies, let the CBFS commands change both copies and their BOOTBLOCK regions, and list COREBOOT_B in payload list and show. Tested on a Sapphire RAVE2 image (AMD Krackan, PSP A/B): both slots carry the new payload, both metadata hashes are valid and the board boots the new payload. Signed-off-by: Christian Walter <christian.walter@9elements.com>
option set and apply wrote an EDK2 variable store into SMMSTORE even when coreboot was built without CONFIG_USE_UEFI_VARIABLE_STORE, exited 0 and printed only a schema warning. Nothing reads that store, so the values had no effect. Fail instead when the image's build config is present and the option backend is not set. Signed-off-by: Christian Walter <christian.walter@9elements.com>
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.
payload replaceon images with a second RO CBFS (AMD PSP A/B recovery, Intel Top Swap): replaces the payload inCOREBOOTandCOREBOOT_Band updates both metadata hash anchors inBOOTBLOCK/BOOTBLOCK_B. Before, the edit guard refused these images.payload listandshowincludeCOREBOOT_B.option set/applyfail when the image's coreboot is built withoutCONFIG_USE_UEFI_VARIABLE_STORE, instead of writing a store nothing reads.Tests:
TestReplacePayloadAB,TestCommitOptionsNeedsBackend; unit, e2e and lint pass. Hardware: Sapphire RAVE2 (AMD Krackan, PSP A/B) boots an image with a replaced U-Boot payload, with CBFS verification on.