aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/intel/fit
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2012-12-03 16:17:40 -0600
committerRonald G. Minnich <rminnich@gmail.com>2013-03-17 22:53:51 +0100
commit6dcceddff53ad309b91b61661ae7deab37f272ec (patch)
tree21177990702c7fa3b99ca4d59def9fd4c548008e /src/cpu/intel/fit
parent239c2e843f976d5915964c8cb1923305c574f8b5 (diff)
x86 intel: Add Firmware Interface Table support
Haswell CPUs require a FIT table in the firmware. This commit adds rudimentary support for a FIT table. The number of entries in the table is based on a configuration option. The code only generates a type 0 entry. A follow-on tool will need to be developed to populate the FIT entries as well as checksumming the table. Verified image has a FIT pointer and table when option is selected. Change-Id: I3a314016a09a1cc26bf1fb5d17aa50853d2ef4f8 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/2642 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/cpu/intel/fit')
-rw-r--r--src/cpu/intel/fit/Kconfig12
-rw-r--r--src/cpu/intel/fit/fit.inc30
-rw-r--r--src/cpu/intel/fit/fit.lds6
3 files changed, 48 insertions, 0 deletions
diff --git a/src/cpu/intel/fit/Kconfig b/src/cpu/intel/fit/Kconfig
new file mode 100644
index 0000000000..9b57556827
--- /dev/null
+++ b/src/cpu/intel/fit/Kconfig
@@ -0,0 +1,12 @@
+config CPU_INTEL_FIRMWARE_INTERFACE_TABLE
+ def_bool n
+ help
+ This option selects building a Firmware Interface Table (FIT).
+
+config CPU_INTEL_NUM_FIT_ENTRIES
+ int
+ default 4
+ depends on CPU_INTEL_FIRMWARE_INTERFACE_TABLE
+ help
+ This option selects the number of empty entries in the FIT table.
+
diff --git a/src/cpu/intel/fit/fit.inc b/src/cpu/intel/fit/fit.inc
new file mode 100644
index 0000000000..e4595c0d6d
--- /dev/null
+++ b/src/cpu/intel/fit/fit.inc
@@ -0,0 +1,30 @@
+.section ".fit_pointer", "a", @progbits
+ .code32
+.global fit_pointer
+fit_pointer:
+.long fit_table
+.long 0
+.previous
+
+.section ".rom.data", "a", @progbits
+.align 16
+.global fit_table
+.global fit_table_end
+fit_table:
+/* Address for type 0 is '_FIT_ ' */
+.long 0x5449465f
+.long 0x2020205f
+/*
+ * There is 1 entry in the table. Other tools will have to update the size
+ * and checksum when adding entries.
+ */
+.long 0x00000001
+/* Version */
+.word 0x0100
+/* Type 0 with checksum valid. */
+.byte 0x80
+/* Checksum byte - must add to zero. */
+.byte 0x7d
+.fill CONFIG_CPU_INTEL_NUM_FIT_ENTRIES*16
+fit_table_end:
+.previous
diff --git a/src/cpu/intel/fit/fit.lds b/src/cpu/intel/fit/fit.lds
new file mode 100644
index 0000000000..9ccfe82c5f
--- /dev/null
+++ b/src/cpu/intel/fit/fit.lds
@@ -0,0 +1,6 @@
+SECTIONS {
+ . = 0xffffffc0;
+ .fit_pointer (.): {
+ *(.fit_pointer)
+ }
+}