summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-03-16 16:53:00 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-03-19 11:23:59 +0000
commitc9aecb4440d753168e84039c27906472d6174e3e (patch)
tree598f41548b032d396a3db3b8d74091b655751658
parenteeacd8349c1bf208acf393e10e72a6da413a67ef (diff)
downloadcoreboot-c9aecb4440d753168e84039c27906472d6174e3e.tar.xz
cpu/intel/fit: Reserve the FIT pointer using a .c file
No need to do this assembly anymore. Change-Id: I69b42c31e495530fe96030a5a25209775f9d4dca Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51533 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r--src/cpu/intel/fit/Makefile.inc2
-rw-r--r--src/cpu/intel/fit/fit.c (renamed from src/cpu/intel/fit/fit.S)9
2 files changed, 4 insertions, 7 deletions
diff --git a/src/cpu/intel/fit/Makefile.inc b/src/cpu/intel/fit/Makefile.inc
index ee6d55885d..ae4e71a79f 100644
--- a/src/cpu/intel/fit/Makefile.inc
+++ b/src/cpu/intel/fit/Makefile.inc
@@ -1,4 +1,4 @@
-bootblock-y += fit.S
+bootblock-y += fit.c
# The FIT table is generated as a separate CBFS file.
# The FIT pointer is reserved in fit.c and updated to point to the 'intel_fit'
diff --git a/src/cpu/intel/fit/fit.S b/src/cpu/intel/fit/fit.c
index ca95a90c2f..060023191a 100644
--- a/src/cpu/intel/fit/fit.S
+++ b/src/cpu/intel/fit/fit.c
@@ -1,9 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-.section ".fit_pointer", "a", @progbits
- .code32
+#include <stdint.h>
+
/* This will get updated by ifittool later on to point to the cbfs 'intel_fit' file. */
-.global fit_pointer
-fit_pointer:
-.long 0
-.long 0
+__attribute__((used, __section__(".fit_pointer"))) const uint64_t fit_ptr = 0;