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>
This commit is contained in:
Karthikeyan Ramasubramanian 2022-08-25 12:52:13 -06:00 committed by Paul Fagerburg
commit 35aa4355c4
3 changed files with 45 additions and 0 deletions

View file

@ -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;
}

View file

@ -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 */