Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/78280?usp=email )
(
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: amdfwtool: Change&Record the current table in integration function ......................................................................
amdfwtool: Change&Record the current table in integration function
Align with the function integrating PSP FWs. And it is the integration function's responsibility.
TEST=Identical test on all AMD platforms
Change-Id: I1a98614f3a5756a462b01085e9565b52cf9a9343 Signed-off-by: Zheng Bao fishbaozi@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/78280 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M util/amdfwtool/amdfwtool.c 1 file changed, 4 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 0e18fe3..e81059d 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -1088,7 +1088,6 @@ ptr = BUFF_CURRENT(*ctx); ((bios_directory_hdr *) ptr)->additional_info = 0; ((bios_directory_hdr *) ptr)->additional_info_fields.address_mode = ctx->address_mode; - ctx->current_table = ctx->current; adjust_current_pointer(ctx, sizeof(bios_directory_hdr) + MAX_BIOS_ENTRIES * sizeof(bios_directory_entry), 1); @@ -1179,6 +1178,7 @@ int apob_idx; uint32_t size; uint64_t source; + uint32_t current_table_save;
/* This function can create a primary table, a secondary table, or a * flattened table which contains all applicable types. These if-else @@ -1196,6 +1196,8 @@ else level = BDT_BOTH;
+ current_table_save = ctx->current_table; + ctx->current_table = (char *)biosdir - ctx->rom; adjust_current_pointer(ctx, 0, TABLE_ALIGNMENT);
for (i = 0, count = 0; fw_table[i].type != AMD_BIOS_INVALID; i++) { @@ -1396,6 +1398,7 @@ }
fill_dir_header(biosdir, count, cookie, ctx, cb_config); + ctx->current_table = current_table_save; }
static int set_efs_table(uint8_t soc_id, amd_cb_config *cb_config,