Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9109
-gerrit
commit 7dbc264c61649f5f1225ba03f7b33966e97aadfe
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Mar 27 14:08:03 2015 +0100
build system: remove intermediate link step in vboot
This is inspired by the commit listed below, but rewritten to match
upstream, and split in smaller pieces to keep intent clear.
Change-Id: I5405c0ee6bee203281e723feaecaee57fad8f6cb
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
Based-On-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170
---
src/vendorcode/google/chromeos/Makefile.inc | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index 414a416..d8c57fb 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -61,7 +61,6 @@ CPPFLAGS_common += -I$(VB_SOURCE)/firmware/include
VBOOT_STUB_ELF = $(obj)/vendorcode/google/chromeos/vbootstub.elf
VBOOT_STUB = $(VBOOT_STUB_ELF).rmod
-VBOOT_STUB_DOTO = $(VBOOT_STUB_ELF:.elf=.o)
# Dependency for the vboot rmodules. Ordering matters.
VBOOT_STUB_DEPS += $(obj)/vendorcode/google/chromeos/vboot_wrapper.rmodules_$(ARCH-romstage-y).o
@@ -75,11 +74,8 @@ VBOOT_CFLAGS += $(patsubst -I%,-I$(top)/%,$(filter-out -include $(src)/include/k
VBOOT_CFLAGS += -DVBOOT_DEBUG
VBOOT_CFLAGS += $(rmodules_$(ARCH-ROMSTAGE-y)-c-ccopts)
-$(VBOOT_STUB_DOTO): $(VBOOT_STUB_DEPS)
- $(CC_rmodules_$(ARCH-romstage-y)) $(CFLAGS_rmodules_$(ARCH-romstage-y)) -nostdlib -r -o $@ $^
-
# Link the vbootstub module with a 64KiB-byte heap.
-$(eval $(call rmodule_link,$(VBOOT_STUB_ELF), $(VBOOT_STUB_DOTO), 0x10000,$(ARCH-romstage-y)))
+$(eval $(call rmodule_link,$(VBOOT_STUB_ELF), $(VBOOT_STUB_DEPS), 0x10000,$(ARCH-romstage-y)))
# Build vboot library without the default includes from coreboot proper.
$(VB_LIB):
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9108
-gerrit
commit 958a8b02a3c3f1ae0569b6ae4c2e039507378ba0
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Mar 27 14:03:22 2015 +0100
build system: rename mips/bootblock.inc to mips/bootblock.S
This is inspired by the commit listed below, but rewritten to match
upstream, and split in smaller pieces to keep intent clear.
Change-Id: I192fa50989b586fd8e967d4c22db56ac9de7a30e
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
Based-On-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170
---
src/arch/mips/Makefile.inc | 2 +-
src/arch/mips/bootblock.S | 44 ++++++++++++++++++++++++++++++++++++++++++++
src/arch/mips/bootblock.inc | 44 --------------------------------------------
3 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/src/arch/mips/Makefile.inc b/src/arch/mips/Makefile.inc
index 956f2d5..42c3007 100644
--- a/src/arch/mips/Makefile.inc
+++ b/src/arch/mips/Makefile.inc
@@ -44,7 +44,7 @@ bootblock-y += ../../lib/memset.c
bootblock_lds = $(src)/arch/mips/bootblock.ld
-bootblock_inc += $(src)/arch/mips/bootblock.inc
+bootblock_inc += $(src)/arch/mips/bootblock.S
bootblock_inc += $(objgenerated)/bootblock.inc
# Much of the assembly code is generated by the compiler, and may contain
diff --git a/src/arch/mips/bootblock.S b/src/arch/mips/bootblock.S
new file mode 100644
index 0000000..dbde803
--- /dev/null
+++ b/src/arch/mips/bootblock.S
@@ -0,0 +1,44 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Imagination Technologies
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+.set noreorder /* Prevent assembler from "optimizing" this code. */
+
+.section ".start", "ax", %progbits
+.globl _start
+_start:
+ /* Set the stack pointer */
+ li $sp, CONFIG_BOOTBLOCK_STACK_TOP
+
+ /*
+ * Initialise the stack to a known value, used later to check for
+ * overflow.
+ */
+ li $t0, CONFIG_BOOTBLOCK_STACK_BOTTOM
+ addi $t1, $sp, -4
+ li $t2, 0xdeadbeef
+1: sw $t2, 0($t0)
+ bne $t0, $t1, 1b
+ addi $t0, $t0, 4
+
+ /* Run main */
+ b main
+
+ /* Should never return from main. */
+2:
+ b 2b
diff --git a/src/arch/mips/bootblock.inc b/src/arch/mips/bootblock.inc
deleted file mode 100644
index dbde803..0000000
--- a/src/arch/mips/bootblock.inc
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2014 Imagination Technologies
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-.set noreorder /* Prevent assembler from "optimizing" this code. */
-
-.section ".start", "ax", %progbits
-.globl _start
-_start:
- /* Set the stack pointer */
- li $sp, CONFIG_BOOTBLOCK_STACK_TOP
-
- /*
- * Initialise the stack to a known value, used later to check for
- * overflow.
- */
- li $t0, CONFIG_BOOTBLOCK_STACK_BOTTOM
- addi $t1, $sp, -4
- li $t2, 0xdeadbeef
-1: sw $t2, 0($t0)
- bne $t0, $t1, 1b
- addi $t0, $t0, 4
-
- /* Run main */
- b main
-
- /* Should never return from main. */
-2:
- b 2b
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9107
-gerrit
commit 4b93b74d4fca947ad36a89ec9fb613629bc3cbed
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Mar 27 13:50:11 2015 +0100
build system: normalize linker script file names
We have .lb, .lds, and .ld in the tree. Go for .ld everywhere.
This is inspired by the commit listed below, but rewritten to match
upstream, and split in smaller pieces to keep intent clear.
Change-Id: I3126af608afe4937ec4551a78df5a7824e09b04b
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
Based-On-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170
---
src/arch/riscv/id.ld | 6 +++
src/arch/riscv/id.lds | 6 ---
src/arch/x86/Makefile.inc | 12 ++---
src/arch/x86/init/ldscript_failover.lb | 74 ---------------------------
src/arch/x86/init/ldscript_failover.ld | 74 +++++++++++++++++++++++++++
src/arch/x86/lib/id.ld | 6 +++
src/arch/x86/lib/id.lds | 6 ---
src/cpu/dmp/vortex86ex/Makefile.inc | 4 +-
src/cpu/dmp/vortex86ex/biosdata.ld | 84 +++++++++++++++++++++++++++++++
src/cpu/dmp/vortex86ex/biosdata.lds | 84 -------------------------------
src/cpu/dmp/vortex86ex/biosdata_ex.ld | 35 +++++++++++++
src/cpu/dmp/vortex86ex/biosdata_ex.lds | 35 -------------
src/cpu/intel/fit/fit.ld | 6 +++
src/cpu/intel/fit/fit.lds | 6 ---
src/cpu/x86/16bit/entry16.ld | 2 +
src/cpu/x86/16bit/entry16.lds | 2 -
src/cpu/x86/16bit/reset16.ld | 16 ++++++
src/cpu/x86/16bit/reset16.lds | 16 ------
src/cpu/x86/32bit/entry32.ld | 1 +
src/cpu/x86/32bit/entry32.lds | 1 -
src/northbridge/via/vx800/Makefile.inc | 2 +-
src/northbridge/via/vx800/romstrap.ld | 26 ++++++++++
src/northbridge/via/vx800/romstrap.lds | 26 ----------
src/northbridge/via/vx900/Makefile.inc | 2 +-
src/northbridge/via/vx900/romstrap.ld | 27 ++++++++++
src/northbridge/via/vx900/romstrap.lds | 27 ----------
src/southbridge/nvidia/ck804/Makefile.inc | 2 +-
src/southbridge/nvidia/ck804/nic.c | 2 +-
src/southbridge/nvidia/ck804/romstrap.ld | 26 ++++++++++
src/southbridge/nvidia/ck804/romstrap.lds | 26 ----------
src/southbridge/nvidia/mcp55/Makefile.inc | 2 +-
src/southbridge/nvidia/mcp55/nic.c | 2 +-
src/southbridge/nvidia/mcp55/romstrap.ld | 27 ++++++++++
src/southbridge/nvidia/mcp55/romstrap.lds | 27 ----------
src/southbridge/sis/sis966/Makefile.inc | 2 +-
src/southbridge/sis/sis966/romstrap.ld | 27 ++++++++++
src/southbridge/sis/sis966/romstrap.lds | 27 ----------
src/southbridge/via/k8t890/Makefile.inc | 2 +-
src/southbridge/via/k8t890/romstrap.ld | 29 +++++++++++
src/southbridge/via/k8t890/romstrap.lds | 29 -----------
40 files changed, 408 insertions(+), 408 deletions(-)
diff --git a/src/arch/riscv/id.ld b/src/arch/riscv/id.ld
new file mode 100644
index 0000000..cfd091d
--- /dev/null
+++ b/src/arch/riscv/id.ld
@@ -0,0 +1,6 @@
+SECTIONS {
+ . = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1;
+ .id (.): {
+ *(.id)
+ }
+}
diff --git a/src/arch/riscv/id.lds b/src/arch/riscv/id.lds
deleted file mode 100644
index cfd091d..0000000
--- a/src/arch/riscv/id.lds
+++ /dev/null
@@ -1,6 +0,0 @@
-SECTIONS {
- . = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1;
- .id (.): {
- *(.id)
- }
-}
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 5d49abc..175a767 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -72,13 +72,13 @@ $(obj)/cmos_layout.bin: $(NVRAMTOOL) $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.l
ifeq ($(CONFIG_ARCH_BOOTBLOCK_X86_32),y)
-bootblock_lds = $(src)/arch/x86/init/ldscript_failover.lb
-bootblock_lds += $(src)/cpu/x86/16bit/entry16.lds
-bootblock_lds += $(src)/cpu/x86/16bit/reset16.lds
-bootblock_lds += $(src)/arch/x86/lib/id.lds
+bootblock_lds = $(src)/arch/x86/init/ldscript_failover.ld
+bootblock_lds += $(src)/cpu/x86/16bit/entry16.ld
+bootblock_lds += $(src)/cpu/x86/16bit/reset16.ld
+bootblock_lds += $(src)/arch/x86/lib/id.ld
bootblock_lds += $(chipset_bootblock_lds)
ifeq ($(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE),y)
-bootblock_lds += $(src)/cpu/intel/fit/fit.lds
+bootblock_lds += $(src)/cpu/intel/fit/fit.ld
endif
bootblock_inc = $(src)/arch/x86/init/prologue.inc
@@ -141,7 +141,7 @@ crt0s = $(src)/arch/x86/init/prologue.inc
ldscripts =
ldscripts += $(src)/arch/x86/init/romstage.ld
crt0s += $(src)/cpu/x86/32bit/entry32.inc
-ldscripts += $(src)/cpu/x86/32bit/entry32.lds
+ldscripts += $(src)/cpu/x86/32bit/entry32.ld
crt0s += $(src)/cpu/x86/fpu_enable.inc
ifeq ($(CONFIG_SSE),y)
diff --git a/src/arch/x86/init/ldscript_failover.lb b/src/arch/x86/init/ldscript_failover.lb
deleted file mode 100644
index 318f429..0000000
--- a/src/arch/x86/init/ldscript_failover.lb
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2006 Advanced Micro Devices, Inc.
- * Copyright (C) 2008-2010 coresystems GmbH
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/* We use ELF as output format. So that we can debug the code in some form. */
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
-OUTPUT_ARCH(i386)
-
-MEMORY {
- rom : ORIGIN = 0xffff0000, LENGTH = 64K
-}
-
-TARGET(binary)
-SECTIONS
-{
- /* Symbol ap_sipi_vector must be aligned to 4kB to start AP CPUs
- * with Startup IPI message without RAM. Align .rom to next 4 byte
- * boundary anyway, so no pad byte appears between _rom and _start.
- */
- .bogus ROMLOC_MIN : {
- . = CONFIG_SIPI_VECTOR_IN_ROM ? ALIGN(4096) : ALIGN(4);
- ROMLOC = .;
- } >rom = 0xff
-
- /* This section might be better named .setup */
- .rom ROMLOC : {
- _rom = .;
- ap_sipi_vector = .;
- *(.rom.text);
- *(.rom.data);
- *(.rom.data.*);
- *(.rodata.*);
- _erom = .;
- } >rom = 0xff
-
- /* Allocation reserves extra 16 bytes here. Alignment requirements
- * may cause the total size of a section to change when the start
- * address gets applied.
- */
- ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16) -
- (CONFIG_SIPI_VECTOR_IN_ROM ? 4096 : 0);
-
- /* Post-check proper SIPI vector. */
- _bogus = ASSERT(!CONFIG_SIPI_VECTOR_IN_ROM || ((ap_sipi_vector & 0x0fff) == 0x0),
- "Bad SIPI vector alignment");
- _bogus = ASSERT(!CONFIG_SIPI_VECTOR_IN_ROM || (ap_sipi_vector == CONFIG_AP_SIPI_VECTOR),
- "Address mismatch on AP_SIPI_VECTOR");
-
- /DISCARD/ : {
- *(.comment)
- *(.note)
- *(.comment.*)
- *(.note.*)
- *(.iplt)
- *(.rel.*)
- *(.igot.*)
- }
-}
diff --git a/src/arch/x86/init/ldscript_failover.ld b/src/arch/x86/init/ldscript_failover.ld
new file mode 100644
index 0000000..318f429
--- /dev/null
+++ b/src/arch/x86/init/ldscript_failover.ld
@@ -0,0 +1,74 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2006 Advanced Micro Devices, Inc.
+ * Copyright (C) 2008-2010 coresystems GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* We use ELF as output format. So that we can debug the code in some form. */
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+
+MEMORY {
+ rom : ORIGIN = 0xffff0000, LENGTH = 64K
+}
+
+TARGET(binary)
+SECTIONS
+{
+ /* Symbol ap_sipi_vector must be aligned to 4kB to start AP CPUs
+ * with Startup IPI message without RAM. Align .rom to next 4 byte
+ * boundary anyway, so no pad byte appears between _rom and _start.
+ */
+ .bogus ROMLOC_MIN : {
+ . = CONFIG_SIPI_VECTOR_IN_ROM ? ALIGN(4096) : ALIGN(4);
+ ROMLOC = .;
+ } >rom = 0xff
+
+ /* This section might be better named .setup */
+ .rom ROMLOC : {
+ _rom = .;
+ ap_sipi_vector = .;
+ *(.rom.text);
+ *(.rom.data);
+ *(.rom.data.*);
+ *(.rodata.*);
+ _erom = .;
+ } >rom = 0xff
+
+ /* Allocation reserves extra 16 bytes here. Alignment requirements
+ * may cause the total size of a section to change when the start
+ * address gets applied.
+ */
+ ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16) -
+ (CONFIG_SIPI_VECTOR_IN_ROM ? 4096 : 0);
+
+ /* Post-check proper SIPI vector. */
+ _bogus = ASSERT(!CONFIG_SIPI_VECTOR_IN_ROM || ((ap_sipi_vector & 0x0fff) == 0x0),
+ "Bad SIPI vector alignment");
+ _bogus = ASSERT(!CONFIG_SIPI_VECTOR_IN_ROM || (ap_sipi_vector == CONFIG_AP_SIPI_VECTOR),
+ "Address mismatch on AP_SIPI_VECTOR");
+
+ /DISCARD/ : {
+ *(.comment)
+ *(.note)
+ *(.comment.*)
+ *(.note.*)
+ *(.iplt)
+ *(.rel.*)
+ *(.igot.*)
+ }
+}
diff --git a/src/arch/x86/lib/id.ld b/src/arch/x86/lib/id.ld
new file mode 100644
index 0000000..cfd091d
--- /dev/null
+++ b/src/arch/x86/lib/id.ld
@@ -0,0 +1,6 @@
+SECTIONS {
+ . = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1;
+ .id (.): {
+ *(.id)
+ }
+}
diff --git a/src/arch/x86/lib/id.lds b/src/arch/x86/lib/id.lds
deleted file mode 100644
index cfd091d..0000000
--- a/src/arch/x86/lib/id.lds
+++ /dev/null
@@ -1,6 +0,0 @@
-SECTIONS {
- . = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1;
- .id (.): {
- *(.id)
- }
-}
diff --git a/src/cpu/dmp/vortex86ex/Makefile.inc b/src/cpu/dmp/vortex86ex/Makefile.inc
index ff0b58c..c68bf9e 100644
--- a/src/cpu/dmp/vortex86ex/Makefile.inc
+++ b/src/cpu/dmp/vortex86ex/Makefile.inc
@@ -25,7 +25,7 @@ subdirs-y += ../../x86/smm
chipset_bootblock_inc += $(src)/cpu/dmp/vortex86ex/biosdata.inc
chipset_bootblock_inc += $(src)/cpu/dmp/vortex86ex/biosdata_ex.inc
-chipset_bootblock_lds += $(src)/cpu/dmp/vortex86ex/biosdata.lds
-chipset_bootblock_lds += $(src)/cpu/dmp/vortex86ex/biosdata_ex.lds
+chipset_bootblock_lds += $(src)/cpu/dmp/vortex86ex/biosdata.ld
+chipset_bootblock_lds += $(src)/cpu/dmp/vortex86ex/biosdata_ex.ld
ROMCCFLAGS := -mcpu=i386 -O2
diff --git a/src/cpu/dmp/vortex86ex/biosdata.ld b/src/cpu/dmp/vortex86ex/biosdata.ld
new file mode 100644
index 0000000..b525b2a
--- /dev/null
+++ b/src/cpu/dmp/vortex86ex/biosdata.ld
@@ -0,0 +1,84 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 DMP Electronics Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+SECTIONS {
+
+ /* Vortex86 ROM fixed data areas used range is too big, we need
+ * to move bootblock from default address to another place,
+ * otherwise .dmp_frontdoor section can't be included.
+ * Address before ..fbc00 is available.
+ */
+ ROMLOC_MIN = 0xffffbc00 - (_erom - _rom + 16) -
+ (CONFIG_SIPI_VECTOR_IN_ROM ? 4096 : 0);
+
+ . = 0xffffbc00;
+ .dmp_reserved (.): {
+ *(.dmp_reserved)
+ }
+
+ . = 0xffffc000;
+ .dmp_kbd_fw_part2 (.): {
+ *(.dmp_kbd_fw_part2)
+ }
+
+ . = 0xffffd000;
+ .dmp_mtbf_low_cnt (.): {
+ *(.dmp_mtbf_low_cnt)
+ }
+
+ . = 0xffffe000;
+ .dmp_kbd_fw_part1 (.): {
+ *(.dmp_kbd_fw_part1)
+ }
+
+ . = 0xfffff000;
+ .dmp_spi_flash_disk_driver (.): {
+ *(.dmp_spi_flash_disk_driver)
+ }
+
+ . = 0xfffff800;
+ .dmp_frontdoor (.): {
+ *(.dmp_frontdoor)
+ }
+
+ . = 0xfffffe00;
+ .dmp_isoinfo (.): {
+ *(.dmp_isoinfo)
+ }
+
+ . = 0xffffffa0;
+ .dmp_isodata_checksum (.): {
+ *(.dmp_isodata_checksum)
+ }
+
+ . = 0xffffffb0;
+ .dmp_mac (.): {
+ *(.dmp_mac)
+ }
+
+ . = 0xffffffb8;
+ .dmp_mtbf_limit (.): {
+ *(.dmp_mtbf_limit)
+ }
+
+ . = 0xffffffc0;
+ .dmp_isodata (.): {
+ *(.dmp_isodata)
+ }
+}
diff --git a/src/cpu/dmp/vortex86ex/biosdata.lds b/src/cpu/dmp/vortex86ex/biosdata.lds
deleted file mode 100644
index b525b2a..0000000
--- a/src/cpu/dmp/vortex86ex/biosdata.lds
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2013 DMP Electronics Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-SECTIONS {
-
- /* Vortex86 ROM fixed data areas used range is too big, we need
- * to move bootblock from default address to another place,
- * otherwise .dmp_frontdoor section can't be included.
- * Address before ..fbc00 is available.
- */
- ROMLOC_MIN = 0xffffbc00 - (_erom - _rom + 16) -
- (CONFIG_SIPI_VECTOR_IN_ROM ? 4096 : 0);
-
- . = 0xffffbc00;
- .dmp_reserved (.): {
- *(.dmp_reserved)
- }
-
- . = 0xffffc000;
- .dmp_kbd_fw_part2 (.): {
- *(.dmp_kbd_fw_part2)
- }
-
- . = 0xffffd000;
- .dmp_mtbf_low_cnt (.): {
- *(.dmp_mtbf_low_cnt)
- }
-
- . = 0xffffe000;
- .dmp_kbd_fw_part1 (.): {
- *(.dmp_kbd_fw_part1)
- }
-
- . = 0xfffff000;
- .dmp_spi_flash_disk_driver (.): {
- *(.dmp_spi_flash_disk_driver)
- }
-
- . = 0xfffff800;
- .dmp_frontdoor (.): {
- *(.dmp_frontdoor)
- }
-
- . = 0xfffffe00;
- .dmp_isoinfo (.): {
- *(.dmp_isoinfo)
- }
-
- . = 0xffffffa0;
- .dmp_isodata_checksum (.): {
- *(.dmp_isodata_checksum)
- }
-
- . = 0xffffffb0;
- .dmp_mac (.): {
- *(.dmp_mac)
- }
-
- . = 0xffffffb8;
- .dmp_mtbf_limit (.): {
- *(.dmp_mtbf_limit)
- }
-
- . = 0xffffffc0;
- .dmp_isodata (.): {
- *(.dmp_isodata)
- }
-}
diff --git a/src/cpu/dmp/vortex86ex/biosdata_ex.ld b/src/cpu/dmp/vortex86ex/biosdata_ex.ld
new file mode 100644
index 0000000..d711648
--- /dev/null
+++ b/src/cpu/dmp/vortex86ex/biosdata_ex.ld
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 DMP Electronics Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+SECTIONS {
+ . = 0xfffffd00;
+ .a9123_crossbar_config (.): {
+ *(.a9123_crossbar_config)
+ }
+
+ . = 0xffffffb6;
+ .a9123_strap_1 (.): {
+ *(.a9123_strap_1)
+ }
+
+ . = 0xffffffbb;
+ .a9123_strap_2 (.): {
+ *(.a9123_strap_2)
+ }
+}
diff --git a/src/cpu/dmp/vortex86ex/biosdata_ex.lds b/src/cpu/dmp/vortex86ex/biosdata_ex.lds
deleted file mode 100644
index d711648..0000000
--- a/src/cpu/dmp/vortex86ex/biosdata_ex.lds
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2013 DMP Electronics Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-SECTIONS {
- . = 0xfffffd00;
- .a9123_crossbar_config (.): {
- *(.a9123_crossbar_config)
- }
-
- . = 0xffffffb6;
- .a9123_strap_1 (.): {
- *(.a9123_strap_1)
- }
-
- . = 0xffffffbb;
- .a9123_strap_2 (.): {
- *(.a9123_strap_2)
- }
-}
diff --git a/src/cpu/intel/fit/fit.ld b/src/cpu/intel/fit/fit.ld
new file mode 100644
index 0000000..9ccfe82
--- /dev/null
+++ b/src/cpu/intel/fit/fit.ld
@@ -0,0 +1,6 @@
+SECTIONS {
+ . = 0xffffffc0;
+ .fit_pointer (.): {
+ *(.fit_pointer)
+ }
+}
diff --git a/src/cpu/intel/fit/fit.lds b/src/cpu/intel/fit/fit.lds
deleted file mode 100644
index 9ccfe82..0000000
--- a/src/cpu/intel/fit/fit.lds
+++ /dev/null
@@ -1,6 +0,0 @@
-SECTIONS {
- . = 0xffffffc0;
- .fit_pointer (.): {
- *(.fit_pointer)
- }
-}
diff --git a/src/cpu/x86/16bit/entry16.ld b/src/cpu/x86/16bit/entry16.ld
new file mode 100644
index 0000000..112d429
--- /dev/null
+++ b/src/cpu/x86/16bit/entry16.ld
@@ -0,0 +1,2 @@
+ gdtptr16_offset = gdtptr16 & 0xffff;
+ nullidt_offset = nullidt & 0xffff;
diff --git a/src/cpu/x86/16bit/entry16.lds b/src/cpu/x86/16bit/entry16.lds
deleted file mode 100644
index 112d429..0000000
--- a/src/cpu/x86/16bit/entry16.lds
+++ /dev/null
@@ -1,2 +0,0 @@
- gdtptr16_offset = gdtptr16 & 0xffff;
- nullidt_offset = nullidt & 0xffff;
diff --git a/src/cpu/x86/16bit/reset16.ld b/src/cpu/x86/16bit/reset16.ld
new file mode 100644
index 0000000..a31a580
--- /dev/null
+++ b/src/cpu/x86/16bit/reset16.ld
@@ -0,0 +1,16 @@
+/*
+ * _ROMTOP : The top of the rom used where we
+ * need to put the reset vector.
+ */
+
+SECTIONS {
+ /* Trigger an error if I have an unuseable start address */
+ _bogus = ASSERT(_start >= 0xffff0000, "_start too low. Please report.");
+ _ROMTOP = 0xfffffff0;
+ . = _ROMTOP;
+ .reset . : {
+ *(.reset)
+ . = 15 ;
+ BYTE(0x00);
+ }
+}
diff --git a/src/cpu/x86/16bit/reset16.lds b/src/cpu/x86/16bit/reset16.lds
deleted file mode 100644
index a31a580..0000000
--- a/src/cpu/x86/16bit/reset16.lds
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * _ROMTOP : The top of the rom used where we
- * need to put the reset vector.
- */
-
-SECTIONS {
- /* Trigger an error if I have an unuseable start address */
- _bogus = ASSERT(_start >= 0xffff0000, "_start too low. Please report.");
- _ROMTOP = 0xfffffff0;
- . = _ROMTOP;
- .reset . : {
- *(.reset)
- . = 15 ;
- BYTE(0x00);
- }
-}
diff --git a/src/cpu/x86/32bit/entry32.ld b/src/cpu/x86/32bit/entry32.ld
new file mode 100644
index 0000000..471b5f7
--- /dev/null
+++ b/src/cpu/x86/32bit/entry32.ld
@@ -0,0 +1 @@
+ENTRY(protected_start)
diff --git a/src/cpu/x86/32bit/entry32.lds b/src/cpu/x86/32bit/entry32.lds
deleted file mode 100644
index 471b5f7..0000000
--- a/src/cpu/x86/32bit/entry32.lds
+++ /dev/null
@@ -1 +0,0 @@
-ENTRY(protected_start)
diff --git a/src/northbridge/via/vx800/Makefile.inc b/src/northbridge/via/vx800/Makefile.inc
index 39ebdbd..1963880 100644
--- a/src/northbridge/via/vx800/Makefile.inc
+++ b/src/northbridge/via/vx800/Makefile.inc
@@ -24,4 +24,4 @@ ramstage-y += lpc.c
ramstage-y += ide.c
chipset_bootblock_inc += $(src)/northbridge/via/vx800/romstrap.inc
-chipset_bootblock_lds += $(src)/northbridge/via/vx800/romstrap.lds
+chipset_bootblock_lds += $(src)/northbridge/via/vx800/romstrap.ld
diff --git a/src/northbridge/via/vx800/romstrap.ld b/src/northbridge/via/vx800/romstrap.ld
new file mode 100644
index 0000000..8aa570f
--- /dev/null
+++ b/src/northbridge/via/vx800/romstrap.ld
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007 AMD
+ * (Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+SECTIONS {
+ . = (0xffffffff - 0x2c) - (__romstrap_end - __romstrap_start) + 1;
+ .romstrap (.): {
+ *(.romstrap)
+ }
+}
diff --git a/src/northbridge/via/vx800/romstrap.lds b/src/northbridge/via/vx800/romstrap.lds
deleted file mode 100644
index 8aa570f..0000000
--- a/src/northbridge/via/vx800/romstrap.lds
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007 AMD
- * (Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-SECTIONS {
- . = (0xffffffff - 0x2c) - (__romstrap_end - __romstrap_start) + 1;
- .romstrap (.): {
- *(.romstrap)
- }
-}
diff --git a/src/northbridge/via/vx900/Makefile.inc b/src/northbridge/via/vx900/Makefile.inc
index 15fd859..85282dd 100644
--- a/src/northbridge/via/vx900/Makefile.inc
+++ b/src/northbridge/via/vx900/Makefile.inc
@@ -45,4 +45,4 @@ ramstage-y += ./../../../drivers/pc80/vga/vga_io.c
chipset_bootblock_inc += $(src)/northbridge/via/vx900/romstrap.inc
-chipset_bootblock_lds += $(src)/northbridge/via/vx900/romstrap.lds
+chipset_bootblock_lds += $(src)/northbridge/via/vx900/romstrap.ld
diff --git a/src/northbridge/via/vx900/romstrap.ld b/src/northbridge/via/vx900/romstrap.ld
new file mode 100644
index 0000000..fc63c05
--- /dev/null
+++ b/src/northbridge/via/vx900/romstrap.ld
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007 AMD
+ * (Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD)
+ * Copyright (C) 2011 Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ */
+
+SECTIONS {
+ . = (0x100000000 - 0x2c) - (__romstrap_end - __romstrap_start);
+ .romstrap (.): {
+ *(.romstrap)
+ }
+}
diff --git a/src/northbridge/via/vx900/romstrap.lds b/src/northbridge/via/vx900/romstrap.lds
deleted file mode 100644
index fc63c05..0000000
--- a/src/northbridge/via/vx900/romstrap.lds
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007 AMD
- * (Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD)
- * Copyright (C) 2011 Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- */
-
-SECTIONS {
- . = (0x100000000 - 0x2c) - (__romstrap_end - __romstrap_start);
- .romstrap (.): {
- *(.romstrap)
- }
-}
diff --git a/src/southbridge/nvidia/ck804/Makefile.inc b/src/southbridge/nvidia/ck804/Makefile.inc
index db145d0..dacfc9c 100644
--- a/src/southbridge/nvidia/ck804/Makefile.inc
+++ b/src/southbridge/nvidia/ck804/Makefile.inc
@@ -20,4 +20,4 @@ ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
romstage-y += early_smbus.c
chipset_bootblock_inc += $(src)/southbridge/nvidia/ck804/romstrap.inc
-chipset_bootblock_lds += $(src)/southbridge/nvidia/ck804/romstrap.lds
+chipset_bootblock_lds += $(src)/southbridge/nvidia/ck804/romstrap.ld
diff --git a/src/southbridge/nvidia/ck804/nic.c b/src/southbridge/nvidia/ck804/nic.c
index b827dcf..1207a95 100644
--- a/src/southbridge/nvidia/ck804/nic.c
+++ b/src/southbridge/nvidia/ck804/nic.c
@@ -90,7 +90,7 @@ static void nic_init(struct device *dev)
/* If that is invalid we will read that from romstrap. */
if (!eeprom_valid) {
u32 *mac_pos;
- mac_pos = (u32 *)0xffffffd0; /* See romstrap.inc and romstrap.lds. */
+ mac_pos = (u32 *)0xffffffd0; /* See romstrap.inc and romstrap.ld. */
mac_l = read32(mac_pos) + nic_index;
mac_h = read32(mac_pos + 1);
}
diff --git a/src/southbridge/nvidia/ck804/romstrap.ld b/src/southbridge/nvidia/ck804/romstrap.ld
new file mode 100644
index 0000000..4d7996f
--- /dev/null
+++ b/src/southbridge/nvidia/ck804/romstrap.ld
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2004 Tyan Computer
+ * Written by Yinghai Lu <yhlu(a)tyan.com> for Tyan Computer.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+SECTIONS {
+ . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
+ .romstrap (.): {
+ *(.romstrap)
+ }
+}
diff --git a/src/southbridge/nvidia/ck804/romstrap.lds b/src/southbridge/nvidia/ck804/romstrap.lds
deleted file mode 100644
index 4d7996f..0000000
--- a/src/southbridge/nvidia/ck804/romstrap.lds
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2004 Tyan Computer
- * Written by Yinghai Lu <yhlu(a)tyan.com> for Tyan Computer.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-SECTIONS {
- . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
- .romstrap (.): {
- *(.romstrap)
- }
-}
diff --git a/src/southbridge/nvidia/mcp55/Makefile.inc b/src/southbridge/nvidia/mcp55/Makefile.inc
index 03a34eb..b4dc460 100644
--- a/src/southbridge/nvidia/mcp55/Makefile.inc
+++ b/src/southbridge/nvidia/mcp55/Makefile.inc
@@ -19,4 +19,4 @@ romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
chipset_bootblock_inc += $(src)/southbridge/nvidia/mcp55/romstrap.inc
-chipset_bootblock_lds += $(src)/southbridge/nvidia/mcp55/romstrap.lds
+chipset_bootblock_lds += $(src)/southbridge/nvidia/mcp55/romstrap.ld
diff --git a/src/southbridge/nvidia/mcp55/nic.c b/src/southbridge/nvidia/mcp55/nic.c
index 136d060..d8f691a 100644
--- a/src/southbridge/nvidia/mcp55/nic.c
+++ b/src/southbridge/nvidia/mcp55/nic.c
@@ -162,7 +162,7 @@ static void nic_init(struct device *dev)
// if that is invalid we will read that from romstrap
if(!eeprom_valid) {
u32 *mac_pos;
- mac_pos = (u32 *)0xffffffd0; // refer to romstrap.inc and romstrap.lds
+ mac_pos = (u32 *)0xffffffd0; // refer to romstrap.inc and romstrap.ld
mac_l = read32(mac_pos) + nic_index; // overflow?
mac_h = read32(mac_pos + 1);
diff --git a/src/southbridge/nvidia/mcp55/romstrap.ld b/src/southbridge/nvidia/mcp55/romstrap.ld
new file mode 100644
index 0000000..784e7d5
--- /dev/null
+++ b/src/southbridge/nvidia/mcp55/romstrap.ld
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007 AMD
+ * Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+SECTIONS {
+ . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
+ .romstrap (.): {
+ *(.romstrap)
+ }
+}
diff --git a/src/southbridge/nvidia/mcp55/romstrap.lds b/src/southbridge/nvidia/mcp55/romstrap.lds
deleted file mode 100644
index 784e7d5..0000000
--- a/src/southbridge/nvidia/mcp55/romstrap.lds
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007 AMD
- * Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-SECTIONS {
- . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
- .romstrap (.): {
- *(.romstrap)
- }
-}
diff --git a/src/southbridge/sis/sis966/Makefile.inc b/src/southbridge/sis/sis966/Makefile.inc
index 1a9ea65..5c69622 100644
--- a/src/southbridge/sis/sis966/Makefile.inc
+++ b/src/southbridge/sis/sis966/Makefile.inc
@@ -14,4 +14,4 @@ romstage-$(CONFIG_USBDEBUG_IN_ROMSTAGE) += enable_usbdebug.c
ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
chipset_bootblock_inc += $(src)/southbridge/sis/sis966/romstrap.inc
-chipset_bootblock_lds += $(src)/southbridge/sis/sis966/romstrap.lds
+chipset_bootblock_lds += $(src)/southbridge/sis/sis966/romstrap.ld
diff --git a/src/southbridge/sis/sis966/romstrap.ld b/src/southbridge/sis/sis966/romstrap.ld
new file mode 100644
index 0000000..784e7d5
--- /dev/null
+++ b/src/southbridge/sis/sis966/romstrap.ld
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007 AMD
+ * Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+SECTIONS {
+ . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
+ .romstrap (.): {
+ *(.romstrap)
+ }
+}
diff --git a/src/southbridge/sis/sis966/romstrap.lds b/src/southbridge/sis/sis966/romstrap.lds
deleted file mode 100644
index 784e7d5..0000000
--- a/src/southbridge/sis/sis966/romstrap.lds
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007 AMD
- * Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-SECTIONS {
- . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
- .romstrap (.): {
- *(.romstrap)
- }
-}
diff --git a/src/southbridge/via/k8t890/Makefile.inc b/src/southbridge/via/k8t890/Makefile.inc
index 6d9407d..1c5ff3f 100644
--- a/src/southbridge/via/k8t890/Makefile.inc
+++ b/src/southbridge/via/k8t890/Makefile.inc
@@ -9,4 +9,4 @@ ramstage-y += error.c
ramstage-y += chrome.c
chipset_bootblock_inc += $(src)/southbridge/via/k8t890/romstrap.inc
-chipset_bootblock_lds += $(src)/southbridge/via/k8t890/romstrap.lds
+chipset_bootblock_lds += $(src)/southbridge/via/k8t890/romstrap.ld
diff --git a/src/southbridge/via/k8t890/romstrap.ld b/src/southbridge/via/k8t890/romstrap.ld
new file mode 100644
index 0000000..235769d
--- /dev/null
+++ b/src/southbridge/via/k8t890/romstrap.ld
@@ -0,0 +1,29 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007 AMD
+ * (Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* Modified for K8T890 ROM strap by Rudolf Marek <r.marek(a)assembler.cz>. */
+
+SECTIONS {
+ . = (0xffffffff - 0x2c) - (__romstrap_end - __romstrap_start) + 1;
+ .romstrap (.): {
+ *(.romstrap)
+ }
+}
diff --git a/src/southbridge/via/k8t890/romstrap.lds b/src/southbridge/via/k8t890/romstrap.lds
deleted file mode 100644
index 235769d..0000000
--- a/src/southbridge/via/k8t890/romstrap.lds
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007 AMD
- * (Written by Yinghai Lu <yinghai.lu(a)amd.com> for AMD)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/* Modified for K8T890 ROM strap by Rudolf Marek <r.marek(a)assembler.cz>. */
-
-SECTIONS {
- . = (0xffffffff - 0x2c) - (__romstrap_end - __romstrap_start) + 1;
- .romstrap (.): {
- *(.romstrap)
- }
-}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9090
-gerrit
commit e2659c9f0bfacb49a30005b7d2b6fd636eae14e5
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu Sep 18 13:48:49 2014 -0500
arm64: provide entry points for BSP and non-BSP
It's helpful to differentiate the startup paths for
the BSP and the non-BSP. Therefore have c_entry
be an 2 element array of function pointers. The
non-BSP paths have an entry point one instruction after
stage/module entry.
BUG=chrome-os-partner:30785
BRANCH=None
TEST=Built and booted to kernel.
Change-Id: I40bb40462906f1b1eaf2db8584985095e8ac0bae
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: ce10f954041b3fd581ad8a3d82dee567b68637fe
Original-Change-Id: Ia573b1095dca5f69e371bf1ddf6b6df72fa3b52e
Original-Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/218844
Original-Reviewed-by: Furquan Shaikh <furquan(a)chromium.org>
---
src/arch/arm64/c_entry.c | 21 +++++++++------------
src/arch/arm64/include/arch/stages.h | 18 +++++++++++++++---
src/arch/arm64/stage_entry.S | 32 +++++++++++++++++++++++++++-----
3 files changed, 51 insertions(+), 20 deletions(-)
diff --git a/src/arch/arm64/c_entry.c b/src/arch/arm64/c_entry.c
index f4a9848..5e3dfe8 100644
--- a/src/arch/arm64/c_entry.c
+++ b/src/arch/arm64/c_entry.c
@@ -24,13 +24,6 @@
#include <arch/stages.h>
#include "cpu-internal.h"
-/*
- * This variable holds entry point for CPUs starting up. Before the other
- * CPUs are brought up this value will change to provide the secondary
- * code path.
- */
-void (*c_entry)(void) = &arm64_init;
-
void __attribute__((weak)) arm64_soc_init(void)
{
/* Default weak implementation does nothing. */
@@ -54,7 +47,7 @@ static void seed_stack(void)
*slot++ = 0xdeadbeefdeadbeefULL;
}
-void arm64_init(void)
+static void arm64_init(void)
{
cpu_set_bsp();
seed_stack();
@@ -71,11 +64,15 @@ static void secondary_cpu_start(void)
arch_secondary_cpu_init();
}
+/*
+ * This variable holds entry point for CPUs starting up. The first
+ * element is the BSP path, and the second is the non-BSP path.
+ */
+void (*c_entry[2])(void) = { &arm64_init, &secondary_cpu_start };
+
extern void arm64_cpu_startup(void);
+
void *prepare_secondary_cpu_startup(void)
{
- c_entry = &secondary_cpu_start;
- dcache_clean_invalidate_by_mva(c_entry, sizeof(c_entry));
-
- return &arm64_cpu_startup;
+ return secondary_entry_point(&arm64_cpu_startup);
}
diff --git a/src/arch/arm64/include/arch/stages.h b/src/arch/arm64/include/arch/stages.h
index 9771492..fd633e4 100644
--- a/src/arch/arm64/include/arch/stages.h
+++ b/src/arch/arm64/include/arch/stages.h
@@ -20,18 +20,30 @@
#ifndef __ARCH_STAGES_H
#define __ARCH_STAGES_H
+#include <stdint.h>
+
extern void main(void);
void stage_entry(void);
void stage_exit(void *);
void jmp_to_elf_entry(void *entry, unsigned long buffer, unsigned long size);
-/* C entry point for all arm64 stages. */
-void arm64_init(void);
-
/* This function is called upon initial entry of each stage. It is called prior
* to main(). That means all of the common infrastructure will most likely not
* be available to be used (such as console). */
void arm64_soc_init(void);
+/*
+ * Stages and rmodules have 2 entry points: BSP and non-BSP. Provided
+ * a pointer the correct non-BSP entry point will be returned. The
+ * first instruction is for BSP and the 2nd is for non-BSP. Instructions
+ * are all 32-bit on arm64.
+ */
+static inline void *secondary_entry_point(void *e)
+{
+ uintptr_t nonbsp = (uintptr_t)e;
+
+ return (void *)(nonbsp + sizeof(uint32_t));
+}
+
#endif
diff --git a/src/arch/arm64/stage_entry.S b/src/arch/arm64/stage_entry.S
index 6b8ca7b..5a5ddab 100644
--- a/src/arch/arm64/stage_entry.S
+++ b/src/arch/arm64/stage_entry.S
@@ -105,6 +105,8 @@ ENTRY(arm64_c_environment)
/* Get entry point by dereferencing c_entry. */
ldr x1, 1f
+ /* Retrieve entry in c_entry array using x26 as the index. */
+ adds x1, x1, x26, lsl #3
ldr x1, [x1]
/* Move back the arguments from x25 to x0 */
mov x0, x25
@@ -114,14 +116,28 @@ ENTRY(arm64_c_environment)
.quad c_entry
ENDPROC(arm64_c_environment)
+/* The first 2 instructions are for BSP and secondary CPUs,
+ * respectively. x26 holds the index into c_entry array. */
+.macro split_bsp_path
+ b 2000f
+ b 2001f
+ 2000:
+ mov x26, #0
+ b 2002f
+ 2001:
+ mov x26, #1
+ 2002:
+.endm
+
ENTRY(__rmodule_entry)
+ split_bsp_path
/* Save the arguments to secmon in x25 */
- mov x25, x0
- b arm64_c_environment
+ mov x25, x0
+ b arm64_c_environment
ENDPROC(__rmodule_entry)
-CPU_RESET_ENTRY(arm64_cpu_startup)
- read_current x0, sctlr
+ENTRY(_arm64_cpu_startup)
+ read_current x0, sctlr
bic x0, x0, #(1 << 25) /* Little Endian */
bic x0, x0, #(1 << 19) /* XN not enforced */
bic x0, x0, #(1 << 12) /* Disable Instruction Cache */
@@ -129,8 +145,14 @@ CPU_RESET_ENTRY(arm64_cpu_startup)
write_current sctlr, x0, x1
isb
b arm64_c_environment
+ENDPROC(_arm64_cpu_startup)
+
+CPU_RESET_ENTRY(arm64_cpu_startup)
+ split_bsp_path
+ b _arm64_cpu_startup
ENDPROC(arm64_cpu_startup)
ENTRY(stage_entry)
- b arm64_cpu_startup
+ split_bsp_path
+ b _arm64_cpu_startup
ENDPROC(stage_entry)