summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2022-08-25 12:52:13 -0600
committerPaul Fagerburg <pfagerburg@chromium.org>2022-09-23 14:55:21 +0000
commit35aa4355c411b2d5fa8062c8a29949b806c03445 (patch)
tree5637b449f99e50fa347bdbae4ec1d6518de69d20 /src/soc
parentaae7d4d5c8b6aae666a0bf1a4ff50c7555b89ac4 (diff)
soc/amd/mendocino: Add svc_set_fw_hash_table
Add new PSP svc call to pass psp firmware hash table to the PSP. psp_verstage will verify hash table and then pass them to the PSP. The PSP will check if signed firmware contents match these hashes. This will prevent anyone replacing signed firmware in the RW region. BUG=b:203597980 TEST=Build and boot to OS in Skyrim. Change-Id: I512d359967eae925098973e90250111d6f59dd39 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67259 Reviewed-by: Robert Zieba <robertzieba@google.com> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/mendocino/psp_verstage/svc.c10
-rw-r--r--src/soc/amd/mendocino/psp_verstage/svc.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/src/soc/amd/mendocino/psp_verstage/svc.c b/src/soc/amd/mendocino/psp_verstage/svc.c
index ad52b6f394..99fcc5769e 100644
--- a/src/soc/amd/mendocino/psp_verstage/svc.c
+++ b/src/soc/amd/mendocino/psp_verstage/svc.c
@@ -204,3 +204,13 @@ uint32_t svc_set_platform_boot_mode(enum chrome_platform_boot_mode boot_mode)
SVC_CALL2(SVC_VERSTAGE_CMD, CMD_SET_PLATFORM_BOOT_MODE, (void *)&param, retval);
return retval;
}
+
+uint32_t svc_set_fw_hash_table(struct psp_fw_hash_table *hash_table)
+{
+ uint32_t retval = 0;
+ struct cmd_param_set_fw_hash_table param = {
+ .ptr_psp_fw_hash_table = hash_table,
+ };
+ SVC_CALL2(SVC_VERSTAGE_CMD, CMD_SET_FW_HASH_TABLE, (void *)&param, retval);
+ return retval;
+}
diff --git a/src/soc/amd/mendocino/psp_verstage/svc.h b/src/soc/amd/mendocino/psp_verstage/svc.h
index 941fa763a8..354d89a2aa 100644
--- a/src/soc/amd/mendocino/psp_verstage/svc.h
+++ b/src/soc/amd/mendocino/psp_verstage/svc.h
@@ -141,4 +141,8 @@ struct cmd_param_set_platform_boot_mode {
uint32_t boot_mode;
};
+struct cmd_param_set_fw_hash_table {
+ struct psp_fw_hash_table *ptr_psp_fw_hash_table;
+};
+
#endif /* PSP_VERSTAGE_SVC_H */