diff options
Diffstat (limited to 'util/amdfwtool/amdfwtool.h')
-rw-r--r-- | util/amdfwtool/amdfwtool.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index 6b13edcb79..fd04064f46 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -275,14 +275,52 @@ typedef struct _ish_directory_table { #define PSP_BOTH_AB (PSP_LVL1_AB | PSP_LVL2_AB) 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; uint64_t dest; size_t size; int level; uint64_t other; + /* If the binary is signed and the tool is invoked to keep the signed binaries separate, + then this field is populated with the offset of the concerned PSP binary (relative to + BIOS or PSP Directory table). */ + uint64_t addr_signed; + uint32_t file_size; + /* Some files that don't have amd_fw_header have to be skipped from hashing. These files + include but not limited to: *iKek*, *.tkn, *.stkn */ + bool skip_hashing; } amd_fw_entry; +/* Most PSP binaries, if not all, have the following header format. */ +struct amd_fw_header { + uint8_t reserved_0[20]; + uint32_t fw_size_signed; + uint8_t reserved_18[24]; + /* 1 if the image is signed, 0 otherwise */ + uint32_t sig_opt; + uint32_t sig_id; + uint8_t sig_param[16]; + uint32_t comp_opt; + uint8_t reserved_4c[4]; + uint32_t uncomp_size; + uint32_t comp_size; + /* Starting MDN fw_id is populated instead of fw_type. */ + uint16_t fw_id; + uint8_t reserved_5a[18]; + uint32_t size_total; + uint8_t reserved_70[12]; + /* Starting MDN fw_id is populated instead of fw_type. fw_type will still be around + for backwards compatibility. */ + uint8_t fw_type; + uint8_t fw_subtype; + uint8_t fw_subprog; + uint8_t reserved_7f; + uint8_t reserved_80[128]; +} __packed; + typedef struct _amd_cb_config { bool have_whitelist; bool unlock_secure; |