Gabe Black (gabeblack(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3582
-gerrit
commit c0b322e1f98fb7bffa8327962eca6339cce69bff
Author: Gabe Black <gabeblack(a)chromium.org>
Date: Mon Jul 1 05:16:19 2013 -0700
am335x: Add the config variable ROMSTAGE_BASE to the CPU's Kconfig.
This variable wasn't being defined and was defaulting to zero when used in the
ROM stage's linker script. This change defines it as a variable, and gives it
a value which is slightly beyond the end of the bootblock. By making the ROM
stage request to be loaded slightly farther into memory than it was loaded by
the SOC's masked ROM, we ensure that it's moved away from the stage's metadata
instead of on top of it. When it moves the other way, it clobbers important
values like the entry point vefore the bootblock has had a chance to use them.
Change-Id: I027a1365d05f1d79d7fc1e1349965ccb7d4e81b9
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
---
src/cpu/ti/am335x/Kconfig | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/cpu/ti/am335x/Kconfig b/src/cpu/ti/am335x/Kconfig
index 472fbe7..0c37eef 100644
--- a/src/cpu/ti/am335x/Kconfig
+++ b/src/cpu/ti/am335x/Kconfig
@@ -10,6 +10,17 @@ config BOOTBLOCK_BASE
hex
default 0x402f0400
+config CBFS_ROM_OFFSET
+ # Calculated by BL1 + max bootblock size.
+ default 0x4c00
+
+# We need to leave a gap between the bootblock and the ROM stage so that when
+# it is "loaded" to a slightly different place in on chip memory, it doesn't
+# clobber the metadata needed to actually enter it.
+config ROMSTAGE_BASE
+ hex
+ default 0x402f5400
+
# Stack may reside in either IRAM or DRAM. We will define it to live
# at the top of IRAM for now.
#
@@ -27,11 +38,6 @@ config STACK_SIZE
hex
default 0x1000
-config CBFS_ROM_OFFSET
- # Calculated by BL1 + max bootblock size.
- hex "offset of CBFS data in ROM"
- default 0x2800
-
## TODO Change this to some better address not overlapping bootblock when
## cbfstool supports creating header in arbitrary location.
config CBFS_HEADER_ROM_OFFSET
Gabe Black (gabeblack(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3581
-gerrit
commit 577dc1595aa0c7a7247dee7589ab2046d7261e52
Author: Gabe Black <gabeblack(a)chromium.org>
Date: Mon Jul 1 05:12:40 2013 -0700
beaglebone: Put some code in romstage.c so we can tell if it ran.
The placeholder code in beaglebone's romstage.c didn't do anything, it just
immediately tried to load the RAM stage and jump into it. That doesn't
currently work, and there's no indication whether you actually successfully
got into the ROM stage or not.
This change adds a few lines which initialize the console and say "Hi" so that
we can tell that the ROM stage is running.
Change-Id: I45a0908c3ac65b21e0e5020428696d2e54933d0e
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
---
src/mainboard/ti/beaglebone/romstage.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mainboard/ti/beaglebone/romstage.c b/src/mainboard/ti/beaglebone/romstage.c
index 3b9cae8..e66a3dd 100644
--- a/src/mainboard/ti/beaglebone/romstage.c
+++ b/src/mainboard/ti/beaglebone/romstage.c
@@ -29,6 +29,9 @@ void main(void)
{
void *entry;
+ console_init();
+ printk(BIOS_INFO, "Hello from romstage.\n");
+
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/coreboot_ram");
printk(BIOS_INFO, "entry is 0x%p, leaving romstage.\n", entry);
Gabe Black (gabeblack(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3580
-gerrit
commit 4e0f3ce6a31e831870b590d62c1bf23eb5bac0e4
Author: Gabe Black <gabeblack(a)chromium.org>
Date: Mon Jul 1 05:03:47 2013 -0700
ARM: Define custom ELF headers for ARM.
At least when building with the gnu toolchain, the headers the linker
automatically generate save space for the actual ELF headers in one of the
loadable segments. This creates two problems. First, the data you intended to
be at the start of the image doesn't actually show up there, it's actually the
ELF headers. Second, the ELF headers are essentially useless for firmware
since there's currently nothing to tell you where they are, and even if there
was, there isn't much of a reason to look at them. They're useful in userspace
for, for instance, the dynamic linker, but not really in firmware.
This change adds a PHDRS construct to each of the linker scripts used on ARM
which define a single segment called to_load which does not have the flag set
which would tell the linker to put headers in it. The first section defined in
the script has ": to_load" to tell the linker which segment to put it in, and
from that point on the other sections go in there by default.
Change-Id: I24b721eb436d17afd234002ae82f9166d2fcf65d
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
---
src/arch/armv7/bootblock.lds | 7 ++++++-
src/arch/armv7/coreboot_ram.ld | 7 ++++++-
src/arch/armv7/romstage.ld | 7 ++++++-
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/arch/armv7/bootblock.lds b/src/arch/armv7/bootblock.lds
index 8370396..f16e72b 100644
--- a/src/arch/armv7/bootblock.lds
+++ b/src/arch/armv7/bootblock.lds
@@ -22,6 +22,11 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
+PHDRS
+{
+ to_load PT_LOAD;
+}
+
TARGET(binary)
SECTIONS
{
@@ -39,7 +44,7 @@ SECTIONS
*(.rom.data.*);
*(.rodata.*);
_erom = .;
- } = 0xff
+ } : to_load = 0xff
/DISCARD/ : {
*(.comment)
diff --git a/src/arch/armv7/coreboot_ram.ld b/src/arch/armv7/coreboot_ram.ld
index 487f610..38eaca3 100644
--- a/src/arch/armv7/coreboot_ram.ld
+++ b/src/arch/armv7/coreboot_ram.ld
@@ -24,6 +24,11 @@ INCLUDE ldoptions
ENTRY(stage_entry)
+PHDRS
+{
+ to_load PT_LOAD;
+}
+
SECTIONS
{
. = CONFIG_SYS_SDRAM_BASE;
@@ -38,7 +43,7 @@ SECTIONS
*(.text.*);
. = ALIGN(16);
_etext = .;
- }
+ } : to_load
.ctors : {
. = ALIGN(0x100);
diff --git a/src/arch/armv7/romstage.ld b/src/arch/armv7/romstage.ld
index 568ac1a..0555fc4 100644
--- a/src/arch/armv7/romstage.ld
+++ b/src/arch/armv7/romstage.ld
@@ -30,6 +30,11 @@ OUTPUT_ARCH(arm)
ENTRY(stage_entry)
+PHDRS
+{
+ to_load PT_LOAD;
+}
+
SECTIONS
{
/* TODO make this a configurable option (per chipset). */
@@ -41,7 +46,7 @@ SECTIONS
*(.text.stage_entry.armv7);
*(.text.startup);
*(.text);
- }
+ } : to_load
.romdata . : {
*(.rodata);
the following patch was just integrated into master:
commit 4e7385b58fcff0f59db6f0c4852a57e74f0d3b00
Author: Peter Stuge <peter(a)stuge.se>
Date: Thu Oct 4 21:18:13 2012 +0200
SMBIOS: Allow overriding default Manufacturer and Product names
The vendor and part name from coreboot is normally stored in these
SMBIOS structure fields, but it can be useful to override them.
On Lenovo ThinkPads an override is e.g. needed to convince the Linux
thinkpad_acpi.c driver that it is actually running on a ThinkPad.
Change-Id: I0dfe38b9f6f99b3376f1547412ecc97c2f7aff2b
Signed-off-by: Peter Stuge <peter(a)stuge.se>
Reviewed-on: http://review.coreboot.org/1556
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Christian Gmeiner <christian.gmeiner(a)gmail.com>
See http://review.coreboot.org/1556 for details.
-gerrit
the following patch was just integrated into master:
commit d98cef1956aefecdfeba652085f301ea07118147
Author: Peter Stuge <peter(a)stuge.se>
Date: Tue Jul 9 20:44:52 2013 +0200
lenovo/t60 lenovo/x60: Override SMBIOS Manufacturer to be LENOVO
This is needed for the Linux thinkpad_acpi.c driver to load.
Change-Id: I3d9549395556ffb0abfc3cb52b3d01386c34caa5
Signed-off-by: Peter Stuge <peter(a)stuge.se>
Reviewed-on: http://review.coreboot.org/3731
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3731 for details.
-gerrit
the following patch was just integrated into master:
commit 7a6651ceb3ede6b35053ad65358d6994facc217e
Author: Gabe Black <gabeblack(a)google.com>
Date: Sun Jul 7 14:15:22 2013 -0700
arm: Add and enable an arch specific version of memmove.
This version is taken from arch/arm/lib/memmove.S in the Linux kernel.
Change-Id: Ic875d0cf5b1cb407606530b7f465c406b134f0fa
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Reviewed-on: http://review.coreboot.org/3763
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3763 for details.
-gerrit
the following patch was just integrated into master:
commit ccdc005b015f4211d0fa0d45393c5e4104620c53
Author: Gabe Black <gabeblack(a)google.com>
Date: Sun Jul 7 14:08:30 2013 -0700
x86: Add and enable an arch verson of memmove.
This is from memcpy_32.c in the Linux kernel. There was no copyright header
in the original file either.
Change-Id: Ifd259cb8a87615dce79ed1e551cc4bacb0414b4f
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Reviewed-on: http://review.coreboot.org/3762
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3762 for details.
-gerrit
the following patch was just integrated into master:
commit 545c0caac8ff5cc5c8cc80b1c4d6dce5a2e17032
Author: Gabe Black <gabeblack(a)google.com>
Date: Sun Jul 7 14:04:26 2013 -0700
Add a HAVE_ARCH_MEMMOVE option to allow overriding memmove.
Change-Id: I4b6a57e7d8e7e685c609b1d85368585b9dd197dc
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Reviewed-on: http://review.coreboot.org/3761
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3761 for details.
-gerrit