11# Introduction to Intel Top Swap A/B Redundancy for coreboot
22
3- The problem addressed by this functionality is that when a platform's firmware
4- crashes during the boot process, the only mode of recovery is usually taking
5- apart the platform, attaching a SPI clip and flashing recovery firmware as per
6- our recovery guides ([ example] ( https://docs.dasharo.com/unified/protectli/recovery/ ) ).
7-
8- With the Top Swap A/B redundancy, there are two firmware slots - A and B,
9- of which A is a read-only golden copy, and B is the update partition. A
10- firmware update is going to target the B slot, and boot from it. Should the new
11- firmware fail, the platform can be brought back to life by performing a
12- ** CMOS reset** , which will cause the platform to boot from the safe slot A
13- again.
3+ The problem addressed by this functionality is that when a
4+ platform's firmware crashes during the boot process, the only mode
5+ of recovery is usually taking apart the platform, attaching an
6+ SPI clip and flashing recovery firmware as per our recovery guides
7+ ([ example] ( https://docs.dasharo.com/unified/protectli/recovery/ ) ).
8+
9+ With the Top Swap A/B redundancy, there are two firmware slots - ** A** and
10+ ** B** , of which ** A** is a read-only golden copy, and ** B** is the update
11+ partition. A firmware update is going to target the ** B** slot, and boot from
12+ it. Should the new firmware fail, the platform can be brought back to life by
13+ performing a ** CMOS reset** , which will cause the platform to boot from the safe
14+ slot ** A** again.
1415
1516This should significantly reduce the friction of testing the firmware,
1617especially during development and at early beta stages.
@@ -21,23 +22,23 @@ especially during development and at early beta stages.
2122physically topmost chunks of the BIOS flash chip, and decide in which order
2223to map them - effectively allowing to swap the two chunks.
2324
24- * ** A/B Slot Setup** : The firmware is divided into two slots: ` BOOTBLOCK ` and
25- ` TOPSWAP ` , which contain bootblocks "chosen" by the Top Swap mechanism. They
26- in turn choose ` COREBOOT ` and ` COREBOOT_TS ` regions correspondingly to load
27- consecutive stages from.
25+ * ** A/B Slot Setup** : The top of the firmware is divided into two slots:
26+ ` BOOTBLOCK ` and ` TOPSWAP ` , which contain bootblocks "chosen" by the Top
27+ Swap mechanism. They in turn choose ` COREBOOT ` and ` COREBOOT_TS ` regions
28+ correspondingly to load consecutive stages from.
2829
2930* ** Runtime CMOS Control** : The CMOS option ` attempt_slot_b ` controls the Top
3031Swap state, also enabling users to manually select the active slot by setting
3132this value via nvramtool. If the option is set, the platform will attempt
32- booting slot B .
33+ booting slot ** B ** .
3334
3435## Updating Firmware with Flashrom
3536
3637If you wish to update the firmware using Flashrom, you need to follow
3738these additional steps:
3839
3940``` bash
40- sudo flashrom -w coreboot.rom --fmap -i TOPSWAP -i COREBOOT_TS
41+ sudo flashrom -p internal - w coreboot.rom --fmap -i TOPSWAP -i COREBOOT_TS --noverify-all
4142sudo nvramtool -w attempt_slot_b=Enable
4243```
4344
@@ -49,4 +50,4 @@ reboot, the system will boot from the newly updated slot.
4950## Further reading
5051
5152For a more detailed documentation of the implementation, please read the
52- [ upstream coreboot documentation] ( WIP.com )
53+ [ upstream coreboot documentation] ( WIP.com ) .
0 commit comments