Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/84061?usp=email )
Change subject: soc/amd/common/psp/psp_def: rework command buffer documentation ......................................................................
soc/amd/common/psp/psp_def: rework command buffer documentation
The existing comment on the mbox_default_buffer struct was outdated and didn't reflect the current state, so rework it to keep it a bit more generic and also add the document number for the newer generations of CPUs. To better document which commands use non-default buffers, add the names of the commands using the non-default buffers to those buffer struct definitions.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I510d953217240243392e8a415358524257bd28b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84061 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Matt DeVillier matt.devillier@amd.corp-partner.google.com Reviewed-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/soc/amd/common/block/psp/psp_def.h 1 file changed, 9 insertions(+), 6 deletions(-)
Approvals: Matt DeVillier: Looks good to me, approved Marshall Dawson: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/src/soc/amd/common/block/psp/psp_def.h b/src/soc/amd/common/block/psp/psp_def.h index c2b2fca..03fd352 100644 --- a/src/soc/amd/common/block/psp/psp_def.h +++ b/src/soc/amd/common/block/psp/psp_def.h @@ -48,12 +48,11 @@ } __packed;
/* - * command-specific buffer definitions: see NDA document #54267 - * The following commands need a buffer definition if they are to be used. - * All other commands will work with the default buffer. - * MBOX_BIOS_CMD_SMM_INFO MBOX_BIOS_CMD_PSP_QUERY - * MBOX_BIOS_CMD_SX_INFO MBOX_BIOS_CMD_S3_DATA_INFO - * MBOX_BIOS_CMD_RSM_INFO + * x86 to PSP mailbox commands that don't take any parameter or return any data, use the + * mbox_default_buffer, while x86 to PSP commands that either pass data to the PSP or get data + * returned from the PSP use command-specific buffer definitions. For details on the specific + * buffer definitions for the various commands, see NDA document #54267 for the generations + * before family 17h and NDA document #55758 for the generations from family 17h on. */
struct mbox_default_buffer { /* command-response buffer unused by command */ @@ -73,16 +72,19 @@ uint64_t psp_mbox_smm_flag_address; } __packed;
+/* MBOX_BIOS_CMD_SMM_INFO */ struct mbox_cmd_smm_info_buffer { struct mbox_buffer_header header; struct smm_req_buffer req; } __packed __aligned(32);
+/* MBOX_BIOS_CMD_SX_INFO */ struct mbox_cmd_sx_info_buffer { struct mbox_buffer_header header; u8 sleep_type; } __packed __aligned(32);
+/* MBOX_BIOS_CMD_SET_SPL_FUSE */ struct mbox_cmd_late_spl_buffer { struct mbox_buffer_header header; uint32_t spl_value; @@ -99,6 +101,7 @@ DTPM_REQUEST_MAX, };
+/* MBOX_BIOS_CMD_I2C_TPM_ARBITRATION */ struct mbox_cmd_dtpm_config_buffer { struct mbox_buffer_header header; uint32_t request_type;