Denis Carikli (GNUtoo@no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3504
-gerrit
commit 8a4205bab611b8f36b7b36aadb54849540e5f108 Author: Denis 'GNUtoo' Carikli GNUtoo@no-log.org Date: Wed Jun 19 08:30:33 2013 +0200
qemu-i440fx: Make it compile with CONFIG_DYNAMIC_CBMEM.
Note that using CONFIG_RELOCATABLE_RAMSTAGE make it fails like that: Loading image. CBFS: Decompressing stage fallback/coreboot_ram @ 0x3ffbefc0 (184400 bytes) Loading module at 3ffbf000 with entry 3ffbf000. filesize: 0x18db8 memsize: 0x2c050 Processing 1703 relocs with adjust value of 0x3ffbe000 FATAL: Essential component is missing. However without that configuration set it boots fine.
Change-Id: I633a8c3832eee4e8bed244940fdc370b98dd26f0 Signed-off-by: Denis 'GNUtoo' Carikli GNUtoo@no-log.org --- src/mainboard/emulation/qemu-i440fx/memory.c | 12 +++++++++++- src/mainboard/emulation/qemu-i440fx/northbridge.c | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/emulation/qemu-i440fx/memory.c b/src/mainboard/emulation/qemu-i440fx/memory.c index 8245ca2..3249e66 100644 --- a/src/mainboard/emulation/qemu-i440fx/memory.c +++ b/src/mainboard/emulation/qemu-i440fx/memory.c @@ -45,8 +45,18 @@ unsigned long get_top_of_ram(void) { return qemu_get_memory_size() * 1024; } - +#if CONFIG_DYNAMIC_CBMEM +struct cbmem_entry *get_cbmem_toc(void); +#endif struct cbmem_entry *get_cbmem_toc(void) { return (struct cbmem_entry *)(get_top_of_ram() - HIGH_MEMORY_SIZE); } + +#if CONFIG_DYNAMIC_CBMEM +void *cbmem_top(void) +{ + /* Top of cbmem is at lowest usable DRAM address below 4GiB. */ + return (void *)get_top_of_ram(); +} +#endif diff --git a/src/mainboard/emulation/qemu-i440fx/northbridge.c b/src/mainboard/emulation/qemu-i440fx/northbridge.c index 96d016b..c4fb0a8 100644 --- a/src/mainboard/emulation/qemu-i440fx/northbridge.c +++ b/src/mainboard/emulation/qemu-i440fx/northbridge.c @@ -16,6 +16,11 @@
#include "memory.c"
+#if CONFIG_DYNAMIC_CBMEM +extern uint64_t high_tables_base; +extern uint64_t high_tables_size; +#endif + static unsigned long qemu_get_high_memory_size(void) { unsigned long high;