It's available as part of the edk2-riscv64 Fedora package.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
.../qemu_5.2.0-tcg-virt.riscv64.xml | 4 ++-
.../qemu_5.2.0-virt.riscv64.xml | 4 ++-
.../qemu_8.0.0-tcg-virt.riscv64.xml | 4 ++-
.../qemu_8.0.0-virt.riscv64.xml | 4 ++-
.../qemu/firmware/50-edk2-riscv-qcow2.json | 33 +++++++++++++++++++
tests/qemufirmwaretest.c | 5 +++
6 files changed, 50 insertions(+), 4 deletions(-)
create mode 100644
tests/qemufirmwaredata/usr/share/qemu/firmware/50-edk2-riscv-qcow2.json
diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml
b/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml
index c487d467ef..e69fb88891 100644
--- a/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-tcg-virt.riscv64.xml
@@ -6,7 +6,9 @@
<vcpu max='8'/>
<iothreads supported='yes'/>
<os supported='yes'>
- <enum name='firmware'/>
+ <enum name='firmware'>
+ <value>efi</value>
+ </enum>
<loader supported='yes'>
<value>/obviously/fake/firmware1.fd</value>
<value>/obviously/fake/firmware2.fd</value>
diff --git a/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml
b/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml
index b0e4aafcd5..e9a1883a14 100644
--- a/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_5.2.0-virt.riscv64.xml
@@ -5,7 +5,9 @@
<arch>riscv64</arch>
<iothreads supported='yes'/>
<os supported='yes'>
- <enum name='firmware'/>
+ <enum name='firmware'>
+ <value>efi</value>
+ </enum>
<loader supported='yes'>
<value>/obviously/fake/firmware1.fd</value>
<value>/obviously/fake/firmware2.fd</value>
diff --git a/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml
b/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml
index e4bb90c929..3915f789fe 100644
--- a/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_8.0.0-tcg-virt.riscv64.xml
@@ -6,7 +6,9 @@
<vcpu max='512'/>
<iothreads supported='yes'/>
<os supported='yes'>
- <enum name='firmware'/>
+ <enum name='firmware'>
+ <value>efi</value>
+ </enum>
<loader supported='yes'>
<value>/obviously/fake/firmware1.fd</value>
<value>/obviously/fake/firmware2.fd</value>
diff --git a/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml
b/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml
index 265274aa65..ddcbac7192 100644
--- a/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml
+++ b/tests/domaincapsdata/qemu_8.0.0-virt.riscv64.xml
@@ -5,7 +5,9 @@
<arch>riscv64</arch>
<iothreads supported='yes'/>
<os supported='yes'>
- <enum name='firmware'/>
+ <enum name='firmware'>
+ <value>efi</value>
+ </enum>
<loader supported='yes'>
<value>/obviously/fake/firmware1.fd</value>
<value>/obviously/fake/firmware2.fd</value>
diff --git a/tests/qemufirmwaredata/usr/share/qemu/firmware/50-edk2-riscv-qcow2.json
b/tests/qemufirmwaredata/usr/share/qemu/firmware/50-edk2-riscv-qcow2.json
new file mode 100644
index 0000000000..eb1930da49
--- /dev/null
+++ b/tests/qemufirmwaredata/usr/share/qemu/firmware/50-edk2-riscv-qcow2.json
@@ -0,0 +1,33 @@
+{
+ "description": "UEFI firmware for RISC-V virtual machines",
+ "interface-types": [
+ "uefi"
+ ],
+ "mapping": {
+ "device": "flash",
+ "mode" : "split",
+ "executable": {
+ "filename":
"/usr/share/edk2/riscv/RISCV_VIRT_CODE.qcow2",
+ "format": "qcow2"
+ },
+ "nvram-template": {
+ "filename":
"/usr/share/edk2/riscv/RISCV_VIRT_VARS.qcow2",
+ "format": "qcow2"
+ }
+ },
+ "targets": [
+ {
+ "architecture": "riscv64",
+ "machines": [
+ "virt",
+ "virt-*"
+ ]
+ }
+ ],
+ "features": [
+
+ ],
+ "tags": [
+
+ ]
+}
diff --git a/tests/qemufirmwaretest.c b/tests/qemufirmwaretest.c
index a5e7e2ec65..f16ea526ff 100644
--- a/tests/qemufirmwaretest.c
+++ b/tests/qemufirmwaretest.c
@@ -93,6 +93,7 @@ testFWPrecedence(const void *opaque G_GNUC_UNUSED)
PREFIX "/share/qemu/firmware/50-edk2-loongarch64.json",
PREFIX "/share/qemu/firmware/50-edk2-ovmf-4m-qcow2-x64-nosb.json",
PREFIX "/share/qemu/firmware/50-edk2-ovmf-x64-microvm.json",
+ PREFIX "/share/qemu/firmware/50-edk2-riscv-qcow2.json",
PREFIX "/share/qemu/firmware/51-edk2-aarch64-raw.json",
PREFIX "/share/qemu/firmware/51-edk2-ovmf-2m-raw-x64-nosb.json",
PREFIX "/share/qemu/firmware/52-edk2-aarch64-verbose-qcow2.json",
@@ -272,6 +273,7 @@ mymain(void)
DO_PARSE_TEST("usr/share/qemu/firmware/50-edk2-loongarch64.json");
DO_PARSE_TEST("usr/share/qemu/firmware/50-edk2-ovmf-4m-qcow2-x64-nosb.json");
DO_PARSE_TEST("usr/share/qemu/firmware/50-edk2-ovmf-x64-microvm.json");
+ DO_PARSE_TEST("usr/share/qemu/firmware/50-edk2-riscv-qcow2.json");
DO_PARSE_TEST("usr/share/qemu/firmware/51-edk2-aarch64-raw.json");
DO_PARSE_TEST("usr/share/qemu/firmware/51-edk2-ovmf-2m-raw-x64-nosb.json");
DO_PARSE_TEST("usr/share/qemu/firmware/52-edk2-aarch64-verbose-qcow2.json");
@@ -332,6 +334,9 @@ mymain(void)
"/usr/share/edk2/aarch64/QEMU_EFI-pflash.qcow2:/usr/share/edk2/aarch64/vars-template-pflash.qcow2:"
"/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw",
VIR_DOMAIN_OS_DEF_FIRMWARE_EFI);
+ DO_SUPPORTED_TEST("virt", VIR_ARCH_RISCV64, false,
+
"/usr/share/edk2/riscv/RISCV_VIRT_CODE.qcow2:/usr/share/edk2/riscv/RISCV_VIRT_VARS.qcow2",
+ VIR_DOMAIN_OS_DEF_FIRMWARE_EFI);
virFileWrapperClearPrefixes();
--
2.45.2