Attention is currently required from: Zheng Bao. Hello Zheng Bao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/59368
to review the following change.
Change subject: amdfwtool: copy ......................................................................
amdfwtool: copy
Change-Id: Id447b7c93f6d54329cccfa16940eec8a7ebda5bd Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M util/amdfwtool/amdfwtool.c 1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/59368/1
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 2163a7d..c9a43ba 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -701,7 +701,7 @@ ish->pl2_location = BUFF_TO_RUN_MODE(*ctx, pspdir2, 1); ish->boot_priority = 0xFFFFFFFF; ish->update_retry_count = 0xf; - ish->glitch_retry_count = 0; + ish->glitch_retry_count = 0xffffff00; ish->psp_id = get_psp_id(soc_id); ish->checksum = fletcher32(&ish->boot_priority, sizeof(ish_directory_table) - sizeof(uint32_t)); @@ -710,7 +710,7 @@ ish->pl2_location = BUFF_TO_RUN_MODE(*ctx, pspdir2, 1); ish->boot_priority = 0x2; ish->update_retry_count = 0xf; - ish->glitch_retry_count = 0; + ish->glitch_retry_count = 0xffffff00; ish->psp_id = get_psp_id(soc_id); ish->checksum = fletcher32(&ish->boot_priority, sizeof(ish_directory_table) - sizeof(uint32_t)); @@ -1466,7 +1466,7 @@ char *tmp; char *rom = NULL; embedded_firmware *amd_romsig; - psp_directory_table *pspdir = NULL; + psp_directory_table *pspdir = NULL, *pspdir_copy = NULL; psp_directory_table *pspdir2 = NULL; psp_directory_table *pspdir2_b = NULL; int comboable = 0; @@ -1833,6 +1833,10 @@ pspdir = new_psp_dir(&ctx, cb_config.multi_level); integrate_psp_firmwares(&ctx, pspdir, pspdir2, pspdir2_b, amd_psp_fw_table, PSP_COOKIE, soc_id, &cb_config); + if (cb_config.recovery_ab) { + pspdir_copy = new_psp_dir(&ctx, cb_config.multi_level); + memcpy (pspdir_copy, pspdir, 0x30); /* TODO */ + } } else { /* flat: PSP 1 cookie and no pointer to 2nd table */ pspdir = new_psp_dir(&ctx, cb_config.multi_level); @@ -1840,6 +1844,7 @@ amd_psp_fw_table, PSP_COOKIE, soc_id, &cb_config); }
+ //amd_romsig->reserved_2Ch = BUFF_TO_RUN(ctx, pspdir_copy); //TODO: if (comboable) amd_romsig->combo_psp_directory = BUFF_TO_RUN(ctx, pspdir); else