diff options
Diffstat (limited to 'src/mainboard/emulation')
-rw-r--r-- | src/mainboard/emulation/qemu-power8/Makefile.inc | 3 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-power8/rom_media.c | 12 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-power9/Makefile.inc | 4 | ||||
-rw-r--r-- | src/mainboard/emulation/qemu-power9/rom_media.c | 12 |
4 files changed, 31 insertions, 0 deletions
diff --git a/src/mainboard/emulation/qemu-power8/Makefile.inc b/src/mainboard/emulation/qemu-power8/Makefile.inc index 4011983923..c1484b96bc 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 0000000000..2fd47669a8 --- /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; +} diff --git a/src/mainboard/emulation/qemu-power9/Makefile.inc b/src/mainboard/emulation/qemu-power9/Makefile.inc index ace00a75b7..a71c20fe1a 100644 --- a/src/mainboard/emulation/qemu-power9/Makefile.inc +++ b/src/mainboard/emulation/qemu-power9/Makefile.inc @@ -1,6 +1,10 @@ ## SPDX-License-Identifier: GPL-2.0-only +bootblock-y += rom_media.c + romstage-y += cbmem.c romstage-y += romstage.c +romstage-y += rom_media.c ramstage-y += ramstage.c +ramstage-y += rom_media.c diff --git a/src/mainboard/emulation/qemu-power9/rom_media.c b/src/mainboard/emulation/qemu-power9/rom_media.c new file mode 100644 index 0000000000..2fd47669a8 --- /dev/null +++ b/src/mainboard/emulation/qemu-power9/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; +} |