Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/76004?usp=email )
Change subject: mb/qemu-aarch64: Move probing dram to read_resources ......................................................................
mb/qemu-aarch64: Move probing dram to read_resources
While we are at it: - Don't use _kb version of declaring resources - Use cbmem_top instead of probing for memory again
Signed-off-by: Arthur Heymans arthur@aheymans.xyz Change-Id: Iaaee41aec7806287ef1881372ec8ec47a4cd57d9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76004 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de Reviewed-by: Lean Sheng Tan sheng.tan@9elements.com --- M src/mainboard/emulation/qemu-aarch64/mainboard.c 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: Nico Huber: Looks good to me, but someone else must approve build bot (Jenkins): Verified Lean Sheng Tan: Looks good to me, approved
diff --git a/src/mainboard/emulation/qemu-aarch64/mainboard.c b/src/mainboard/emulation/qemu-aarch64/mainboard.c index 09b983f..481745f 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 @@
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 @@ 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 = {