diff options
author | Kangheui Won <khwon@chromium.org> | 2020-08-25 18:12:19 +1000 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-09-14 07:08:39 +0000 |
commit | 5f027fa4c227c9788a4b7d88d3bdf3891ed6d844 (patch) | |
tree | a511cee08de1dbb6aad39aeafdf12d8f7f845161 | |
parent | 8840bcfa8687fa3f38f761cad31fba04a2e38713 (diff) |
soc/amd/picasso: copy local info to transfer buf
We added transfer_info_struct to contain various information about
memory region we pass from PSP to x86 in commit 0c12abe462.
This should be at the start of transfer region but we only manipulated
it as local variable and didn't put data into the region, resulting
garbage data for transfer_info when x86 tries to read it.
Copy the content of local variable to beginning of _transfer_buffer
before requesting transfer to PSP so coreboot on x86 can access it.
BUG=b:159220781
BRANCH=zork
TEST=check transfer_info_struct is correctly populated on romstage
Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I14bc34e6af501240a6f633db3999a7759e88d60b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44751
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/soc/amd/picasso/psp_verstage/psp_verstage.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/psp_verstage/psp_verstage.c b/src/soc/amd/picasso/psp_verstage/psp_verstage.c index d071aa6624..c2178a347e 100644 --- a/src/soc/amd/picasso/psp_verstage/psp_verstage.c +++ b/src/soc/amd/picasso/psp_verstage/psp_verstage.c @@ -196,6 +196,8 @@ static uint32_t save_buffers(struct vb2_context **ctx) buffer_info.workbuf_offset = (uint32_t)((uintptr_t)_fmap_cache - (uintptr_t)_vboot2_work); + memcpy(_transfer_buffer, &buffer_info, sizeof(buffer_info)); + retval = svc_save_uapp_data(UAPP_COPYBUF_CHROME_WORKBUF, (void *)_transfer_buffer, buffer_size); if (retval) { |