summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2022-05-20 07:02:50 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-05-24 13:47:56 +0000
commit458cfaea9f9da1c9aa4c70971e607f9cbdff533f (patch)
tree1dc27ee39d6adf7bf182130ca37c2668e7ebd976 /src/soc/intel
parent859305d45762d8499b4100765d3a7bd954038c73 (diff)
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 <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/64539 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/apollolake/Makefile.inc2
-rw-r--r--src/soc/intel/apollolake/bootblock/fit.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index a4ed87f45d..11da0b3815 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -155,7 +155,7 @@ endif
# table + pointer, but reserving the pointer is still needed. Otherwise the
# IBBL loader thrashes code there. So include fit.c so that the linker
# reserves that pointer.
-bootblock-y += ../../../cpu/intel/fit/fit.c
+bootblock-y += bootblock/fit.c
# DSP firmware settings files.
ifeq ($(CONFIG_SOC_INTEL_GEMINILAKE),y)
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 <stdint.h>
+
+/*
+ * 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;