summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation/qemu-riscv/cbmem.c
blob: 10ca2cd87f102e481057ca6e2f9e84efaf0c8d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* SPDX-License-Identifier: GPL-2.0-only */

#include <cbmem.h>
#include <symbols.h>
#include <ramdetect.h>
#include <console/console.h>

uintptr_t cbmem_top_chipset(void)
{
	//TODO get memory range from QEMUs FDT
	size_t dram_mb_detected = probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB);
	return (uintptr_t)_dram + dram_mb_detected * MiB;
}