Attention is currently required from: Felix Held, Fred Reitberger, Jason Glenesk, Matt DeVillier, Zheng Bao.
Hello Zheng Bao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/85658?usp=email
to review the following change.
Change subject: CEZANNE:AB recovery: Add offsets for A/B to amdfwtool command line ......................................................................
CEZANNE:AB recovery: Add offsets for A/B to amdfwtool command line
Change-Id: Ib6a65b935b234df7a7b8d95c02694d2068da7a9f Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M src/soc/amd/cezanne/Kconfig M src/soc/amd/cezanne/Makefile.mk 2 files changed, 12 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/85658/1
diff --git a/src/soc/amd/cezanne/Kconfig b/src/soc/amd/cezanne/Kconfig index c6846a1..cd1cd07 100644 --- a/src/soc/amd/cezanne/Kconfig +++ b/src/soc/amd/cezanne/Kconfig @@ -410,7 +410,7 @@
config PSP_AB_RECOVERY bool "Use A/B Recovery scheme" - default n + default y help Enable the PSP A/B Recovery mechanism
diff --git a/src/soc/amd/cezanne/Makefile.mk b/src/soc/amd/cezanne/Makefile.mk index 3983aaa..7cc0cd9 100644 --- a/src/soc/amd/cezanne/Makefile.mk +++ b/src/soc/amd/cezanne/Makefile.mk @@ -48,6 +48,14 @@
CEZANNE_FW_B_POSITION=$(call int-add, \ $(call get_fmap_value,FMAP_SECTION_FW_MAIN_B_START) $(AMD_FW_AB_POSITION)) + +ifeq ($(CONFIG_PSP_AB_RECOVERY), y) +CEZANNE_FW_A_RECOVERY=$(call int-add, \ + $(call get_fmap_value,FMAP_SECTION_PARTITIION_START) 4096) +CEZANNE_FW_B_RECOVERY=$(call int-add, \ + $(call get_fmap_value,FMAP_SECTION_BCOPY_START) 4096) +endif + # # PSP Directory Table items # @@ -182,10 +190,12 @@ 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) +OPT_RECOVERY_AB=$(if $(CONFIG_PSP_AB_RECOVERY), --recovery-ab) OPT_BIOS_AMDCOMPRESS=$(if $(CONFIG_CBFS_VERIFICATION), --elfcopy, --compress) OPT_BIOS_FWCOMPRESS=$(if $(CONFIG_CBFS_VERIFICATION), --bios-bin-uncomp)
+OPT_RECOVERY_AB+=$(if $(CONFIG_PSP_AB_RECOVERY), --recovery-a-location $(call _tohex, $(CEZANNE_FW_A_RECOVERY)) --recovery-b-location $(call _tohex, $(CEZANNE_FW_B_RECOVERY))) + AMDFW_COMMON_ARGS=$(OPT_PSP_APCB_FILES) \ $(OPT_PSP_NVRAM_BASE) \ $(OPT_PSP_NVRAM_SIZE) \