diff options
Diffstat (limited to 'src/mainboard/emulation/qemu-aarch64/mainboard.c')
-rw-r--r-- | src/mainboard/emulation/qemu-aarch64/mainboard.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mainboard/emulation/qemu-aarch64/mainboard.c b/src/mainboard/emulation/qemu-aarch64/mainboard.c new file mode 100644 index 0000000000..573545532a --- /dev/null +++ b/src/mainboard/emulation/qemu-aarch64/mainboard.c @@ -0,0 +1,23 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Asami Doi <d0iasm.pub@gmail.com> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include <cbmem.h> +#include <ramdetect.h> +#include <symbols.h> +#include <device/device.h> + +static void mainboard_enable(struct device *dev) +{ + int ram_size_mb = probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB); + ram_resource(dev, 0, (uintptr_t)_dram / KiB, ram_size_mb * KiB); +} + +struct chip_operations mainboard_ops = { + .name = "qemu_aarch64", + .enable_dev = mainboard_enable, +}; |