Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2885
-gerrit
commit 4ebb501ac903db8585e0caa6534240c1e9873d48
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Fri Mar 22 20:23:17 2013 -0500
x86: mark .textfirst as allocatable and executable
When the linking of ramstage was changed to use an intermeidate
object with all ramstage objects in it the .textfirst section
was introduced to keep the entry point at 0. However, the
section was not marked allocatable or executable. Nor was it
marked as @progbits. That didn't cause an issue on its own since
.textfirst was directly called out in the linker script. However,
the rmodule infrastructure relies on all the relocation entries
being included in the rmodule. Without the proper section attributes
the .rel.textfirst section entries were not being included in
the final ramstage rmodule.
Change-Id: I54e7055a19bee6c86e269eba047d9a560702afde
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/arch/x86/lib/c_start.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch/x86/lib/c_start.S b/src/arch/x86/lib/c_start.S
index 762aa8c..32af0cc 100644
--- a/src/arch/x86/lib/c_start.S
+++ b/src/arch/x86/lib/c_start.S
@@ -11,7 +11,7 @@ _stack:
.space CONFIG_MAX_CPUS*CONFIG_STACK_SIZE
_estack:
- .section ".textfirst"
+ .section ".textfirst", "ax", @progbits
.code32
.globl _start
_start:
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2884
-gerrit
commit adf3c0d15f1aabbc7b84858dd013c2055077bb89
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Fri Mar 22 19:59:52 2013 -0500
relocatable ramstage: fix linking
The ramstage is now linked using an intermediate object that
is created from the complete list of ramstage object files.
The rmodule code was developed when ramstage was linked using
an archive file. Because of the fact that the rmodule headers
are not referenced from any other object the link could start
by specifying the rmodule header object for ramstage. That,
however, is not the case as all ramstage objects are included
in the intermediate linked object. Therefore, the
ramstage_module_header.ramstage.o object file needs to be removed
from the object list for the ramstage rmodule.
Change-Id: I6a79b6f8dd1dbfe40fdc7753297243c3c9b45fae
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/arch/x86/Makefile.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 377a863..bbf2336 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -162,7 +162,7 @@ $(objcbfs)/%.elf: $(objcbfs)/%.debug
ifeq ($(CONFIG_RELOCATABLE_RAMSTAGE),y)
-$(eval $(call rmodule_link,$(objcbfs)/coreboot_ram.debug, $(obj)/arch/x86/boot/ramstage_module_header.ramstage.o $(objgenerated)/coreboot_ram.o, $(CONFIG_HEAP_SIZE)))
+$(eval $(call rmodule_link,$(objcbfs)/coreboot_ram.debug, $(objgenerated)/coreboot_ram.o, $(CONFIG_HEAP_SIZE)))
else
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2883
-gerrit
commit ce0f7cd302dcf2bdfe14abd75e1b4ec6e22a1b11
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Fri Mar 22 19:55:35 2013 -0500
rmodule: align ld script with latest x86 ld script
The x86 linker script added a .textfirst section. In
order to properly link ramstage as a relocatable module
the .textfirst section needs to be included.
Also, the support for code coverage was added by including
the constructor section and symbols. Coverage has not been
tested as I suspect it might not work in a relocatable
environment without some tweaking. However, the section
and symbols are there if needed.
Change-Id: Ie1f6d987d6eb657ed4aa3a8918b2449dafaf9463
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/lib/rmodule.ld | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/lib/rmodule.ld b/src/lib/rmodule.ld
index c8bd297..41d6357 100644
--- a/src/lib/rmodule.ld
+++ b/src/lib/rmodule.ld
@@ -37,11 +37,17 @@ SECTIONS
.text : AT (_payload_begin_offset) {
/* C code of the module. */
+ *(.textfirst);
*(.text);
*(.text.*);
/* C read-only data. */
. = ALIGN(16);
+ __CTOR_LIST__ = .;
+ *(.ctors);
+ LONG(0);
+ __CTOR_END__ = .;
+
/* The driver sections are to allow linking coreboot's
* ramstage with the rmodule linker. Any changes made in
* coreboot_ram.ld should be made here as well. */
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2882
-gerrit
commit 5e820ed5a7abda5b1d568fc6db14150ac7627da3
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Fri Mar 22 19:52:42 2013 -0500
x86: expose console_tx_flush in romstage
The vboot module relied on being able to flush the console
after it called vtxprintf() from its log wrapper function.
Expose the console_tx_flush() function in romstage so the
vboot module can ensure messages are flushed.
Change-Id: I578053df4b88c2068bd9cc90eea5573069a0a4e8
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/arch/x86/lib/romstage_console.c | 2 +-
src/include/console/console.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c
index f43db05..f53f5a9 100644
--- a/src/arch/x86/lib/romstage_console.c
+++ b/src/arch/x86/lib/romstage_console.c
@@ -54,7 +54,7 @@ void console_tx_byte(unsigned char byte)
#endif
}
-static void console_tx_flush(void)
+void console_tx_flush(void)
{
#if CONFIG_CONSOLE_SERIAL8250MEM
uart8250_mem_tx_flush(CONFIG_OXFORD_OXPCIE_BASE_ADDRESS + 0x1000);
diff --git a/src/include/console/console.h b/src/include/console/console.h
index 496571b..0b63644 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -38,7 +38,6 @@
#endif
#ifndef __PRE_RAM__
-void console_tx_flush(void);
unsigned char console_rx_byte(void);
int console_tst_byte(void);
struct console_driver {
@@ -68,6 +67,7 @@ extern int console_loglevel;
#ifndef __ROMCC__
void console_init(void);
void console_tx_byte(unsigned char byte);
+void console_tx_flush(void);
void post_code(u8 value);
/* this function is weak and can be overridden by a mainboard function. */
void mainboard_post(u8 value);
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2880
-gerrit
commit f06cf25f0aee1cc5ebf60ce627afb00bcb26747d
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Fri Mar 22 19:46:16 2013 -0500
cbfs: fix relocation ramstage compiler errors
There were some cbfs calls that did not get transitioned
to the new cbfs API. Fix the callsites to conform to the
actual cbfs, thus fixing the copilation errors.
Change-Id: Ia9fe2c4efa32de50982e21bd01457ac218808bd3
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/lib/cbfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 39e6c11..aba1bcc 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -239,13 +239,13 @@ void * cbfs_load_stage(struct cbfs_media *media, const char *name)
ramstage = cbmem_entry_find(CBMEM_ID_RAMSTAGE);
if (ramstage == NULL)
- return load_stage_from_cbfs(name, handoff);
+ return load_stage_from_cbfs(media, name, handoff);
/* S3 resume path. Load a cached copy of the loaded ramstage. If
* return value is NULL load from cbfs. */
entry = load_cached_ramstage(handoff, ramstage);
if (entry == NULL)
- return load_stage_from_cbfs(name, handoff);
+ return load_stage_from_cbfs(media, name, handoff);
return entry;
}
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2879
-gerrit
commit 2d13875cee822524e33b5cbcf952187bc980b4ff
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Fri Mar 22 19:35:56 2013 -0500
xcompile: honor LINKER_SUFFIX variable
In commit e820e5cb3aed810fa9ba6047ce9b8bf352335e32 titled
"Make xcompile support multiple architectures" the LINKER_SUFFIX
variable was introduced to bypass gold if the bfd linker was
available. However, the LINKER_SUFFIX wasn't honored when
the compiler evironment variables were set. Fix the original
intention.
Change-Id: I608f1e0cc3d0bea3ba1e51b167d88c66d266bceb
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
util/xcompile/xcompile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index fa9f442..ff12217 100644
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -118,7 +118,7 @@ report_arch_toolchain() {
# elf${TWIDTH}-${TBFDARCH} toolchain (${GCCPREFIX}gcc)
CC_${TARCH}:=${GCCPREFIX}gcc ${CFLAGS}
AS_${TARCH}:=${GCCPREFIX}as ${ASFLAGS}
-LD_${TARCH}:=${GCCPREFIX}ld ${LDFLAGS}
+LD_${TARCH}:=${GCCPREFIX}ld${LINKER_SUFFIX} ${LDFLAGS}
NM_${TARCH}:=${GCCPREFIX}nm
OBJCOPY_${TARCH}:=${GCCPREFIX}objcopy
OBJDUMP_${TARCH}:=${GCCPREFIX}objdump
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2381
-gerrit
commit ca55596d8dbc1edf0fdd51b5a26835b9fcbe1a3f
Author: Christian Gmeiner <christian.gmeiner(a)gmail.com>
Date: Wed Feb 13 11:07:38 2013 +0100
console: Make use of CONFIG_USE_OPTION_TABLE
It makes much more sense to use CONFIG_USE_OPTION_TABLE instead
of CONFIG_HAVE_CMOS_DEFAULT. As we want to read the used
debug_level from our CMOS. This change makes it possible to
change log_debug via nvramtool and make use of the new
value after a reboot/poweroff.
CONFIG_HAVE_CMOS_DEFAULT does have an other meaning
Change-Id: I438dd01a2b4171dba2b73f2001511c71f4317725
Signed-off-by: Christian Gmeiner <christian.gmeiner(a)gmail.com>
---
src/console/console.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/console/console.c b/src/console/console.c
index 34a26ec..afbba9d 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -30,7 +30,7 @@
* storage can be used. This will benefit machines without CMOS as well as those
* without a battery-backed CMOS (e.g. some laptops).
*/
-#if CONFIG_HAVE_CMOS_DEFAULT
+#if CONFIG_USE_OPTION_TABLE
#include <pc80/mc146818rtc.h>
#else
static inline int get_option(void *dest, const char *name) { return -1; }