Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/704
-gerrit
commit bb904b224e508d1fa0cd06bfeb1c450732a04ec1
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Sun Aug 14 13:52:03 2011 -0700
Increase size of the coreboot table area
Packing a device tree into the coreboot table can easily make
the table exceed the current limit of 8KB. However, right now
there is no error handling in place to catch that case.
Increase the maximum memory usable for all tables from 64KB to
128KB and increase the maximum coreboot table size from 8KB
to 32KB.
Change-Id: I2025bf070d0adb276c1cd610aa8402b50bdf2525
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
src/arch/x86/boot/tables.c | 2 +-
src/include/cbmem.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/arch/x86/boot/tables.c b/src/arch/x86/boot/tables.c
index 29d2ec0..b7dc4fe 100644
--- a/src/arch/x86/boot/tables.c
+++ b/src/arch/x86/boot/tables.c
@@ -202,7 +202,7 @@ struct lb_memory *write_tables(void)
}
#endif
-#define MAX_COREBOOT_TABLE_SIZE (8 * 1024)
+#define MAX_COREBOOT_TABLE_SIZE (32 * 1024)
post_code(0x9d);
high_table_pointer = (unsigned long)cbmem_add(CBMEM_ID_CBTABLE, MAX_COREBOOT_TABLE_SIZE);
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 7c5ec07..9806854 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -20,8 +20,8 @@
#ifndef _CBMEM_H_
#define _CBMEM_H_
-/* Reserve 64k for ACPI and other tables */
-#define HIGH_MEMORY_DEF_SIZE ( 64 * 1024 )
+/* Reserve 128k for ACPI and other tables */
+#define HIGH_MEMORY_DEF_SIZE ( 128 * 1024 )
extern uint64_t high_tables_base, high_tables_size;
#if CONFIG_HAVE_ACPI_RESUME
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/698
-gerrit
commit 927110510039eee5c16036b6e74607ae84950fcc
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Thu Aug 11 14:51:31 2011 -0700
Fix dependency problem for uart8250.c as well
If you build in parallel, option_table.h will occasionally not be there yet
and the build will fail.
Change-Id: I828956ab2e05c48d20c2f7c55616cc8fa19e1227
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
src/lib/Makefile.inc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index b930fcc..906dfae 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -50,4 +50,5 @@ OPTION_TABLE_H:=$(obj)/option_table.h
endif
$(obj)/lib/uart8250mem.smm.o : $(OPTION_TABLE_H)
+$(obj)/lib/uart8250.smm.o : $(OPTION_TABLE_H)
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/711
-gerrit
commit 566c472c98872ea51b16dc428dc48e1988fa582b
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Sep 20 17:07:14 2011 -0700
Initialize CBMEM early.
We want to be able to share data between different phases of firmware
(rom stage/ram stage/payload). Coreboot CBMEM seems an appropriate
location for this data, but normally it is not initialized
until coreboot reaches the ram stage.
This change initializes the CBMEM while still in rom stage in
case CONFIG_EARLY_CBMEM_INIT is set.
Note that there is a discrepancy in how coreboot determines the
size of DRAM at rom and ram stages, get_top_of_ram() is used at
rom stage and is not defined for all platforms. Those platforms
will have to define this function should they enable the
CONFIG_EARLY_CBMEM_INIT flag.
Change-Id: I81691d45e28de59496fb227f2cca4e8c15ece717
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
src/include/cbmem.h | 4 +++-
src/lib/cbmem.c | 39 +++++++++++++++++++++++----------------
2 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 9806854..a681c36 100644
--- a/src/include/cbmem.h
+++ b/src/include/cbmem.h
@@ -22,7 +22,9 @@
/* Reserve 128k for ACPI and other tables */
#define HIGH_MEMORY_DEF_SIZE ( 128 * 1024 )
+#ifndef __PRE_RAM__
extern uint64_t high_tables_base, high_tables_size;
+#endif
#if CONFIG_HAVE_ACPI_RESUME
#define HIGH_MEMORY_SIZE ((CONFIG_RAMTOP - CONFIG_RAMBASE) + HIGH_MEMORY_DEF_SIZE)
@@ -41,7 +43,7 @@ extern uint64_t high_tables_base, high_tables_size;
#define CBMEM_ID_SMBIOS 0x534d4254
#define CBMEM_ID_NONE 0x00000000
-void cbmem_initialize(void);
+int cbmem_initialize(void);
void cbmem_init(u64 baseaddr, u64 size);
int cbmem_reinit(u64 baseaddr);
diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c
index 202f521..f5c3d3a 100644
--- a/src/lib/cbmem.c
+++ b/src/lib/cbmem.c
@@ -183,30 +183,38 @@ void *cbmem_find(u32 id)
return (void *)NULL;
}
-#ifndef __PRE_RAM__
-#if CONFIG_HAVE_ACPI_RESUME
+#if CONFIG_HAVE_ACPI_RESUME && !defined(__PRE_RAM__)
extern u8 acpi_slp_type;
#endif
-void cbmem_initialize(void)
+#if CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__)
+/* Returns True if it was not intialized before. */
+int cbmem_initialize(void)
{
-#if CONFIG_HAVE_ACPI_RESUME
- printk(BIOS_DEBUG, "%s: acpi_slp_type=%d\n", __func__, acpi_slp_type);
- if (acpi_slp_type == 3 || acpi_slp_type == 2) {
- if (!cbmem_reinit(high_tables_base)) {
- printk(BIOS_DEBUG, "cbmem_reinit failed\n");
- /* Something went wrong, our high memory area got wiped */
+ int rv = 0;
+
+#ifdef __PRE_RAM__
+ extern unsigned long get_top_of_ram(void);
+ uint64_t high_tables_base = get_top_of_ram() - HIGH_MEMORY_SIZE;
+ uint64_t high_tables_size = HIGH_MEMORY_SIZE;
+#endif
+
+ /* We expect the romstage to always initialize it. */
+ if (!cbmem_reinit(high_tables_base)) {
+#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)
acpi_slp_type = 0;
- cbmem_init(high_tables_base, high_tables_size);
- }
- } else {
+#endif
cbmem_init(high_tables_base, high_tables_size);
+ rv = 1;
}
-#else
- cbmem_init(high_tables_base, high_tables_size);
-#endif
+#ifndef __PRE_RAM__
cbmem_arch_init();
+#endif
+ return rv;
}
+#endif
#ifndef __PRE_RAM__
void cbmem_list(void)
@@ -240,5 +248,4 @@ void cbmem_list(void)
}
#endif
-#endif
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/710
-gerrit
commit 19b732385037e1a8a2ee710ad9c4e5d6b169a874
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Sep 20 16:46:46 2011 -0700
Introduce config option to initialize CBMEM early.
We want to be able to communicate information between rom and ram
stages of coreboot. This configuration option will be used to
compile such ability in.
Change-Id: I6736fdc264ecd0b63369b28462d7bb96e4c2b012
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
src/Kconfig | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/Kconfig b/src/Kconfig
index c165d93..544b61b 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -112,6 +112,14 @@ config INCLUDE_CONFIG_FILE
help
Include in CBFS the coreboot config file that was used to compile the ROM image
+config EARLY_CBMEM_INIT
+ bool "Initialize CBMEM while in ROM stage"
+ default n
+ help
+ Make coreboot initialize the cbmem structures while running in rom
+ stage. This could be useful when the rom stage wants to communicate
+ some, for instance, execution timestamps.
+
endmenu
source src/mainboard/Kconfig
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/709
-gerrit
commit 0e771e77afd8f12d8c4971deee73bd422b9664a8
Author: Gabe Black <gabeblack(a)google.com>
Date: Fri Sep 16 02:24:03 2011 -0700
Since cbfs_core.h provides a macro that uses ntohl, make sure ntohl is available
Since cbfs_core.h provides a macro that uses ntohl, make sure ntohl is available by
including byteorder.h
Change-Id: I9ab8cb51bd680e861b28d5130d09547bb9ab3b1f
Signed-off-by: Gabe Black <gabeblack(a)google.com>
---
src/include/cbfs_core.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/include/cbfs_core.h b/src/include/cbfs_core.h
index 70368f8..43e6b9b 100644
--- a/src/include/cbfs_core.h
+++ b/src/include/cbfs_core.h
@@ -49,6 +49,8 @@
#ifndef _CBFS_CORE_H_
#define _CBFS_CORE_H_
+#include <arch/byteorder.h>
+
/** These are standard values for the known compression
alogrithms that coreboot knows about for stages and
payloads. Of course, other CBFS users can use whatever