From 72c38c9b1d3c7730ee51dbf4c75c954e72c0a177 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 11 Jan 2023 19:12:20 -0700 Subject: 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 Change-Id: I22e45e26f599a0b4f0b781e9b97fccb68e2e5cc1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71852 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/soc/amd/mendocino/psp_verstage/chipset.c | 5 ----- src/soc/amd/mendocino/psp_verstage/svc.c | 10 ++++++++++ src/soc/amd/mendocino/psp_verstage/svc.h | 4 ++++ 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src/soc/amd') 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 *)¶m, 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 */ -- cgit v1.2.3