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 a669a1c6a3d2f5e22e3e8cf8f2aa2a8e7ef9268a
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) {
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 6064c5bf45a6ee8eedfd5a0a35995961870676d1
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/4719
-gerrit
commit 958995b116e147d8222ff0465e9733fdca3494b5
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++;
}
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5262
-gerrit
commit c18bdcd1745aca8e014015bac6fd11f83500bba4
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Wed Feb 19 22:00:00 2014 +0100
intel/model_2065x: Fix APICID generation.
APIC IDs always step by 4 on 2065x independently of number of threads.
Change-Id: I5abd4005c8ce1740bb0862d952af66236b609aa8
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/cpu/intel/model_2065x/model_2065x_init.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c
index 2cbe906..e73e237 100644
--- a/src/cpu/intel/model_2065x/model_2065x_init.c
+++ b/src/cpu/intel/model_2065x/model_2065x_init.c
@@ -371,11 +371,8 @@ static void intel_cores_init(device_t cpu)
/* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC;
cpu_path.apic.apic_id =
- cpu->path.apic.apic_id + (i & 1) + ((i & 2) << 1);
-
- /* Update APIC ID if no hyperthreading */
- if (threads_per_core == 1)
- cpu_path.apic.apic_id <<= 1;
+ cpu->path.apic.apic_id + (i % threads_per_core)
+ + ((i / threads_per_core) << 2);
/* Allocate the new cpu device structure */
new = alloc_dev(cpu->bus, &cpu_path);