summaryrefslogtreecommitdiff
path: root/src/vendorcode/amd
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2023-07-14 16:56:04 -0600
committerMartin L Roth <gaumless@gmail.com>2023-08-04 20:52:20 +0000
commit2c828436a7ac491cc97294b5c94d319ef822b7a3 (patch)
treecd0d8b79567691d43dc5bca6c86ad2e058d7cb1c /src/vendorcode/amd
parent97e57cfd51578dee7d3e29d5e39f31855294ed4e (diff)
soc/amd/phoenix: Add SVC call to inject v2 hash tables
On mainboards using Phoenix SoC with PSP verstage enabled, to accommodate growing number of PSP binaries, multiple smaller hash tables are introduced. Also some hash tables are in V2 format identifying the concerned PSP binaries using UUID. Add SVC calls to support multiple hash tables with different versions. BUG=b:277292697 TEST=Build and boot to OS in Myst with PSP verstage enabled. Ensure that all the hash tables are injected successfully. Ensure that PSP validated all the signed PSP binaries using the injected hash tables successfully. Change-Id: I64e1b1af55cb95067403e89da4fb31bec704cd4f Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76588 Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/vendorcode/amd')
-rw-r--r--src/vendorcode/amd/fsp/phoenix/include/bl_uapp/bl_syscall_public.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/vendorcode/amd/fsp/phoenix/include/bl_uapp/bl_syscall_public.h b/src/vendorcode/amd/fsp/phoenix/include/bl_uapp/bl_syscall_public.h
index 623762ad0e..b3e41404e8 100644
--- a/src/vendorcode/amd/fsp/phoenix/include/bl_uapp/bl_syscall_public.h
+++ b/src/vendorcode/amd/fsp/phoenix/include/bl_uapp/bl_syscall_public.h
@@ -60,6 +60,9 @@ enum verstage_cmd_id {
CMD_GET_PREV_BOOT_STATUS,
CMD_GET_HSP_SECURE_STATE,
CMD_WRITE_POSTCODE,
+ CMD_SET_FW_HASH_TABLE_STAGE1,
+ CMD_SET_FW_HASH_TABLE_STAGE2,
+ CMD_SET_FW_HASH_TABLE_TOS,
};
struct mod_exp_params {
@@ -178,13 +181,32 @@ struct psp_fw_entry_hash_384 {
} __packed;
struct psp_fw_hash_table {
- uint16_t version; // Version of psp_fw_hash_table, Start with 0.
+ uint16_t version; // Version 1 of psp_fw_hash_table.
uint16_t no_of_entries_256;
uint16_t no_of_entries_384;
struct psp_fw_entry_hash_256 *fw_hash_256;
struct psp_fw_entry_hash_384 *fw_hash_384;
} __packed;
+struct psp_fw_entry_hash_256_v2 {
+ uint8_t uuid[16];
+ uint8_t sha[32];
+} __packed;
+
+struct psp_fw_entry_hash_384_v2 {
+ uint8_t uuid[16];
+ uint8_t sha[48];
+} __packed;
+
+struct psp_fw_hash_table_v2 {
+ uint16_t version; // Version 2 of psp_fw_hash_table.
+ uint16_t no_of_entries_256;
+ uint16_t no_of_entries_384;
+ uint16_t reserved; // For alignment purposes.
+ struct psp_fw_entry_hash_256_v2 *fw_hash_256;
+ struct psp_fw_entry_hash_384_v2 *fw_hash_384;
+} __packed;
+
/*
* Exit to the main Boot Loader. This does not return back to user application.
*
@@ -372,14 +394,15 @@ uint32_t svc_ccp_dma(uint32_t spi_rom_offset, void *dest, uint32_t size);
uint32_t svc_set_platform_boot_mode(enum chrome_platform_boot_mode boot_mode);
/*
- * Set the PSP FW hash table.
+ * Set PSP FW hash table.
*
* Parameters:
* - hash_table - Table of hash for each PSP binary signed against SoC chain of trust
+ * - cmd - Cmd to indicate the PSP stage using the hash table
*
* Return value: BL_OK or error code
*/
-uint32_t svc_set_fw_hash_table(struct psp_fw_hash_table *hash_table);
+uint32_t svc_set_fw_hash_table(enum verstage_cmd_id cmd, void *hash_table);
/* Get the previous boot status.
*