Attention is currently required from: Julius Werner, Zheng Bao.
Hello Zheng Bao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/85629?usp=email
to review the following change.
Change subject: cbfs: Add COREBOOTB as backup region for A/B recovery ......................................................................
cbfs: Add COREBOOTB as backup region for A/B recovery
Change-Id: I019af6fbeca46e0e35d739a028655051fb466b48 Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M src/lib/cbfs.c 1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/85629/1
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 03624bf..84ba894 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -19,6 +19,7 @@ #include <symbols.h> #include <thread.h> #include <timestamp.h> +#include <soc/amd/common/block/psp/psp_def.h>
#if ENV_X86 && (ENV_POSTCAR || ENV_SMM) struct mem_pool cbfs_cache = MEM_POOL_INIT(NULL, 0, 0); @@ -181,6 +182,8 @@ && vboot_logic_executed()) vboot_fail_and_reboot(vboot_get_context(), VB2_RECOVERY_FW_BODY, rv); + if (CONFIG(PSP_AB_RECOVERY)) + toggle_bootpartition(); return true; } } @@ -685,8 +688,12 @@ if (region_device_sz(&ro.rdev)) return &ro;
- if (fmap_locate_area_as_rdev("COREBOOT", &ro.rdev)) - die("Cannot locate primary CBFS"); + if (CONFIG(PSP_AB_RECOVERY)) { + abrecovery_locate_area_as_rdev(&ro.rdev); + } else { + if (fmap_locate_area_as_rdev("COREBOOT", &ro.rdev)) + die("Cannot locate primary CBFS"); + }
if (ENV_INITIAL_STAGE) { enum cb_err err = cbfs_init_boot_device(&ro, metadata_hash_get());