Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4719
-gerrit
commit 64d24c0482ebd53fdad30b4d5a44af66575ea111
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Thu Feb 20 05:10:09 2014 +1100
CAR_GLOBAL: enforce compiler to check if _start != _end
There are some fun rules C compilers can use to optimize their code.
One of them is the assumption that two symbols point to two different
addresses.
In this case this wasn't true, resulting in unintended code execution
(and later, a crash) with a clang build.
Change-Id: I1496b22e1d1869ed0610e321b6ec6a83252e9d8b
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
src/arch/x86/init/romstage.ld | 1 +
src/cpu/x86/car.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/init/romstage.ld b/src/arch/x86/init/romstage.ld
index f44185f..5458cfc 100644
--- a/src/arch/x86/init/romstage.ld
+++ b/src/arch/x86/init/romstage.ld
@@ -37,6 +37,7 @@ SECTIONS
. = ALIGN(16);
_car_migrate_start = .;
*(.car.migrate);
+ LONG(0);
_car_migrate_end = .;
. = ALIGN(16);
_erom = .;
diff --git a/src/cpu/x86/car.c b/src/cpu/x86/car.c
index 481153d..a7e3842 100644
--- a/src/cpu/x86/car.c
+++ b/src/cpu/x86/car.c
@@ -26,7 +26,6 @@
typedef void (* const car_migration_func_t)(void);
extern car_migration_func_t _car_migrate_start;
-extern car_migration_func_t _car_migrate_end;
extern char _car_data_start[];
extern char _car_data_end[];
@@ -98,7 +97,7 @@ void car_migrate_variables(void)
/* Call all the migration functions. */
migrate_func = &_car_migrate_start;
- while (migrate_func != &_car_migrate_end) {
+ while (*migrate_func != NULL) {
(*migrate_func)();
migrate_func++;
}
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5272
-gerrit
commit d3a41480fbdffc62f9cb100c1ba012db7b50139e
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Thu Feb 20 16:08:51 2014 +1100
qemu-i440fx: Ignore missing prototype for entry point main()
The main of romstage in qemu-i440fx is called as the entry point in
assembler and so should be compiled with -ffreestanding. We should also
ignore a missing prototype in this particular case.
Change-Id: Id0ce2348483c6e5388369000451811673f0c4eaa
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
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 4b28697..7362b64 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -266,7 +266,7 @@ else
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h $(obj)/config.h
@printf " CC romstage.inc\n"
- $(CC) -MMD $(CFLAGS) -D__PRE_RAM__ -I$(src) -I. -I$(obj) -c -S $< -o $@
+ $(CC) -MMD $(CFLAGS) -ffreestanding -Wno-missing-prototypes -D__PRE_RAM__ -I$(src) -I. -I$(obj) -c -S $< -o $@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc
@printf " POST romstage.inc\n"
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5273
-gerrit
commit 90645ca34e8061d5387c30f1589d1876ef78baee
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Thu Feb 20 19:37:42 2014 +1100
romcc.c: Suppress warning about unused function.
GCC suppresses warnings about unused static functions if they are
inline, however Clang only does this for header files. Add attribute to
suppress unused function warning on Clang.
Change-Id: Ia230beba3f6367237838d9b3d90536459e1d52cb
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
util/romcc/romcc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index b045b46..3ac42f7 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -5648,6 +5648,7 @@ static struct type *invalid_type(struct compile_state *state, struct type *type)
#define MASK_UCHAR(X) ((X) & ((ulong_t)0xff))
#define MASK_USHORT(X) ((X) & (((ulong_t)1 << (SIZEOF_SHORT)) - 1))
+static inline ulong_t mask_uint(ulong_t x) __attribute__((unused));
static inline ulong_t mask_uint(ulong_t x)
{
if (SIZEOF_INT < SIZEOF_LONG) {
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5281
-gerrit
commit d007e9c682f1f1e9ca66ebd2c8baddb8b91261af
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Fri Feb 21 08:38:27 2014 +0100
device: Do not show "framebuffer graphics resolution" with native init.
No native init uses this.
Real hardware ones use mode specified in EDID.
Qemu one uses CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_[XY]RES.
Change-Id: I0845fec10b9811e2be44b5be30b9dc4f1c9719a6
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/device/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 2d6e226..4b2d4b8 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -299,7 +299,7 @@ config FRAMEBUFFER_SET_VESA_MODE
choice
prompt "framebuffer graphics resolution"
default FRAMEBUFFER_VESA_MODE_117
- depends on FRAMEBUFFER_SET_VESA_MODE || MAINBOARD_DO_NATIVE_VGA_INIT
+ depends on FRAMEBUFFER_SET_VESA_MODE
help
This option sets the resolution used for the coreboot framebuffer (and
bootsplash screen).