From 458cfaea9f9da1c9aa4c70971e607f9cbdff533f Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Fri, 20 May 2022 07:02:50 +0200 Subject: soc/intel/apollolake: Provide FIT pointer in bootblock at build time Before TXE releases the CPU out of reset a pointer to the constructed FIT in SRAM is patched into the loaded bootblock at offset 4G - 64B. Since this patched bootblock gets measured during runtime it will not match the one that is potentially measured from the coreboot image. This patch adds a dedicated fit.c file for Apollo Lake where the FIT pointer is already set to the address TXE will be using at runtime. Test=Compare sha256 sum from coreboot runtime and coreboot.rom of the bootblock and make sure they match. Change-Id: Ia0fd2a19517c70f50ef37e6a2dc2408bae28df10 Signed-off-by: Werner Zeh Reviewed-on: https://review.coreboot.org/c/coreboot/+/64539 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/soc/intel/apollolake/bootblock/fit.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/soc/intel/apollolake/bootblock/fit.c (limited to 'src/soc/intel/apollolake/bootblock') diff --git a/src/soc/intel/apollolake/bootblock/fit.c b/src/soc/intel/apollolake/bootblock/fit.c new file mode 100644 index 0000000000..0728f53cbd --- /dev/null +++ b/src/soc/intel/apollolake/bootblock/fit.c @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +/* + * At runtime TXE creates the FIT table in the shared SRAM and patches the bootblock + * at the fixed address 4G - 64 byte with a pointer to this FIT table. In order to be able + * to pre-compute the PCR value for the bootblock this FIT pointer needs to be added to the + * image as well. Since the FIT location is fixed in TXE, this can be done at build time. + */ +__attribute__((used, __section__(".fit_pointer"))) const uint64_t fit_ptr = 0xfffe0000; -- cgit v1.2.3