summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-10-04 17:50:21 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-11-11 00:40:22 +0000
commit1f05c8044e8943c5e2f958e95d6fa3fbe47c5a90 (patch)
treeccbeb5df051cb4c0a726e0cd4fb2e55ab47d80da
parente4404036830044c8b7ac68ec17ed2cc66890c10a (diff)
util/amdfwtool: Add new types
These are used on newer platforms. Change-Id: I20dc77fb6f83dc813e3da5fe30f8f52068fc4662 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68119 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
-rw-r--r--util/amdfwtool/amdfwtool.c12
-rw-r--r--util/amdfwtool/amdfwtool.h10
-rw-r--r--util/amdfwtool/data_parse.c39
3 files changed, 61 insertions, 0 deletions
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c
index 389be9f0bc..172a331d79 100644
--- a/util/amdfwtool/amdfwtool.c
+++ b/util/amdfwtool/amdfwtool.c
@@ -246,6 +246,7 @@ amd_fw_entry amd_psp_fw_table[] = {
{ .type = AMD_FW_PSP_SMU_FIRMWARE, .subprog = 2, .level = PSP_BOTH | PSP_LVL2_AB },
{ .type = AMD_FW_PSP_SECURED_DEBUG, .level = PSP_LVL2 | PSP_LVL2_AB,
.skip_hashing = true },
+ { .type = AMD_FW_ABL_PUBKEY, .level = PSP_BOTH | PSP_BOTH_AB },
{ .type = AMD_PSP_FUSE_CHAIN, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_FW_PSP_TRUSTLETS, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_FW_PSP_TRUSTLETKEY, .level = PSP_LVL2 | PSP_LVL2_AB },
@@ -264,6 +265,9 @@ amd_fw_entry amd_psp_fw_table[] = {
{ .type = AMD_MP2_FW, .subprog = 2, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_DRIVER_ENTRIES, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_FW_KVM_IMAGE, .level = PSP_LVL2 | PSP_LVL2_AB },
+ { .type = AMD_FW_MP5, .subprog = 0, .level = PSP_BOTH | PSP_BOTH_AB },
+ { .type = AMD_FW_MP5, .subprog = 1, .level = PSP_BOTH | PSP_BOTH_AB },
+ { .type = AMD_FW_MP5, .subprog = 2, .level = PSP_BOTH | PSP_BOTH_AB },
{ .type = AMD_S0I3_DRIVER, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_ABL0, .level = PSP_BOTH | PSP_LVL2_AB },
{ .type = AMD_ABL1, .level = PSP_BOTH | PSP_LVL2_AB },
@@ -273,8 +277,11 @@ amd_fw_entry amd_psp_fw_table[] = {
{ .type = AMD_ABL5, .level = PSP_BOTH | PSP_LVL2_AB },
{ .type = AMD_ABL6, .level = PSP_BOTH | PSP_LVL2_AB },
{ .type = AMD_ABL7, .level = PSP_BOTH | PSP_LVL2_AB },
+ { .type = AMD_SEV_DATA, .level = PSP_LVL2 | PSP_LVL2_AB },
+ { .type = AMD_SEV_CODE, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_FW_PSP_WHITELIST, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_VBIOS_BTLOADER, .level = PSP_BOTH | PSP_LVL2_AB },
+ { .type = AMD_FW_DXIO, .level = PSP_BOTH | PSP_BOTH_AB },
{ .type = AMD_FW_USB_PHY, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_FW_TOS_SEC_POLICY, .level = PSP_BOTH | PSP_LVL2_AB },
{ .type = AMD_FW_DRTM_TA, .level = PSP_LVL2 | PSP_LVL2_AB },
@@ -288,10 +295,15 @@ amd_fw_entry amd_psp_fw_table[] = {
{ .type = AMD_FW_DMCU_ISR, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_FW_MSMU, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_FW_SPIROM_CFG, .level = PSP_LVL2 | PSP_LVL2_AB },
+ { .type = AMD_FW_MPIO, .level = PSP_BOTH | PSP_BOTH_AB },
{ .type = AMD_FW_PSP_SMUSCS, .level = PSP_BOTH },
{ .type = AMD_FW_DMCUB, .level = PSP_LVL2 | PSP_LVL2_AB },
{ .type = AMD_FW_PSP_BOOTLOADER_AB, .level = PSP_LVL2 | PSP_LVL2_AB },
+ { .type = AMD_RIB, .level = PSP_BOTH | PSP_BOTH_AB },
+ { .type = AMD_FW_MPDMA_TF, .level = PSP_BOTH | PSP_BOTH_AB },
{ .type = AMD_TA_IKEK, .level = PSP_BOTH | PSP_LVL2_AB, .skip_hashing = true },
+ { .type = AMD_FW_GMI3_PHY, .level = PSP_BOTH | PSP_BOTH_AB },
+ { .type = AMD_FW_MPDMA_PM, .level = PSP_BOTH | PSP_BOTH_AB },
{ .type = AMD_FW_INVALID },
};
diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h
index 81f0bfbe9e..cd36085a50 100644
--- a/util/amdfwtool/amdfwtool.h
+++ b/util/amdfwtool/amdfwtool.h
@@ -17,6 +17,7 @@ typedef enum _amd_fw_type {
AMD_FW_PSP_RTM_PUBKEY = 0x05,
AMD_FW_PSP_SMU_FIRMWARE = 0x08,
AMD_FW_PSP_SECURED_DEBUG = 0x09,
+ AMD_FW_ABL_PUBKEY = 0x0a,
AMD_PSP_FUSE_CHAIN = 0x0b,
AMD_FW_PSP_TRUSTLETS = 0x0c,
AMD_FW_PSP_TRUSTLETKEY = 0x0d,
@@ -29,6 +30,7 @@ typedef enum _amd_fw_type {
AMD_MP2_FW = 0x25,
AMD_DRIVER_ENTRIES = 0x28,
AMD_FW_KVM_IMAGE = 0x29,
+ AMD_FW_MP5 = 0x2a,
AMD_S0I3_DRIVER = 0x2d,
AMD_ABL0 = 0x30,
AMD_ABL1 = 0x31,
@@ -38,9 +40,12 @@ typedef enum _amd_fw_type {
AMD_ABL5 = 0x35,
AMD_ABL6 = 0x36,
AMD_ABL7 = 0x37,
+ AMD_SEV_DATA = 0x38,
+ AMD_SEV_CODE = 0x39,
AMD_FW_PSP_WHITELIST = 0x3a,
AMD_VBIOS_BTLOADER = 0x3c,
AMD_FW_L2_PTR = 0x40,
+ AMD_FW_DXIO = 0x42,
AMD_FW_USB_PHY = 0x44,
AMD_FW_TOS_SEC_POLICY = 0x45,
AMD_FW_DRTM_TA = 0x47,
@@ -57,10 +62,15 @@ typedef enum _amd_fw_type {
AMD_FW_DMCU_ISR = 0x59,
AMD_FW_MSMU = 0x5a,
AMD_FW_SPIROM_CFG = 0x5c,
+ AMD_FW_MPIO = 0x5d,
AMD_FW_PSP_SMUSCS = 0x5f,
AMD_FW_DMCUB = 0x71,
AMD_FW_PSP_BOOTLOADER_AB = 0x73,
+ AMD_RIB = 0x76,
+ AMD_FW_MPDMA_TF = 0x8c,
AMD_TA_IKEK = 0x8d,
+ AMD_FW_GMI3_PHY = 0x91,
+ AMD_FW_MPDMA_PM = 0x92,
AMD_FW_IMC = 0x200, /* Large enough to be larger than the top BHD entry type. */
AMD_FW_GEC,
AMD_FW_XHCI,
diff --git a/util/amdfwtool/data_parse.c b/util/amdfwtool/data_parse.c
index 424a68a90c..17284c3a4e 100644
--- a/util/amdfwtool/data_parse.c
+++ b/util/amdfwtool/data_parse.c
@@ -331,6 +331,45 @@ static uint8_t find_register_fw_filename_psp_dir(char *fw_name, char *filename,
} else if (strcmp(fw_name, "TA_IKEK_FILE") == 0) {
fw_type = AMD_TA_IKEK;
subprog = 0;
+ } else if (strcmp(fw_name, "PSP_OEM_ABL_KEY_FILE") == 0) {
+ fw_type = AMD_FW_ABL_PUBKEY;
+ subprog = 0;
+ } else if (strcmp(fw_name, "PSP_MP5FW_SUB0_FILE") == 0) {
+ fw_type = AMD_FW_MP5;
+ subprog = 0;
+ } else if (strcmp(fw_name, "PSP_MP5FW_SUB1_FILE") == 0) {
+ fw_type = AMD_FW_MP5;
+ subprog = 1;
+ } else if (strcmp(fw_name, "PSP_MP5FW_SUB2_FILE") == 0) {
+ fw_type = AMD_FW_MP5;
+ subprog = 2;
+ } else if (strcmp(fw_name, "PSP_DXIOFW_FILE") == 0) {
+ fw_type = AMD_FW_DXIO;
+ subprog = 0;
+ } else if (strcmp(fw_name, "PSP_MPIOFW_FILE") == 0) {
+ fw_type = AMD_FW_MPIO;
+ subprog = 0;
+ } else if (strcmp(fw_name, "PSP_RIB_FILE") == 0) {
+ fw_type = AMD_RIB;
+ subprog = 0;
+ } else if (strcmp(fw_name, "PSP_MPDMATFFW_FILE") == 0) {
+ fw_type = AMD_FW_MPDMA_TF;
+ subprog = 0;
+ } else if (strcmp(fw_name, "PSP_GMI3PHYFW_FILE") == 0) {
+ fw_type = AMD_FW_GMI3_PHY;
+ subprog = 0;
+ } else if (strcmp(fw_name, "PSP_MPDMAPMFW_FILE") == 0) {
+ fw_type = AMD_FW_MPDMA_PM;
+ subprog = 0;
+ } else if (strcmp(fw_name, "PSP_TOKEN_UNLOCK_FILE") == 0) {
+ fw_type = AMD_TOKEN_UNLOCK;
+ subprog = 0;
+ } else if (strcmp(fw_name, "SEV_DATA_FILE") == 0) {
+ fw_type = AMD_SEV_DATA;
+ subprog = 0;
+ } else if (strcmp(fw_name, "SEV_CODE_FILE") == 0) {
+ fw_type = AMD_SEV_CODE;
+ subprog = 0;
} else {
fw_type = AMD_FW_INVALID;
/* TODO: Add more */