diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2023-07-13 11:11:04 -0600 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2023-08-04 20:49:55 +0000 |
commit | 24b522709132d542386eb71e684ed13f42bf1fdc (patch) | |
tree | 21f90a0e2af4f4efc31eb3d60ea7d3c5098c9c51 /util/amdfwtool/amdfwtool.h | |
parent | 71d60ce506941cec2965e609627759fce43f5fe9 (diff) |
util/amdfwtool: Support multiple firmware identifier types
Currently this tool generates a hash table to verify signed binaries,
with a 2 byte FWID as the only kind of identifier. Going forward some
binaries are going to adopt 16 byte UUID identifiers and more binaries
will follow in the future SoCs. Hence add support for handling multiple
firmware identifier types. While at this remove the unused fwid from the
PSP FW table.
BUG=b:277292697
TEST=Build BIOS image and boot to OS in Myst & Skyrim.
Change-Id: I5180dc0fe812b174b1d40fea9f00a85d6ef00f2f
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76585
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util/amdfwtool/amdfwtool.h')
-rw-r--r-- | util/amdfwtool/amdfwtool.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index 24e48eb6ec..aa5a98a131 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -330,6 +330,11 @@ typedef struct _ish_directory_table { #define PSP_BOTH (PSP_LVL1 | PSP_LVL2) #define PSP_BOTH_AB (PSP_LVL1_AB | PSP_LVL2_AB) +typedef enum _fwid_type { + FWID_TYPE_FWID = 0, + FWID_TYPE_UUID, +} fwid_type_t; + typedef struct _amd_fw_entry_hash { uint16_t fw_id; uint16_t subtype; @@ -339,9 +344,6 @@ typedef struct _amd_fw_entry_hash { typedef struct _amd_fw_entry { amd_fw_type type; - /* Mendocino and later SoCs use fw_id instead of fw_type. fw_type is still around - for backwards compatibility. fw_id can be populated from the PSP binary file. */ - uint16_t fw_id; char *filename; uint8_t subprog; uint8_t inst; @@ -358,6 +360,7 @@ typedef struct _amd_fw_entry { include but not limited to: *iKek*, *.tkn, *.stkn */ bool skip_hashing; uint8_t hash_tbl_id; + fwid_type_t fwid_type; uint32_t num_hash_entries; amd_fw_entry_hash *hash_entries; bool generate_manifest; |