summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2023-01-11 19:12:20 -0700
committerFelix Held <felix-coreboot@felixheld.de>2023-02-13 14:51:11 +0000
commit72c38c9b1d3c7730ee51dbf4c75c954e72c0a177 (patch)
tree898ff3c76c573c1caf0365e330e8d6883c9f998f
parent1a4440cba833f8cf292ee9bac6b4679d1f4234bf (diff)
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>
-rw-r--r--src/soc/amd/mendocino/psp_verstage/chipset.c5
-rw-r--r--src/soc/amd/mendocino/psp_verstage/svc.c10
-rw-r--r--src/soc/amd/mendocino/psp_verstage/svc.h4
-rw-r--r--src/vendorcode/amd/fsp/mendocino/include/bl_uapp/bl_syscall_public.h1
4 files changed, 15 insertions, 5 deletions
diff --git a/src/soc/amd/mendocino/psp_verstage/chipset.c b/src/soc/amd/mendocino/psp_verstage/chipset.c
index 7572756b2d..cb2c27ec4e 100644
--- a/src/soc/amd/mendocino/psp_verstage/chipset.c
+++ b/src/soc/amd/mendocino/psp_verstage/chipset.c
@@ -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",
diff --git a/src/soc/amd/mendocino/psp_verstage/svc.c b/src/soc/amd/mendocino/psp_verstage/svc.c
index ccb60777ba..53d1751535 100644
--- a/src/soc/amd/mendocino/psp_verstage/svc.c
+++ b/src/soc/amd/mendocino/psp_verstage/svc.c
@@ -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;
diff --git a/src/soc/amd/mendocino/psp_verstage/svc.h b/src/soc/amd/mendocino/psp_verstage/svc.h
index 437591cef9..67977b69bd 100644
--- a/src/soc/amd/mendocino/psp_verstage/svc.h
+++ b/src/soc/amd/mendocino/psp_verstage/svc.h
@@ -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 */
diff --git a/src/vendorcode/amd/fsp/mendocino/include/bl_uapp/bl_syscall_public.h b/src/vendorcode/amd/fsp/mendocino/include/bl_uapp/bl_syscall_public.h
index 88ab1f1e92..d09f39cec1 100644
--- a/src/vendorcode/amd/fsp/mendocino/include/bl_uapp/bl_syscall_public.h
+++ b/src/vendorcode/amd/fsp/mendocino/include/bl_uapp/bl_syscall_public.h
@@ -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 {