summaryrefslogtreecommitdiff
path: root/src/soc/amd/mendocino
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2022-12-22 12:01:01 -0700
committerMartin L Roth <gaumless@gmail.com>2023-01-15 02:22:48 +0000
commit8420ccc6e96de717581409c64eb740563bf7c9f3 (patch)
treec0f61bfad342a0e5ed1aef0e0a7b178df1ffa7b9 /src/soc/amd/mendocino
parent683e43dbc6e21232eeca98f7a7eccbd2ac8a646a (diff)
vc/amd/*,soc/amd/*: Add SVC call to get HSP Secure State
Add an SVC call to get the state of Hardware Security Processor (HSP) in AMD SoCs. This SVC call will be used from PSP verstage to get and report HSP state. BUG=b:198711349 TEST=Build Skyrim BIOS image and boot to OS. Ensure that the HSP state is read and reported in the firmware logs. Change-Id: I7fe3363d308a80cc09e6bdadd8d0bb1d67f7d2bf Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71207 Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/mendocino')
-rw-r--r--src/soc/amd/mendocino/psp_verstage/svc.c9
-rw-r--r--src/soc/amd/mendocino/psp_verstage/svc.h4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/soc/amd/mendocino/psp_verstage/svc.c b/src/soc/amd/mendocino/psp_verstage/svc.c
index e28aa3c57f..ccb60777ba 100644
--- a/src/soc/amd/mendocino/psp_verstage/svc.c
+++ b/src/soc/amd/mendocino/psp_verstage/svc.c
@@ -225,3 +225,12 @@ uint32_t svc_get_prev_boot_status(uint32_t *boot_status)
SVC_CALL2(SVC_VERSTAGE_CMD, CMD_GET_PREV_BOOT_STATUS, (void *)&param, retval);
return retval;
}
+
+uint32_t svc_get_hsp_secure_state(uint32_t *hsp_secure_state)
+{
+ uint32_t retval = 0;
+ struct cmd_param_get_hsp_secure_state param;
+ SVC_CALL2(SVC_VERSTAGE_CMD, CMD_GET_HSP_SECURE_STATE, (void *)&param, retval);
+ *hsp_secure_state = param.hsp_secure_state;
+ return retval;
+}
diff --git a/src/soc/amd/mendocino/psp_verstage/svc.h b/src/soc/amd/mendocino/psp_verstage/svc.h
index 0dc9fb699e..437591cef9 100644
--- a/src/soc/amd/mendocino/psp_verstage/svc.h
+++ b/src/soc/amd/mendocino/psp_verstage/svc.h
@@ -98,4 +98,8 @@ struct cmd_param_get_prev_boot_status {
unsigned int *ptr_boot_status;
};
+struct cmd_param_get_hsp_secure_state {
+ unsigned int hsp_secure_state;
+};
+
#endif /* PSP_VERSTAGE_SVC_H */