diff options
author | Raul E Rangel <rrangel@chromium.org> | 2022-02-25 17:10:09 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-03-02 21:11:54 +0000 |
commit | 08de3e3bd805dbacdf7c5176cb1b070014544361 (patch) | |
tree | 4dbdd124c1726c3c152b475223ba0768733a6899 /src/soc/amd/common/vboot | |
parent | fe1418db3dbb4e513dbda269665d38f054098ab7 (diff) |
soc/amd/common/vboot: Remove parameter to replay_transfer_buffer_cbmemc
We don't need to force the caller to look up and cast the transfer
region. We can do it in the function.
BUG=b:221231786
TEST=Build guybrush
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Ib46a673ef5a43deb56a6d522152085036a47ab66
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62401
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/soc/amd/common/vboot')
-rw-r--r-- | src/soc/amd/common/vboot/transfer_buffer.c | 7 | ||||
-rw-r--r-- | src/soc/amd/common/vboot/vboot_bootblock.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/soc/amd/common/vboot/transfer_buffer.c b/src/soc/amd/common/vboot/transfer_buffer.c index 06e564a2f3..63b4f8efe6 100644 --- a/src/soc/amd/common/vboot/transfer_buffer.c +++ b/src/soc/amd/common/vboot/transfer_buffer.c @@ -61,12 +61,17 @@ void show_psp_transfer_info(void) } } -void replay_transfer_buffer_cbmemc(const struct transfer_info_struct *info) +void replay_transfer_buffer_cbmemc(void) { + const struct transfer_info_struct *info = (const struct transfer_info_struct *) + (void *)(uintptr_t)_transfer_buffer; void *cbmemc; size_t cbmemc_size; + if (!transfer_buffer_valid(info)) + return; + if (info->console_offset < sizeof(*info)) return; diff --git a/src/soc/amd/common/vboot/vboot_bootblock.c b/src/soc/amd/common/vboot/vboot_bootblock.c index 72648368e4..1375e9823d 100644 --- a/src/soc/amd/common/vboot/vboot_bootblock.c +++ b/src/soc/amd/common/vboot/vboot_bootblock.c @@ -14,7 +14,7 @@ void boot_with_psp_timestamp(uint64_t base_timestamp) if (!transfer_buffer_valid(info) || info->timestamp == 0) return; - replay_transfer_buffer_cbmemc(info); + replay_transfer_buffer_cbmemc(); /* * info->timestamp is PSP's timestamp (in microseconds) |