summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/emulation/qemu-aarch64/Kconfig1
-rw-r--r--src/mainboard/emulation/qemu-aarch64/cbmem.c8
-rw-r--r--src/mainboard/emulation/qemu-aarch64/memlayout.ld1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/mainboard/emulation/qemu-aarch64/Kconfig b/src/mainboard/emulation/qemu-aarch64/Kconfig
index af689baac3..42f9110df4 100644
--- a/src/mainboard/emulation/qemu-aarch64/Kconfig
+++ b/src/mainboard/emulation/qemu-aarch64/Kconfig
@@ -11,6 +11,7 @@ config BOARD_SPECIFIC_OPTIONS
select ARCH_VERSTAGE_ARMV8_64
select ARCH_ROMSTAGE_ARMV8_64
select ARCH_RAMSTAGE_ARMV8_64
+ select FLATTENED_DEVICE_TREE
select ARM64_USE_ARCH_TIMER
select BOARD_ROMSIZE_KB_16384
select BOOTBLOCK_CUSTOM
diff --git a/src/mainboard/emulation/qemu-aarch64/cbmem.c b/src/mainboard/emulation/qemu-aarch64/cbmem.c
index 389ff4ead0..4cdd44f993 100644
--- a/src/mainboard/emulation/qemu-aarch64/cbmem.c
+++ b/src/mainboard/emulation/qemu-aarch64/cbmem.c
@@ -3,8 +3,16 @@
#include <cbmem.h>
#include <ramdetect.h>
#include <symbols.h>
+#include <device_tree.h>
+DECLARE_REGION(fdt)
uintptr_t cbmem_top_chipset(void)
{
+ uint64_t top;
+
+ top = fdt_get_memory_top((void *)_fdt);
+ if (top)
+ return MIN(top, (uint64_t)4 * GiB - 1);
+
return (uintptr_t)_dram + (probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB) * MiB);
}
diff --git a/src/mainboard/emulation/qemu-aarch64/memlayout.ld b/src/mainboard/emulation/qemu-aarch64/memlayout.ld
index 9c1bb197ce..d27c0158cf 100644
--- a/src/mainboard/emulation/qemu-aarch64/memlayout.ld
+++ b/src/mainboard/emulation/qemu-aarch64/memlayout.ld
@@ -18,6 +18,7 @@ SECTIONS
BL31(0xe000000, 0x1000000)
DRAM_START(0x40000000)
+ REGION(fdt, 0x40000000, 1M, 8)
BOOTBLOCK(0x60010000, 64K)
STACK(0x60020000, 54K)
CBFS_MCACHE(0x6002D800, 8K)