blob: e6da3a6cacdd07d17fbfbec3b7af29fad49fe32c [file] [log] [blame]
Asami Doif7952422019-06-11 16:01:31 +09001/*
Asami Doif7952422019-06-11 16:01:31 +09002 *
Asami Doif7952422019-06-11 16:01:31 +09003 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#include <cbmem.h>
8#include <ramdetect.h>
9#include <symbols.h>
10#include <device/device.h>
Patrick Rudolph792fd512020-01-23 14:10:07 +010011#include <bootmem.h>
12
13extern u8 _secram[], _esecram[];
14
15void bootmem_platform_add_ranges(void)
16{
17 bootmem_add_range((uintptr_t)_secram, REGION_SIZE(secram), BM_MEM_BL31);
18}
Asami Doif7952422019-06-11 16:01:31 +090019
20static void mainboard_enable(struct device *dev)
21{
22 int ram_size_mb = probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB);
23 ram_resource(dev, 0, (uintptr_t)_dram / KiB, ram_size_mb * KiB);
24}
25
26struct chip_operations mainboard_ops = {
27 .name = "qemu_aarch64",
28 .enable_dev = mainboard_enable,
29};
Kyösti Mälkki3ae17a42020-05-26 08:27:42 +030030
31struct chip_operations mainboard_emulation_qemu_aarch64_ops = { };