Attention is currently required from: Philipp Hug, ron minnich.

Alper Nebi Yasak has uploaded this change for review.

View Change

mainboard/qemu-riscv: Enable QEMU fw_cfg driver

Enable the QEMU firmware configuration device driver for RISC-V QEMU
virtual machines. The device address is from QEMU source code [1].

[1] https://gitlab.com/qemu-project/qemu/-/blob/v8.2.1/hw/riscv/virt.c#L99

Change-Id: I407499e6c985ee8fa64ee848eb60986975f79d26
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
---
M src/mainboard/emulation/qemu-riscv/Kconfig
M src/mainboard/emulation/qemu-riscv/include/mainboard/addressmap.h
2 files changed, 5 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/80371/1
diff --git a/src/mainboard/emulation/qemu-riscv/Kconfig b/src/mainboard/emulation/qemu-riscv/Kconfig
index 091c432..206ea19 100644
--- a/src/mainboard/emulation/qemu-riscv/Kconfig
+++ b/src/mainboard/emulation/qemu-riscv/Kconfig
@@ -28,8 +28,12 @@
select BOOT_DEVICE_NOT_SPI_FLASH
select MISSING_BOARD_RESET
select DRIVERS_UART_8250MEM
+ select DRIVERS_EMULATION_QEMU_FW_CFG
select RISCV_HAS_OPENSBI

+config QEMU_FW_CFG_BASE_ADDRESS
+ default 0x10100000
+
config MEMLAYOUT_LD_FILE
string
default "src/mainboard/emulation/qemu-riscv/memlayout.ld"
diff --git a/src/mainboard/emulation/qemu-riscv/include/mainboard/addressmap.h b/src/mainboard/emulation/qemu-riscv/include/mainboard/addressmap.h
index 27baeb7..5bb1306 100644
--- a/src/mainboard/emulation/qemu-riscv/include/mainboard/addressmap.h
+++ b/src/mainboard/emulation/qemu-riscv/include/mainboard/addressmap.h
@@ -4,4 +4,5 @@
#define QEMU_VIRT_PLIC 0x0c000000
#define QEMU_VIRT_UART0 0x10000000
#define QEMU_VIRT_VIRTIO 0x10001000
+#define QEMU_VIRT_FW_CFG_BASE 0x10100000
#define QEMU_VIRT_DRAM 0x80000000

To view, visit change 80371. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I407499e6c985ee8fa64ee848eb60986975f79d26
Gerrit-Change-Number: 80371
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Gerrit-Reviewer: Philipp Hug <philipp@hug.cx>
Gerrit-Reviewer: ron minnich <rminnich@gmail.com>
Gerrit-Attention: Philipp Hug <philipp@hug.cx>
Gerrit-Attention: ron minnich <rminnich@gmail.com>
Gerrit-MessageType: newchange