soc/amd/common/vboot: Verify the size of the transfer buffer

This will verify that signed verstage binaries and the bootblock code
executing agree on the transfer buffer struct size.

BUG=b:213828947
TEST=Boot guybrush to OS

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I597e38fe0a37416ffd3bc01fd974fa8f6610a88c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61187
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
This commit is contained in:
Raul E Rangel 2022-01-18 15:05:49 -07:00 committed by Raul Rangel
parent 3625a12625
commit 3b589c8148
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@
static int transfer_buffer_valid(const struct transfer_info_struct *ptr) static int transfer_buffer_valid(const struct transfer_info_struct *ptr)
{ {
if (ptr->magic_val == TRANSFER_MAGIC_VAL) if (ptr->magic_val == TRANSFER_MAGIC_VAL && ptr->struct_bytes == sizeof(*ptr))
return 1; return 1;
else else
return 0; return 0;