summaryrefslogtreecommitdiff
path: root/util/amdfwtool/amdfwtool.c
diff options
context:
space:
mode:
authorZheng Bao <fishbaozi@gmail.com>2023-05-11 10:03:46 +0800
committerFelix Held <felix-coreboot@felixheld.de>2023-05-24 12:24:28 +0000
commit948c0b7947115d2c743cf9d8e073af358622c6e8 (patch)
treed28b7efb9358de798eee430cbfbf5ef4f855bf02 /util/amdfwtool/amdfwtool.c
parent4f154a2dd323cc05dfc8708686539340acd6962b (diff)
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 <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75161 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util/amdfwtool/amdfwtool.c')
-rw-r--r--util/amdfwtool/amdfwtool.c5
1 files changed, 3 insertions, 2 deletions
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++;