Maximilian Brune has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84373?usp=email )
Change subject: util/amdfwtool: Add binaries ......................................................................
util/amdfwtool: Add binaries
Change-Id: I78d7a9dba71de557e0a9a885d8561eea1f4191ef Signed-off-by: Maximilian Brune maximilian.brune@9elements.com --- M util/amdfwtool/amdfwtool.c M util/amdfwtool/amdfwtool.h M util/amdfwtool/data_parse.c 3 files changed, 130 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/84373/1
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 7f17b71..22a641e 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -171,13 +171,13 @@ .generate_manifest = true }, { .type = AMD_FW_PSP_SMU_FIRMWARE, .subprog = 1, .level = PSP_BOTH | PSP_LVL2_AB }, { .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_PSP_SECURED_DEBUG, .level = PSP_LVL2 | PSP_LVL2_AB, .skip_hashing = true }, + { .type = AMD_FW_PSP_TEEIPKEY, .subprog = 0, .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 }, - { .type = AMD_FW_PSP_SMU_FIRMWARE2, .level = PSP_BOTH | PSP_LVL2_AB }, + { .type = AMD_FW_PSP_SMU_FIRMWARE2, .subprog = 0, .level = PSP_BOTH | PSP_LVL2_AB }, { .type = AMD_FW_PSP_SMU_FIRMWARE2, .subprog = 1, .level = PSP_BOTH | PSP_LVL2_AB }, { .type = AMD_FW_PSP_SMU_FIRMWARE2, .subprog = 2, .level = PSP_BOTH | PSP_LVL2_AB }, { .type = AMD_BOOT_DRIVER, .level = PSP_BOTH | PSP_LVL2_AB }, @@ -187,6 +187,7 @@ { .type = AMD_DEBUG_UNLOCK, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_HW_IPCFG, .subprog = 0, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_HW_IPCFG, .subprog = 1, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_HW_IPCFG, .subprog = 2, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_WRAPPED_IKEK, .level = PSP_BOTH | PSP_LVL2_AB, .skip_hashing = true }, { .type = AMD_TOKEN_UNLOCK, .level = PSP_BOTH | PSP_LVL2_AB }, { .type = AMD_SEC_GASKET, .subprog = 0, .level = PSP_BOTH | PSP_LVL2_AB }, @@ -226,7 +227,8 @@ { .type = AMD_FW_SPL, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_DMCU_ERAM, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_DMCU_ISR, .level = PSP_LVL2 | PSP_LVL2_AB }, - { .type = AMD_FW_MSMU, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_MSMU, .subprog=0, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_MSMU, .subprog=1, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_SPIROM_CFG, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_MPIO, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_PSP_SMUSCS, .level = PSP_BOTH | PSP_LVL2_AB }, @@ -235,6 +237,7 @@ .generate_manifest = true }, { .type = AMD_RIB, .subprog = 0, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_RIB, .subprog = 1, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_RIB, .subprog = 2, .level = PSP_LVL2 | PSP_LVL2_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 }, @@ -242,18 +245,32 @@ { .type = AMD_FW_AMF_SRAM, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_AMF_DRAM, .inst = 0, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_AMF_DRAM, .inst = 1, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_MFD_MPM, .inst = 0, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_MFD_MPM, .inst = 1, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_FCFG_TABLE, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_AMF_WLAN, .inst = 0, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_AMF_WLAN, .inst = 1, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_AMF_WLAN, .inst = 2, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_AMF_WLAN, .inst = 3, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_AMF_MFD, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_TA_IKEK, .level = PSP_BOTH | PSP_LVL2_AB, .skip_hashing = true }, - { .type = AMD_FW_MPCCX, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_MPCCX, .subprog=0, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_MPCCX, .subprog=1, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_LSDMA, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_C20_MP, .level = PSP_BOTH | PSP_LVL2_AB }, - { .type = AMD_FW_MINIMSMU, .inst = 0, .level = PSP_BOTH | PSP_LVL2_AB }, - { .type = AMD_FW_MINIMSMU, .inst = 1, .level = PSP_BOTH | PSP_LVL2_AB }, + { .type = AMD_FW_MINIMSMU, .subprog = 0, .level = PSP_BOTH | PSP_LVL2_AB }, + { .type = AMD_FW_MINIMSMU, .subprog = 1, .level = PSP_BOTH | PSP_LVL2_AB }, + { .type = AMD_FW_GFXIMU_0, .subprog = 0, .level = PSP_BOTH | PSP_LVL2_AB }, + { .type = AMD_FW_GFXIMU_0, .subprog = 1, .level = PSP_BOTH | PSP_LVL2_AB }, + { .type = AMD_FW_GFXIMU_1, .subprog = 0, .level = PSP_BOTH | PSP_LVL2_AB }, + { .type = AMD_FW_GFXIMU_1, .subprog = 1, .level = PSP_BOTH | PSP_LVL2_AB }, + { .type = AMD_FW_GFXIMU_2, .level = PSP_BOTH | PSP_LVL2_AB }, { .type = AMD_FW_SRAM_FW_EXT, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_UMSMU, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_S3IMG, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_USBDP, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_USBSS, .level = PSP_LVL2 | PSP_LVL2_AB }, + { .type = AMD_FW_USB4, .level = PSP_LVL2 | PSP_LVL2_AB }, { .type = AMD_FW_INVALID }, };
@@ -302,7 +319,8 @@ { .type = AMD_BIOS_APOB, .level = BDT_BOTH }, { .type = AMD_BIOS_BIN, .reset = 1, .copy = 1, .zlib = 1, .inst = 0, .level = BDT_BOTH }, - { .type = AMD_BIOS_APOB_NV, .level = BDT_LVL2 }, + { .type = AMD_BIOS_APOB_NV, .level = BDT_BOTH }, + { .type = AMD_BIOS_NV_ST, .level = BDT_BOTH }, { .type = AMD_BIOS_PMUI, .inst = 1, .subpr = 0, .level = BDT_BOTH }, { .type = AMD_BIOS_PMUD, .inst = 1, .subpr = 0, .level = BDT_BOTH }, { .type = AMD_BIOS_PMUI, .inst = 2, .subpr = 0, .level = BDT_BOTH }, @@ -351,14 +369,14 @@ { .type = AMD_BIOS_PMUD, .inst = 12, .subpr = 1, .level = BDT_BOTH }, { .type = AMD_BIOS_PMUI, .inst = 13, .subpr = 1, .level = BDT_BOTH }, { .type = AMD_BIOS_PMUD, .inst = 13, .subpr = 1, .level = BDT_BOTH }, - { .type = AMD_BIOS_UCODE, .inst = 0, .level = BDT_LVL2 }, + { .type = AMD_BIOS_UCODE, .inst = 0, .level = BDT_BOTH }, { .type = AMD_BIOS_UCODE, .inst = 1, .level = BDT_LVL2 }, { .type = AMD_BIOS_UCODE, .inst = 2, .level = BDT_LVL2 }, { .type = AMD_BIOS_UCODE, .inst = 3, .level = BDT_LVL2 }, { .type = AMD_BIOS_UCODE, .inst = 4, .level = BDT_LVL2 }, { .type = AMD_BIOS_UCODE, .inst = 5, .level = BDT_LVL2 }, { .type = AMD_BIOS_UCODE, .inst = 6, .level = BDT_LVL2 }, - { .type = AMD_BIOS_MP2_CFG, .level = BDT_LVL2 }, + { .type = AMD_BIOS_MP2_CFG, .level = BDT_BOTH }, { .type = AMD_BIOS_PSP_SHARED_MEM, .inst = 0, .level = BDT_BOTH }, { .type = AMD_BIOS_INVALID }, }; diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h index f87fbf5..de4a075 100644 --- a/util/amdfwtool/amdfwtool.h +++ b/util/amdfwtool/amdfwtool.h @@ -46,6 +46,7 @@ AMD_FW_PSP_TRUSTLETKEY = 0x0d, AMD_FW_PSP_SMU_FIRMWARE2 = 0x12, AMD_DEBUG_UNLOCK = 0x13, + AMD_FW_PSP_TEEIPKEY = 0x15, AMD_BOOT_DRIVER = 0x1b, AMD_SOC_DRIVER = 0x1c, AMD_DEBUG_DRIVER = 0x1d, @@ -97,6 +98,7 @@ AMD_RIB = 0x76, AMD_FW_AMF_SRAM = 0x85, AMD_FW_AMF_DRAM = 0x86, + AMD_FW_MFD_MPM = 0x87, AMD_FW_AMF_WLAN = 0x88, AMD_FW_AMF_MFD = 0x89, AMD_FW_MPDMA_TF = 0x8c, @@ -108,8 +110,15 @@ AMD_FW_C20_MP = 0x95, AMD_FW_FCFG_TABLE = 0x98, AMD_FW_MINIMSMU = 0x9a, + AMD_FW_GFXIMU_0 = 0x9b, + AMD_FW_GFXIMU_1 = 0x9c, + AMD_FW_GFXIMU_2 = 0x9d, AMD_FW_SRAM_FW_EXT = 0x9d, AMD_FW_UMSMU = 0xa2, + AMD_FW_S3IMG = 0xa0, + AMD_FW_USBDP = 0xa4, + AMD_FW_USBSS = 0xa5, + AMD_FW_USB4 = 0xa6, AMD_FW_IMC = 0x200, /* Large enough to be larger than the top BHD entry type. */ AMD_FW_GEC, AMD_FW_XHCI, @@ -131,6 +140,7 @@ AMD_BIOS_EARLY_VGA = 0x69, AMD_BIOS_MP2_CFG = 0x6a, AMD_BIOS_PSP_SHARED_MEM = 0x6b, + AMD_BIOS_NV_ST = 0x6d, AMD_BIOS_L2_PTR = 0x70, AMD_BIOS_INVALID, AMD_BIOS_SKIP diff --git a/util/amdfwtool/data_parse.c b/util/amdfwtool/data_parse.c index 64ec4d7..0fda1af 100644 --- a/util/amdfwtool/data_parse.c +++ b/util/amdfwtool/data_parse.c @@ -206,6 +206,9 @@ } else if (strcmp(fw_name, "PSP_HW_IPCFG_FILE_SUB1") == 0) { fw_type = AMD_HW_IPCFG; subprog = 1; + } else if (strcmp(fw_name, "PSP_HW_IPCFG_FILE_SUB2") == 0) { + fw_type = AMD_HW_IPCFG; + subprog = 2; } else if (strcmp(fw_name, "PSP_SMUFW1_SUB1_FILE") == 0) { fw_type = AMD_FW_PSP_SMU_FIRMWARE; subprog = 1; @@ -218,6 +221,9 @@ } else if (strcmp(fw_name, "PSP_SMUFW2_SUB1_FILE") == 0) { fw_type = AMD_FW_PSP_SMU_FIRMWARE2; subprog = 1; + } else if (strcmp(fw_name, "PSP_TEEIPKEY_FILE") == 0) { + fw_type = AMD_FW_PSP_TEEIPKEY; + subprog = 0; } else if (strcmp(fw_name, "PSP_SMUFW2_SUB2_FILE") == 0) { fw_type = AMD_FW_PSP_SMU_FIRMWARE2; subprog = 2; @@ -295,6 +301,9 @@ } else if (strcmp(fw_name, "PSP_IKEK_FILE") == 0) { fw_type = AMD_WRAPPED_IKEK; subprog = 0; + } else if (strcmp(fw_name, "PSP_IKEK_FILE_UNSECURE") == 0) { + fw_type = AMD_WRAPPED_IKEK; + subprog = 0; } else if (strcmp(fw_name, "PSP_SECG0_FILE") == 0) { fw_type = AMD_SEC_GASKET; subprog = 0; @@ -339,6 +348,14 @@ fw_type = AMD_FW_AMF_DRAM; subprog = 0; instance = 1; + } else if (strcmp(fw_name, "MFD_MPM_TEE_INS0") == 0) { + fw_type = AMD_FW_MFD_MPM; + subprog = 0; + instance = 0; + } else if (strcmp(fw_name, "MFD_MPM_TEE_INS1") == 0) { + fw_type = AMD_FW_MFD_MPM; + subprog = 0; + instance = 1; } else if (strcmp(fw_name, "AMF_WLAN_FILE_INS0") == 0) { fw_type = AMD_FW_AMF_WLAN; subprog = 0; @@ -347,12 +364,23 @@ fw_type = AMD_FW_AMF_WLAN; subprog = 0; instance = 1; + } else if (strcmp(fw_name, "AMF_WLAN_FILE_INS2") == 0) { + fw_type = AMD_FW_AMF_WLAN; + subprog = 0; + instance = 2; + } else if (strcmp(fw_name, "AMF_WLAN_FILE_INS3") == 0) { + fw_type = AMD_FW_AMF_WLAN; + subprog = 0; + instance = 3; } else if (strcmp(fw_name, "AMF_MFD_FILE") == 0) { fw_type = AMD_FW_AMF_MFD; subprog = 0; } else if (strcmp(fw_name, "MPCCX_FILE") == 0) { fw_type = AMD_FW_MPCCX; subprog = 0; + } else if (strcmp(fw_name, "MPCCX_FILE_SUB1_FILE") == 0) { + fw_type = AMD_FW_MPCCX; + subprog = 1; } else if (strcmp(fw_name, "LSDMA_FILE") == 0) { fw_type = AMD_FW_LSDMA; subprog = 0; @@ -360,6 +388,30 @@ fw_type = AMD_FW_MINIMSMU; instance = 0; subprog = 0; + } else if (strcmp(fw_name, "MINIMSMU_FILE_SUB1_FILE") == 0) { + fw_type = AMD_FW_MINIMSMU; + instance = 0; + subprog = 1; + } else if (strcmp(fw_name, "PSP_GFX_IMMU_FILE_0") == 0) { + fw_type = AMD_FW_GFXIMU_0; + instance = 0; + subprog = 0; + } else if (strcmp(fw_name, "PSP_GFX_IMMU_FILE_01") == 0) { + fw_type = AMD_FW_GFXIMU_0; + instance = 0; + subprog = 1; + } else if (strcmp(fw_name, "PSP_GFX_IMMU_FILE_1") == 0) { + fw_type = AMD_FW_GFXIMU_1; + instance = 0; + subprog = 0; + } else if (strcmp(fw_name, "PSP_GFX_IMMU_FILE_11") == 0) { + fw_type = AMD_FW_GFXIMU_1; + instance = 0; + subprog = 1; + } else if (strcmp(fw_name, "PSP_GFX_IMMU_FILE_2") == 0) { + fw_type = AMD_FW_GFXIMU_2; + instance = 0; + subprog = 0; } else if (strcmp(fw_name, "MINIMSMU_FILE_INS1") == 0) { fw_type = AMD_FW_MINIMSMU; instance = 1; @@ -414,6 +466,9 @@ } else if (strcmp(fw_name, "MSMU_FILE") == 0) { fw_type = AMD_FW_MSMU; subprog = 0; + } else if (strcmp(fw_name, "MSMU_FILE_SUB1_FILE") == 0) { + fw_type = AMD_FW_MSMU; + subprog = 1; } else if (strcmp(fw_name, "DMCUB_FILE") == 0) { fw_type = AMD_FW_DMCUB; subprog = 0; @@ -445,6 +500,18 @@ } else if (strcmp(fw_name, "UMSMU_FILE") == 0) { fw_type = AMD_FW_UMSMU; subprog = 0; + } else if (strcmp(fw_name, "PSP_S3_IMG") == 0) { + fw_type = AMD_FW_S3IMG; + subprog = 0; + } else if (strcmp(fw_name, "PSP_USB_DP") == 0) { + fw_type = AMD_FW_USBDP; + subprog = 0; + } else if (strcmp(fw_name, "PSP_USB_SS") == 0) { + fw_type = AMD_FW_USBSS; + subprog = 0; + } else if (strcmp(fw_name, "PSP_USB_4") == 0) { + fw_type = AMD_FW_USB4; + subprog = 0; } else if (strcmp(fw_name, "PSP_OEM_ABL_KEY_FILE") == 0) { fw_type = AMD_FW_ABL_PUBKEY; subprog = 0; @@ -469,6 +536,9 @@ } else if (strcmp(fw_name, "PSP_RIB_FILE_SUB1") == 0) { fw_type = AMD_RIB; subprog = 1; + } else if (strcmp(fw_name, "PSP_RIB_FILE_SUB2") == 0) { + fw_type = AMD_RIB; + subprog = 2; } else if (strcmp(fw_name, "FEATURE_TABLE_FILE") == 0) { fw_type = AMD_FW_FCFG_TABLE; subprog = 0; @@ -553,10 +623,32 @@ } else if (strcmp(fw_name, "PSP_MP2CFG_FILE") == 0) { if (cb_config->load_mp2_fw) { fw_type = AMD_BIOS_MP2_CFG; + } else if (strcmp(fw_name, "PSP_BDT_UCODE_INS0") == 0) { + fw_type = AMD_BIOS_UCODE; subprog = 0; + instance = 0; + } else if (strcmp(fw_name, "PSP_BDT_UCODE_INS1") == 0) { + fw_type = AMD_BIOS_UCODE; + subprog = 0; + instance = 1; } else { fw_type = AMD_BIOS_SKIP; } + } else if (strcmp(fw_name, "PSP_BDT_APCB_BK_INS0") == 0) { + fw_type = AMD_BIOS_APCB_BK; + subprog = 0; + instance = 0; + } else if (strcmp(fw_name, "PSP_BDT_APCB_BK_INS8") == 0) { + fw_type = AMD_BIOS_APCB_BK; + subprog = 0; + instance = 8; + } else if (strcmp(fw_name, "PSP_MP2CFG_FILE") == 0) { + fw_type = AMD_BIOS_MP2_CFG; + subprog = 0; + } else if (strcmp(fw_name, "PSP_BDT_BIOS_NV_ST") == 0) { + fw_type = AMD_BIOS_NV_ST; + subprog = 0; + instance = 0; } else { fw_type = AMD_BIOS_INVALID; }