Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68119 )
Change subject: util/amdfwtool: Add new types ......................................................................
util/amdfwtool: Add new types
These are used on newer platforms.
Change-Id: I20dc77fb6f83dc813e3da5fe30f8f52068fc4662 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M util/amdfwtool/amdfwtool.c M util/amdfwtool/amdfwtool.h M util/amdfwtool/data_parse.c 3 files changed, 73 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/68119/1
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index d482fa4..76d24c1 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -246,6 +246,7 @@ { .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 @@ { .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 @@ { .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 @@ { .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 81f0bfb..cd36085 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -17,6 +17,7 @@ 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 @@ 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 @@ 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 @@ 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 424a68a..63ef923 100644 --- a/util/amdfwtool/data_parse.c +++ b/util/amdfwtool/data_parse.c @@ -331,6 +331,45 @@ } 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 */