[coreboot-gerrit] New patch to review for coreboot: arch/x86/bootblock: Do not include non-code files in bootblock.S

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Mon Oct 5 01:14:14 CET 2015


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11792

-gerrit

commit 8df4298bb93bd4a5f68aa1f2c6ac5c8ff405c237
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date:   Sun Oct 4 17:47:36 2015 -0700

    arch/x86/bootblock: Do not include non-code files in bootblock.S
    
    Since we can now link the bootblock, it no longer makes sense to use a
    monolithic bootblock.S. Code segments must still be included as the
    order in bootblock.S determines code flow. However, we can now link
    data or descriptor parts, such as id.inc, or fit.inc.
    
    Change-Id: I08e86e92d82bd2138194ed42652f268b0764aa54
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 src/arch/x86/Makefile.inc      |  1 +
 src/arch/x86/bootblock.S       |  5 -----
 src/arch/x86/id.S              | 20 ++++++++++++++++++++
 src/arch/x86/id.inc            | 20 --------------------
 src/cpu/intel/Makefile.inc     |  1 +
 src/cpu/intel/fit/Makefile.inc |  1 +
 src/cpu/intel/fit/fit.S        | 30 ++++++++++++++++++++++++++++++
 src/cpu/intel/fit/fit.inc      | 30 ------------------------------
 8 files changed, 53 insertions(+), 55 deletions(-)

diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 95ebb6a..e17fe11 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -84,6 +84,7 @@ endif
 # Add the assembly file that pulls in the rest of the dependencies in
 # the right order. Make sure the auto generated bootblock.inc is a proper
 # dependency. Make the same true for the linker sript.
+bootblock-y += id.S
 bootblock-y += bootblock.S
 bootblock-y += walkcbfs.S
 $(obj)/arch/x86/bootblock.bootblock.o: $(objgenerated)/bootblock.inc
diff --git a/src/arch/x86/bootblock.S b/src/arch/x86/bootblock.S
index bea178d..645e491 100644
--- a/src/arch/x86/bootblock.S
+++ b/src/arch/x86/bootblock.S
@@ -25,11 +25,6 @@
 #include <cpu/x86/16bit/entry16.inc>
 #include <cpu/x86/16bit/reset16.inc>
 #include <cpu/x86/32bit/entry32.inc>
-#include <arch/x86/id.inc>
-
-#if IS_ENABLED(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE)
-#include <cpu/intel/fit/fit.inc>
-#endif
 
 #ifdef CONFIG_CHIPSET_BOOTBLOCK_INCLUDE
 #include CONFIG_CHIPSET_BOOTBLOCK_INCLUDE
diff --git a/src/arch/x86/id.S b/src/arch/x86/id.S
new file mode 100644
index 0000000..a3df25e
--- /dev/null
+++ b/src/arch/x86/id.S
@@ -0,0 +1,20 @@
+#include <build.h>
+
+	.section ".id", "a", @progbits
+
+	.globl __id_start
+__id_start:
+ver:
+	.asciz COREBOOT_VERSION
+vendor:
+	.asciz CONFIG_MAINBOARD_VENDOR
+part:
+	.asciz CONFIG_MAINBOARD_PART_NUMBER
+.long __id_end + CONFIG_ID_SECTION_OFFSET - ver  /* Reverse offset to the vendor id */
+.long __id_end + CONFIG_ID_SECTION_OFFSET - vendor  /* Reverse offset to the vendor id */
+.long __id_end + CONFIG_ID_SECTION_OFFSET - part    /* Reverse offset to the part number */
+.long CONFIG_ROM_SIZE                               /* Size of this romimage */
+	.globl __id_end
+
+__id_end:
+.previous
diff --git a/src/arch/x86/id.inc b/src/arch/x86/id.inc
deleted file mode 100644
index a3df25e..0000000
--- a/src/arch/x86/id.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <build.h>
-
-	.section ".id", "a", @progbits
-
-	.globl __id_start
-__id_start:
-ver:
-	.asciz COREBOOT_VERSION
-vendor:
-	.asciz CONFIG_MAINBOARD_VENDOR
-part:
-	.asciz CONFIG_MAINBOARD_PART_NUMBER
-.long __id_end + CONFIG_ID_SECTION_OFFSET - ver  /* Reverse offset to the vendor id */
-.long __id_end + CONFIG_ID_SECTION_OFFSET - vendor  /* Reverse offset to the vendor id */
-.long __id_end + CONFIG_ID_SECTION_OFFSET - part    /* Reverse offset to the part number */
-.long CONFIG_ROM_SIZE                               /* Size of this romimage */
-	.globl __id_end
-
-__id_end:
-.previous
diff --git a/src/cpu/intel/Makefile.inc b/src/cpu/intel/Makefile.inc
index 6f07e30..904aa5d 100644
--- a/src/cpu/intel/Makefile.inc
+++ b/src/cpu/intel/Makefile.inc
@@ -3,6 +3,7 @@
 #
 # Therefore: ONLY include Makefile.inc from socket directories!
 
+subdirs-$(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE) += fit
 subdirs-$(CONFIG_CPU_INTEL_SOCKET_441) += socket_441
 subdirs-$(CONFIG_CPU_INTEL_SOCKET_BGA956) += socket_BGA956
 subdirs-$(CONFIG_CPU_INTEL_EP80579) += ep80579
diff --git a/src/cpu/intel/fit/Makefile.inc b/src/cpu/intel/fit/Makefile.inc
new file mode 100644
index 0000000..4b540ba
--- /dev/null
+++ b/src/cpu/intel/fit/Makefile.inc
@@ -0,0 +1 @@
+bootblock-y += fit.S
diff --git a/src/cpu/intel/fit/fit.S b/src/cpu/intel/fit/fit.S
new file mode 100644
index 0000000..e4595c0
--- /dev/null
+++ b/src/cpu/intel/fit/fit.S
@@ -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.inc b/src/cpu/intel/fit/fit.inc
deleted file mode 100644
index e4595c0..0000000
--- a/src/cpu/intel/fit/fit.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-.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



More information about the coreboot-gerrit mailing list