coreboot/util/amdfwtool
Zheng Bao 8a0d68d804 amdfwtool: Set entry address mode based on current table header
The address field of each PSP or BIOS entry defines the location of
the entry.
For the family newer than Cezanne, the upper 2 bits define the address
mode. In table header, the address mode of the table is set. They have
the same definition.
  Address Mode 0: Physical Address
  Address Mode 1: Relative Address to entire BIOS image
  Address Mode 2: Relative Address to PSP/BIOS directory
  Address Mode 3: Relative Address to slot N

In common case, the address mode of entry should be the same as its
table. In spec, it says, "attribute is ignored if the directory
address mode is not 2 or 3",
In the old code, if the header defines address mode as relative BIOS(1),
the entry address mode is not set. That meets the spec. PSP doesn't
use, but amdfwtool can use it to record the address mode and transfer
it to table. That can reduce the code complexity.

Identidal binary test passes on platforms which are not based on
Cezanne, V2000A, Genoa. Booting test passes on Majolica/Cezanne.

Change-Id: I156b315d350d9e7217afc7442ca80277bb7f9095
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84530
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-02-14 16:51:15 +00:00
..
.gitignore util/amdfwtool: Add amdfwread utility 2022-05-13 15:51:37 +00:00
amdfwread.c util/amdfwtool/amdfwread: List AMDFW RO binary entries 2022-10-26 15:56:18 +00:00
amdfwtool.c amdfwtool: Set entry address mode based on current table header 2025-02-14 16:51:15 +00:00
amdfwtool.h amdfwtool: Add PSP backup directory for A/B recovery 2024-09-13 14:17:06 +00:00
data_parse.c amdfwtool: Add combo new layout for new family 2024-09-12 12:57:35 +00:00
description.md util: Add description.md to each util 2018-07-26 13:26:50 +00:00
handle_file.c amdfwtool: Move the functions to handle_file.c 2024-03-04 14:50:53 +00:00
Makefile amdfwtool: Use Makefile.mk for Makefile settings 2024-02-29 02:24:09 +00:00
Makefile.mk amdfwtool: Move code related to getting options to a new file 2024-03-06 11:05:07 +00:00
opts.c util/amdfwtool: add support to specify RPMC NVRAM region 2024-08-08 17:41:09 +00:00
signed_psp.c util/amdfwtool: Introduce support for Hash Table v2 2023-08-04 20:51:53 +00:00