[coreboot-gerrit] Patch set updated for coreboot: 8e30c7c qemu-i440fx: Make it compile with CONFIG_DYNAMIC_CBMEM.

Denis Carikli (GNUtoo@no-log.org) gerrit at coreboot.org
Fri Jun 21 18:30:57 CEST 2013

Denis Carikli (GNUtoo at no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3504


commit 8e30c7c0c715d6a0a621922500c43b3a01861b06
Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date:   Wed Jun 19 08:30:33 2013 +0200

    qemu-i440fx: Make it compile with CONFIG_DYNAMIC_CBMEM.
    This commit was tested on qemu with and without CONFIG_DYNAMIC_CBMEM
      by running cmbmem -c once booted. The qemu command that was used was:
        qemu-system-i386 -bios ./build/coreboot.rom  -serial stdio -hda ../virt/parabola.img
    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 CONFIG_RELOCATABLE_RAMSTAGE set it boots fine.
    Change-Id: I633a8c3832eee4e8bed244940fdc370b98dd26f0
    Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
 src/mainboard/emulation/qemu-i440fx/memory.c      | 8 ++++++++
 src/mainboard/emulation/qemu-i440fx/northbridge.c | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/src/mainboard/emulation/qemu-i440fx/memory.c b/src/mainboard/emulation/qemu-i440fx/memory.c
index 8245ca2..000a0f6 100644
--- a/src/mainboard/emulation/qemu-i440fx/memory.c
+++ b/src/mainboard/emulation/qemu-i440fx/memory.c
@@ -46,7 +46,15 @@ unsigned long get_top_of_ram(void)
 	return qemu_get_memory_size() * 1024;
 struct cbmem_entry *get_cbmem_toc(void)
 	return (struct cbmem_entry *)(get_top_of_ram() - HIGH_MEMORY_SIZE);
+void *cbmem_top(void)
+	/* Top of cbmem is at lowest usable DRAM address below 4GiB. */
+	return (void *)get_top_of_ram();
diff --git a/src/mainboard/emulation/qemu-i440fx/northbridge.c b/src/mainboard/emulation/qemu-i440fx/northbridge.c
index 96d016b..3e45d9a 100644
--- a/src/mainboard/emulation/qemu-i440fx/northbridge.c
+++ b/src/mainboard/emulation/qemu-i440fx/northbridge.c
@@ -53,9 +53,11 @@ static void cpu_pci_domain_read_resources(struct device *dev)
 	if (high)
 		ram_resource(dev, idx++, 4 * 1024 * 1024, high);
 	/* Leave some space for ACPI, PIRQ and MP tables */
 	high_tables_base = (tomk * 1024) - HIGH_MEMORY_SIZE;
 	high_tables_size = HIGH_MEMORY_SIZE;
 	/* Reserve space for the IOAPIC.  This should be in the Southbridge,
 	 * but I couldn't tell which device to put it in. */

More information about the coreboot-gerrit mailing list