-
-
Notifications
You must be signed in to change notification settings - Fork 24
docs/guides/redundancy.md: add #1218
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a318775
docs/guides/redundancy.md: add
filipleple be7d71f
docs/guides/redundancy.md: review fixes
filipleple 781f8a4
docs/guides/redundancy.md: fix upstream docs link
filipleple 8356bed
docs/guides/redundancy.md: add note on link unavailibility
filipleple fe549b1
docs/guides/redundancy.md: remove broken link
filipleple 1216d0a
docs/guides/redundancy.md: swap _ and " in one place
SergiiDmytruk 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Introduction to Intel Top Swap A/B Redundancy for coreboot | ||
|
|
||
| The problem addressed by this functionality is that when a | ||
| platform's firmware crashes during the boot process, the only mode | ||
| of recovery is usually taking apart the platform, attaching an | ||
| SPI clip and flashing recovery firmware as per our recovery guides | ||
| ([example](https://docs.dasharo.com/unified/protectli/recovery/)). | ||
|
|
||
| With the Top Swap A/B redundancy, there are two firmware slots - **A** and | ||
| **B**, of which **A** is a read-only golden copy, and **B** is the update | ||
| partition. A firmware update is going to target the **B** slot, and boot from | ||
| it. Should the new firmware fail, the platform can be brought back to life by | ||
| performing a **CMOS reset**, which will cause the platform to boot from the safe | ||
| slot **A** again. | ||
|
|
||
| This should significantly reduce the friction of testing the firmware, | ||
| especially during development and at early beta stages. | ||
|
|
||
| ## How It Works | ||
|
|
||
| * **Top Swap Control**: The Intel Top Swap feature allows the PCH to take two | ||
| physically topmost chunks of the BIOS flash chip, and decide in which order | ||
| to map them - effectively allowing to swap the two chunks. | ||
|
|
||
| * **A/B Slot Setup**: The top of the firmware is divided into two slots: | ||
| `BOOTBLOCK` and `TOPSWAP`, which contain bootblocks "chosen" by the Top | ||
| Swap mechanism. They in turn choose `COREBOOT` and `COREBOOT_TS` regions | ||
| respectively to load consecutive stages from. | ||
|
|
||
| * **Runtime CMOS Control**: The CMOS option `attempt_slot_b` controls the Top | ||
| Swap state, also enabling users to manually select the active slot by setting | ||
| this value via nvramtool. If the option is set, the platform will attempt | ||
| booting slot **B**. | ||
|
|
||
| ## Updating Firmware with Flashrom | ||
|
|
||
| If you wish to update the firmware using Flashrom, you need to follow | ||
| these additional steps: | ||
|
|
||
| ```bash | ||
| sudo flashrom -p internal -w coreboot.rom --fmap -i TOPSWAP -i COREBOOT_TS --noverify-all | ||
| sudo nvramtool -w attempt_slot_b=Enable | ||
| ``` | ||
|
|
||
| This command sequence writes the new firmware image into the appropriate regions | ||
| (`TOPSWAP` and `COREBOOT_TS`) and enables the Top Swap feature by setting the | ||
| `attempt_slot_b` CMOS option to "Enable". This ensures that after the next | ||
| reboot, the system will boot from the newly updated slot. | ||
|
|
||
| ## Further reading | ||
|
|
||
| For a more detailed documentation of the implementation, please read the | ||
| [upstream coreboot documentation](https://doc.coreboot.org/soc/intel) | ||
| (_"doc.coreboot.org/soc/intel/redundancy.html"_, not yet available as of | ||
| February 25th 2026, can also be viewed | ||
| [here](https://github.com/coreboot/coreboot/blob/main/Documentation/soc/intel/redundancy.md)). |
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
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.