soc/amd/mendocino: Add svc_write_postcode call instead of stub

To assist in debugging, add a way for PSP_verstage to send postcodes to
the system.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I22e45e26f599a0b4f0b781e9b97fccb68e2e5cc1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71852
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Martin Roth 2023-01-11 19:12:20 -07:00 committed by Felix Held
parent 1a4440cba8
commit 72c38c9b1d
4 changed files with 15 additions and 5 deletions

View File

@ -104,11 +104,6 @@ int platform_set_sha_op(enum vb2_hash_algorithm hash_alg,
* These functions should be replaced with proper implementations later.
*/
uint32_t svc_write_postcode(uint32_t postcode)
{
return 0;
}
void platform_report_mode(int developer_mode_enabled)
{
printk(BIOS_INFO, "Reporting %s mode\n",

View File

@ -162,6 +162,16 @@ uint32_t svc_reset_system(enum reset_type reset_type)
return retval;
}
uint32_t svc_write_postcode(uint32_t postcode)
{
uint32_t retval = 0;
struct cmd_param_postcode param = {
.postcode = postcode,
};
SVC_CALL2(SVC_VERSTAGE_CMD, CMD_WRITE_POSTCODE, (void *)&param, retval);
return retval;
}
uint32_t svc_crypto_sha(struct sha_generic_data *sha_op, enum sha_operation_mode sha_mode)
{
uint32_t retval = 0;

View File

@ -102,4 +102,8 @@ struct cmd_param_get_hsp_secure_state {
unsigned int hsp_secure_state;
};
struct cmd_param_postcode {
uint32_t postcode;
};
#endif /* PSP_VERSTAGE_SVC_H */

View File

@ -57,6 +57,7 @@ enum verstage_cmd_id {
CMD_SET_FW_HASH_TABLE,
CMD_GET_PREV_BOOT_STATUS,
CMD_GET_HSP_SECURE_STATE,
CMD_WRITE_POSTCODE,
};
struct mod_exp_params {