From bcbcdf73943d8bc81f2e35c4a67eebcbde716eda Mon Sep 17 00:00:00 2001 From: Yaroslav Kurlaev Date: Tue, 6 Jul 2021 22:30:28 +0700 Subject: src/mainboard/emulation/qemu-power9: add RAM detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie333294c7a311f6d47bdfbd1fc3cec0128cf63e7 Signed-off-by: Yaroslav Kurlaev Reviewed-on: https://review.coreboot.org/c/coreboot/+/57081 Tested-by: build bot (Jenkins) Reviewed-by: Michał Żygowski --- src/mainboard/emulation/qemu-power9/cbmem.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mainboard/emulation/qemu-power9/cbmem.c') diff --git a/src/mainboard/emulation/qemu-power9/cbmem.c b/src/mainboard/emulation/qemu-power9/cbmem.c index c1c5e94c5c..1b7b690883 100644 --- a/src/mainboard/emulation/qemu-power9/cbmem.c +++ b/src/mainboard/emulation/qemu-power9/cbmem.c @@ -1,11 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include void *cbmem_top_chipset(void) { - /* Top of cbmem is at lowest usable DRAM address below 4GiB. */ - /* For now, last 1M of 4G */ - void *ptr = (void *) (4ULL * GiB - 1 * MiB); - return ptr; + return (void *)(probe_ramsize(0, CONFIG_DRAM_SIZE_MB) * MiB); } -- cgit v1.2.3