summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorZheng Bao <fishbaozi@gmail.com>2024-08-29 15:49:17 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-09-09 12:57:50 +0000
commitb23382c54b3f33133c12e2ce8fe826f306761b1d (patch)
treefe6ee31d6f4a23cb32c48148fa63d1f5e6d36da9 /src/soc
parent2c16092a21da83b89ea61b459eecc387966caf8c (diff)
soc/amd/cezanne: Add an option to enable A/B recovery scheme
Extracted from NDA spec #56995: "The A/B recovery scheme formally separates the SPI flash space into different partitions; a primary, “A” and secondary, “B”, which hold the same set of system firmware. Under this scheme, the partitions A and B can hold identical contents initially, but each partition can be updated individually. Normally the system boots from partition A, but if the A partition is found to be corrupted, the system will switch to partition B and boot. The OEM BIOS can then choose to continue the boot from partition B, or repair partition A using contents from partition B." The Cezanne platform supports both A/B recovery and no recovery method. It needs this flag passed to amdfwtool to enable the A/B recovery layout. Change-Id: Id1c8028faee9c544628d65fd77be2a378ed7eab6 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84195 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/cezanne/Kconfig6
-rw-r--r--src/soc/amd/cezanne/Makefile.mk3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/amd/cezanne/Kconfig b/src/soc/amd/cezanne/Kconfig
index abeaeceb79..7b97ce731a 100644
--- a/src/soc/amd/cezanne/Kconfig
+++ b/src/soc/amd/cezanne/Kconfig
@@ -408,6 +408,12 @@ config PSP_VERSTAGE_SIGNING_TOKEN
help
Add psp_verstage signature token to the build & PSP Directory Table
+config PSP_RECOVERY_AB
+ bool "Use A/B Recovery scheme"
+ default n
+ help
+ Enable the PSP A/B Recovery mechanism
+
endmenu
config VBOOT
diff --git a/src/soc/amd/cezanne/Makefile.mk b/src/soc/amd/cezanne/Makefile.mk
index adbf3a6d8e..2747622a47 100644
--- a/src/soc/amd/cezanne/Makefile.mk
+++ b/src/soc/amd/cezanne/Makefile.mk
@@ -182,6 +182,8 @@ OPT_PSP_SOFTFUSE=$(call add_opt_prefix, $(PSP_SOFTFUSE), --soft-fuse)
OPT_WHITELIST_FILE=$(call add_opt_prefix, $(PSP_WHITELIST_FILE), --whitelist)
OPT_SPL_TABLE_FILE=$(call add_opt_prefix, $(SPL_TABLE_FILE), --spl-table)
+OPT_RECOVERY_AB=$(call add_opt_prefix, $(CONFIG_PSP_RECOVERY_AB), --recovery-ab)
+
AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \
$(OPT_PSP_NVRAM_BASE) \
$(OPT_PSP_NVRAM_SIZE) \
@@ -204,6 +206,7 @@ AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \
$(OPT_EFS_SPI_READ_MODE) \
$(OPT_EFS_SPI_SPEED) \
$(OPT_EFS_SPI_MICRON_FLAG) \
+ $(OPT_RECOVERY_AB) \
--config $(CONFIG_AMDFW_CONFIG_FILE) \
--flashsize $(CONFIG_ROM_SIZE)