Andrew Wu (arw(a)dmp.com.tw) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3905
-gerrit
commit 0b014d0cdea2acd5a2dd4174bbbdfb6cf4107294
Author: Andrew Wu <arw(a)dmp.com.tw>
Date: Thu Sep 5 00:21:11 2013 +0800
Makefile: Check $CC variable returned from xcompile is not empty.
If xcompile can't find out suitable GCC compiler for i386/armv7, it
will not set $CC_i386/$CC_armv7 variable. Makefile sets $CC variable
from xcompile, and will print strange error messages when executing
$CC program if $CC is empty. Add checking to avoid this problem.
Change-Id: Ia8d481d76ca52f3351cb99f05779d06947161c5d
Signed-off-by: Andrew Wu <arw(a)dmp.com.tw>
---
Makefile | 5 +++++
payloads/libpayload/Makefile | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/Makefile b/Makefile
index dec32e5..3b4d931 100644
--- a/Makefile
+++ b/Makefile
@@ -137,6 +137,11 @@ AR := $(AR_$(ARCH-y))
CFLAGS += $(CFLAGS_$(ARCH-y))
+ifeq ($(CC),)
+$(shell rm .xcompile)
+$(error no suitable GCC for $(ARCH-y))
+endif
+
LIBGCC_FILE_NAME := $(shell test -r `$(CC) -print-libgcc-file-name` && \
$(CC) -print-libgcc-file-name)
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index bfa1abf..b319840 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -115,6 +115,11 @@ AR := $(AR_$(ARCH-y))
CFLAGS += $(CFLAGS_$(ARCH-y))
+ifeq ($(CC),)
+$(shell rm .xcompile)
+$(error no suitable GCC for $(ARCH-y))
+endif
+
LIBGCC_FILE_NAME := $(shell test -r `$(CC) -print-libgcc-file-name` && \
$(CC) -print-libgcc-file-name)
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3564
-gerrit
commit 8ce66a725fdab3b65cd6d091f72fe464f32c17f4
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sun Jun 23 17:01:29 2013 +0300
Drop parameter from cbmem_reinit()
Function is always called with high_tables_base() so there
is no need to pass it as a parameter.
Change-Id: If026cb567ff534716cd9200cdffa08b21ac0c162
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/include/cbmem.h | 2 +-
src/lib/cbmem.c | 9 ++++-----
src/mainboard/getac/p470/romstage.c | 5 +----
src/mainboard/google/stout/romstage.c | 3 +--
src/mainboard/ibase/mb899/romstage.c | 5 +----
src/mainboard/intel/d945gclf/romstage.c | 5 +----
src/mainboard/kontron/986lcd-m/romstage.c | 5 +----
src/mainboard/roda/rk886ex/romstage.c | 5 +----
src/mainboard/roda/rk9/romstage.c | 5 +----
9 files changed, 12 insertions(+), 32 deletions(-)
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 3eeb6a1..b965fd6 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -135,7 +135,7 @@ void set_cbmem_table(uint64_t base, uint64_t size);
int cbmem_base_check(void);
#endif
-int cbmem_reinit(u64 baseaddr);
+int cbmem_reinit(void);
unsigned long get_top_of_ram(void);
struct cbmem_entry *get_cbmem_toc(void);
diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c
index 963ca4d..656b46d 100644
--- a/src/lib/cbmem.c
+++ b/src/lib/cbmem.c
@@ -113,13 +113,12 @@ static void cbmem_init(u64 baseaddr, u64 size)
}
#endif
-int cbmem_reinit(u64 baseaddr)
+int cbmem_reinit(void)
{
- struct cbmem_entry *cbmem_toc;
- cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
+ struct cbmem_entry *cbmem_toc = get_cbmem_toc();
printk(BIOS_DEBUG, "Re-Initializing CBMEM area to 0x%lx\n",
- (unsigned long)baseaddr);
+ (unsigned long)cbmem_toc);
return (cbmem_toc[0].magic == CBMEM_MAGIC);
}
@@ -219,7 +218,7 @@ int cbmem_initialize(void)
cbmem_locate_table(&base, &size);
/* We expect the romstage to always initialize it. */
- if (!cbmem_reinit(base)) {
+ if (!cbmem_reinit()) {
#if CONFIG_HAVE_ACPI_RESUME && !defined(__PRE_RAM__)
/* Something went wrong, our high memory area got wiped */
if (acpi_slp_type == 3 || acpi_slp_type == 2)
diff --git a/src/mainboard/getac/p470/romstage.c b/src/mainboard/getac/p470/romstage.c
index 90d38eb..f4e43e5 100644
--- a/src/mainboard/getac/p470/romstage.c
+++ b/src/mainboard/getac/p470/romstage.c
@@ -358,13 +358,10 @@ void main(unsigned long bist)
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_HAVE_ACPI_RESUME
- /* Start address of high memory tables */
- unsigned long high_ram_base = get_top_of_ram() - HIGH_MEMORY_SIZE;
-
/* If there is no high memory area, we didn't boot before, so
* this is not a resume. In that case we just create the cbmem toc.
*/
- if ((boot_mode == 2) && cbmem_reinit((u64)high_ram_base)) {
+ if ((boot_mode == 2) && cbmem_reinit()) {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption
diff --git a/src/mainboard/google/stout/romstage.c b/src/mainboard/google/stout/romstage.c
index 14820dd..83be94e 100644
--- a/src/mainboard/google/stout/romstage.c
+++ b/src/mainboard/google/stout/romstage.c
@@ -313,8 +313,7 @@ void main(unsigned long bist)
#if CONFIG_EARLY_CBMEM_INIT
cbmem_was_initted = !cbmem_initialize();
#else
- cbmem_was_initted = cbmem_reinit((uint64_t) (get_top_of_ram()
- - HIGH_MEMORY_SIZE));
+ cbmem_was_initted = cbmem_reinit();
#endif
#if CONFIG_HAVE_ACPI_RESUME
diff --git a/src/mainboard/ibase/mb899/romstage.c b/src/mainboard/ibase/mb899/romstage.c
index 79eaa0b..b059a57 100644
--- a/src/mainboard/ibase/mb899/romstage.c
+++ b/src/mainboard/ibase/mb899/romstage.c
@@ -312,13 +312,10 @@ void main(unsigned long bist)
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_HAVE_ACPI_RESUME
- /* Start address of high memory tables */
- unsigned long high_ram_base = get_top_of_ram() - HIGH_MEMORY_SIZE;
-
/* If there is no high memory area, we didn't boot before, so
* this is not a resume. In that case we just create the cbmem toc.
*/
- if ((boot_mode == 2) && cbmem_reinit((u64)high_ram_base)) {
+ if ((boot_mode == 2) && cbmem_reinit()) {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption
diff --git a/src/mainboard/intel/d945gclf/romstage.c b/src/mainboard/intel/d945gclf/romstage.c
index a37f605..248aa3b 100644
--- a/src/mainboard/intel/d945gclf/romstage.c
+++ b/src/mainboard/intel/d945gclf/romstage.c
@@ -270,13 +270,10 @@ void main(unsigned long bist)
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_HAVE_ACPI_RESUME
- /* Start address of high memory tables */
- unsigned long high_ram_base = get_top_of_ram() - HIGH_MEMORY_SIZE;
-
/* If there is no high memory area, we didn't boot before, so
* this is not a resume. In that case we just create the cbmem toc.
*/
- if ((boot_mode == 2) && cbmem_reinit((u64)high_ram_base)) {
+ if ((boot_mode == 2) && cbmem_reinit()) {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption
diff --git a/src/mainboard/kontron/986lcd-m/romstage.c b/src/mainboard/kontron/986lcd-m/romstage.c
index 03b24d8..324f442 100644
--- a/src/mainboard/kontron/986lcd-m/romstage.c
+++ b/src/mainboard/kontron/986lcd-m/romstage.c
@@ -411,13 +411,10 @@ void main(unsigned long bist)
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_HAVE_ACPI_RESUME
- /* Start address of high memory tables */
- unsigned long high_ram_base = get_top_of_ram() - HIGH_MEMORY_SIZE;
-
/* If there is no high memory area, we didn't boot before, so
* this is not a resume. In that case we just create the cbmem toc.
*/
- if ((boot_mode == 2) && cbmem_reinit((u64)high_ram_base)) {
+ if ((boot_mode == 2) && cbmem_reinit()) {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption
diff --git a/src/mainboard/roda/rk886ex/romstage.c b/src/mainboard/roda/rk886ex/romstage.c
index ab200d2..cb141f9 100644
--- a/src/mainboard/roda/rk886ex/romstage.c
+++ b/src/mainboard/roda/rk886ex/romstage.c
@@ -347,13 +347,10 @@ void main(unsigned long bist)
MCHBAR16(SSKPD) = 0xCAFE;
#if CONFIG_HAVE_ACPI_RESUME
- /* Start address of high memory tables */
- unsigned long high_ram_base = get_top_of_ram() - HIGH_MEMORY_SIZE;
-
/* If there is no high memory area, we didn't boot before, so
* this is not a resume. In that case we just create the cbmem toc.
*/
- if ((boot_mode == 2) && cbmem_reinit((u64)high_ram_base)) {
+ if ((boot_mode == 2) && cbmem_reinit()) {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption
diff --git a/src/mainboard/roda/rk9/romstage.c b/src/mainboard/roda/rk9/romstage.c
index 56eea84..075790d 100644
--- a/src/mainboard/roda/rk9/romstage.c
+++ b/src/mainboard/roda/rk9/romstage.c
@@ -184,13 +184,10 @@ void main(unsigned long bist)
init_iommu();
#if CONFIG_HAVE_ACPI_RESUME
- /* Start address of high memory tables */
- unsigned long high_ram_base = get_top_of_ram() - HIGH_MEMORY_SIZE;
-
/* If there is no high memory area, we didn't boot before, so
* this is not a resume. In that case we just create the cbmem toc.
*/
- if (s3resume && cbmem_reinit((u64)high_ram_base)) {
+ if (s3resume && cbmem_reinit() {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME);
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption