diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/emulation/qemu-i440fx/Makefile.inc | 1 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-i440fx/memory.c | 9 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-q35/Makefile.inc | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/mainboard/emulation/qemu-i440fx/Makefile.inc b/src/mainboard/emulation/qemu-i440fx/Makefile.inc index 9e2880a6a0..8c19afc128 100644 --- a/src/mainboard/emulation/qemu-i440fx/Makefile.inc +++ b/src/mainboard/emulation/qemu-i440fx/Makefile.inc @@ -1,4 +1,5 @@ ramstage-y += northbridge.c ramstage-y += fw_cfg.c +romstage-y += fw_cfg.c romstage-y += memory.c ramstage-y += memory.c diff --git a/src/mainboard/emulation/qemu-i440fx/memory.c b/src/mainboard/emulation/qemu-i440fx/memory.c index dea96f275d..aa1ceba410 100644 --- a/src/mainboard/emulation/qemu-i440fx/memory.c +++ b/src/mainboard/emulation/qemu-i440fx/memory.c @@ -16,6 +16,7 @@ #include <cbmem.h> #include <arch/io.h> #include "memory.h" +#include "fw_cfg.h" #define CMOS_ADDR_PORT 0x70 #define CMOS_DATA_PORT 0x71 @@ -52,5 +53,11 @@ unsigned long qemu_get_memory_size(void) void *cbmem_top(void) { - return (void *) (qemu_get_memory_size() * 1024); + uintptr_t top = 0; + + top = fw_cfg_tolud(); + if (!top) + top = (uintptr_t)qemu_get_memory_size() * 1024; + + return (void *)top; } diff --git a/src/mainboard/emulation/qemu-q35/Makefile.inc b/src/mainboard/emulation/qemu-q35/Makefile.inc index 1503220c9c..a52aad42fc 100644 --- a/src/mainboard/emulation/qemu-q35/Makefile.inc +++ b/src/mainboard/emulation/qemu-q35/Makefile.inc @@ -2,4 +2,5 @@ ramstage-y += ../qemu-i440fx/northbridge.c ramstage-y += ../qemu-i440fx/memory.c ramstage-y += ../qemu-i440fx/fw_cfg.c romstage-y += ../qemu-i440fx/memory.c +romstage-y += ../qemu-i440fx/fw_cfg.c bootblock-y += bootblock.c |