summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/emulation/qemu-aarch64/mainboard.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mainboard/emulation/qemu-aarch64/mainboard.c b/src/mainboard/emulation/qemu-aarch64/mainboard.c
index 09b983f330..481745f214 100644
--- a/src/mainboard/emulation/qemu-aarch64/mainboard.c
+++ b/src/mainboard/emulation/qemu-aarch64/mainboard.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <ramdetect.h>
+#include <cbmem.h>
#include <symbols.h>
#include <device/device.h>
#include <bootmem.h>
@@ -13,8 +13,6 @@ void bootmem_platform_add_ranges(void)
static void mainboard_enable(struct device *dev)
{
- int ram_size_mb = probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB);
- ram_resource_kb(dev, 0, (uintptr_t)_dram / KiB, ram_size_mb * KiB);
}
struct chip_operations mainboard_ops = {
@@ -44,6 +42,8 @@ static void qemu_aarch64_domain_read_resources(struct device *dev)
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED;
mmio_range(dev, index++, VIRT_PCIE_ECAM_BASE, VIRT_PCIE_ECAM_SIZE);
+
+ ram_from_to(dev, index++, (uintptr_t)_dram, (uintptr_t)cbmem_top());
}
struct device_operations qemu_aarch64_pci_domain_ops = {