Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63962 )
Change subject: soc/amd/common/block/psp/psp_gen2: rename cmd_response to buffer ......................................................................
soc/amd/common/block/psp/psp_gen2: rename cmd_response to buffer
The cmd_response field in the pspv2_mbox struct is the buffer used to pass data to the PSP and back to the x86 side, so rename it to buffer. This also aligns the code a bit more with the reference code. Also rename the wr_mbox_cmd_resp function to wr_mbox_buffer_ptr.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I22c8971b07b3dedcc2e6e50e93c98d69ec7379e8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63962 Reviewed-by: Raul Rangel rrangel@chromium.org Reviewed-by: Fred Reitberger reitbergerfred@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/common/block/psp/psp_gen2.c 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved Fred Reitberger: Looks good to me, but someone else must approve
diff --git a/src/soc/amd/common/block/psp/psp_gen2.c b/src/soc/amd/common/block/psp/psp_gen2.c index 67b9391..6f46d82 100644 --- a/src/soc/amd/common/block/psp/psp_gen2.c +++ b/src/soc/amd/common/block/psp/psp_gen2.c @@ -23,7 +23,7 @@ u32 ready:1; } __packed fields; }; - u64 cmd_response; + u64 buffer; } __packed;
static uintptr_t soc_get_psp_base_address(void) @@ -76,9 +76,9 @@ return !!tmp.fields.recovery; }
-static void wr_mbox_cmd_resp(struct pspv2_mbox *mbox, void *buffer) +static void wr_mbox_buffer_ptr(struct pspv2_mbox *mbox, void *buffer) { - write64(&mbox->cmd_response, (uintptr_t)buffer); + write64(&mbox->buffer, (uintptr_t)buffer); }
static int wait_command(struct pspv2_mbox *mbox, bool wait_for_ready) @@ -121,7 +121,7 @@ return -PSPSTS_CMD_TIMEOUT;
/* set address of command-response buffer and write command register */ - wr_mbox_cmd_resp(mbox, buffer); + wr_mbox_buffer_ptr(mbox, buffer); wr_mbox_cmd(mbox, command);
/* PSP clears command register when complete. All commands except