Asami Doi | f795242 | 2019-06-11 16:01:31 +0900 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2019 Asami Doi <d0iasm.pub@gmail.com> |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 7 | */ |
| 8 | |
| 9 | #include <cbmem.h> |
| 10 | #include <ramdetect.h> |
| 11 | #include <symbols.h> |
| 12 | #include <device/device.h> |
| 13 | |
| 14 | static void mainboard_enable(struct device *dev) |
| 15 | { |
| 16 | int ram_size_mb = probe_ramsize((uintptr_t)_dram, CONFIG_DRAM_SIZE_MB); |
| 17 | ram_resource(dev, 0, (uintptr_t)_dram / KiB, ram_size_mb * KiB); |
| 18 | } |
| 19 | |
| 20 | struct chip_operations mainboard_ops = { |
| 21 | .name = "qemu_aarch64", |
| 22 | .enable_dev = mainboard_enable, |
| 23 | }; |