From 948c0b7947115d2c743cf9d8e073af358622c6e8 Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Thu, 11 May 2023 10:03:46 +0800 Subject: amdfwtool: Set the minimum size of entry PSPL2 A/B This is a PSP FW requirement. This is only for recovery A/B without ISH header. That means only Cezanne. Change-Id: I62616d5a866f66fc71e6c0b31a23c62dc11cf3c6 Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/75161 Tested-by: build bot (Jenkins) Reviewed-by: Martin L Roth --- util/amdfwtool/amdfwtool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util/amdfwtool') diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 4d821bdf76..93f7c8759a 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -897,9 +897,10 @@ static void integrate_psp_ab(context *ctx, psp_directory_table *pspdir, BUFF_TO_RUN_MODE(*ctx, pspdir2, AMD_ADDR_REL_BIOS); pspdir->entries[count].address_mode = SET_ADDR_MODE(pspdir, AMD_ADDR_REL_BIOS); - pspdir->entries[count].size = pspdir2->header.num_entries * + pspdir->entries[count].size = _MAX(TABLE_ALIGNMENT, + pspdir2->header.num_entries * sizeof(psp_directory_entry) + - sizeof(psp_directory_header); + sizeof(psp_directory_header)); } count++; -- cgit v1.2.3