summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-07-30 15:24:08 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-07-31 20:07:17 +0000
commite6c40f62724c9d0157b5b102c01aade30bc4c47e (patch)
tree6b951d4eb3b2b44c136489a7b3098c218b670345 /src/soc/amd
parent9c366417dfca97cb3aacfaf684ceafc18d6419e6 (diff)
soc/amd/common/psp_smm: add comments to psp_notify_smm
The reasoning behind this and the positive side effects of this aren't too clear from the code, so point those out in a comment. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I4f4121031fc1ef600cdf5551f61f1ef4e03b56a5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83699 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/common/block/psp/psp_smm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/psp/psp_smm.c b/src/soc/amd/common/block/psp/psp_smm.c
index 114cf12add..eecdf02be7 100644
--- a/src/soc/amd/common/block/psp/psp_smm.c
+++ b/src/soc/amd/common/block/psp/psp_smm.c
@@ -47,6 +47,13 @@ static void clear_smm_flag(void)
smm_flag = 0;
}
+/*
+ * The MBOX_BIOS_CMD_SMM_INFO PSP mailbox command doesn't necessarily need be sent from SMM,
+ * but doing so allows the linker to sort out the addresses of c2p_buffer, p2c_buffer and
+ * smm_flag without us needing to pass this info between ramstage and smm. In the PSP gen2 case
+ * this will also make sure that the PSP MMIO base will be cached in SMM before the OS takes
+ * over so no SMN accesses will be needed during OS runtime.
+ */
int psp_notify_smm(void)
{
msr_t msr;