summaryrefslogtreecommitdiffstats
path: root/src/mainboard/emulation/qemu-power8
diff options
context:
space:
mode:
authorKrystian Hebel <krystian.hebel@3mdeb.com>2020-10-09 19:11:05 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-04-03 13:22:53 +0000
commit8605cf5fe944193231349dc73199935e25915694 (patch)
treee2f648d5549c684abed3502b485c2b1209fb7528 /src/mainboard/emulation/qemu-power8
parent3a5507fd3166e18f5ca510f1475afbedccf69b6a (diff)
downloadcoreboot-8605cf5fe944193231349dc73199935e25915694.tar.gz
coreboot-8605cf5fe944193231349dc73199935e25915694.tar.bz2
coreboot-8605cf5fe944193231349dc73199935e25915694.zip
arch/ppc64/rom_media.c: move to mainboard/emulation/qemu-power*
CBFS location in memory is different than on the real hardware. Change-Id: Icd806a57f449042c883b624056c05c1ff7e4c17e Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67061 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
Diffstat (limited to 'src/mainboard/emulation/qemu-power8')
-rw-r--r--src/mainboard/emulation/qemu-power8/Makefile.inc3
-rw-r--r--src/mainboard/emulation/qemu-power8/rom_media.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/src/mainboard/emulation/qemu-power8/Makefile.inc b/src/mainboard/emulation/qemu-power8/Makefile.inc
index 401198392321..c1484b96bcd3 100644
--- a/src/mainboard/emulation/qemu-power8/Makefile.inc
+++ b/src/mainboard/emulation/qemu-power8/Makefile.inc
@@ -2,8 +2,11 @@
bootblock-y += bootblock.c
bootblock-y += uart.c
+bootblock-y += rom_media.c
romstage-y += cbmem.c
romstage-y += romstage.c
ramstage-y += timer.c
romstage-y += uart.c
+romstage-y += rom_media.c
ramstage-y += uart.c
+ramstage-y += rom_media.c
diff --git a/src/mainboard/emulation/qemu-power8/rom_media.c b/src/mainboard/emulation/qemu-power8/rom_media.c
new file mode 100644
index 000000000000..2fd47669a80e
--- /dev/null
+++ b/src/mainboard/emulation/qemu-power8/rom_media.c
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <arch/io.h>
+#include <boot_device.h>
+
+static const struct mem_region_device boot_dev =
+ MEM_REGION_DEV_RO_INIT(FLASH_BASE_ADDR, CONFIG_ROM_SIZE);
+
+const struct region_device *boot_device_ro(void)
+{
+ return &boot_dev.rdev;
+}