[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/15] riscv: Suppress the error report for QEMU testing with risc
From: |
Alistair Francis |
Subject: |
[PULL 01/15] riscv: Suppress the error report for QEMU testing with riscv_find_firmware() |
Date: |
Wed, 3 Jun 2020 09:13:44 -0700 |
From: Bin Meng <bin.meng@windriver.com>
We only ship plain binary bios images in the QEMU source. With Spike
machine that uses ELF images as the default bios, running QEMU test
will complain hence let's suppress the error report for QEMU testing.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Message-Id: <1588348254-7241-6-git-send-email-bmeng.cn@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
hw/riscv/boot.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c
index 726300a171..da5817d438 100644
--- a/hw/riscv/boot.c
+++ b/hw/riscv/boot.c
@@ -88,9 +88,17 @@ char *riscv_find_firmware(const char *firmware_filename)
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, firmware_filename);
if (filename == NULL) {
- error_report("Unable to load the RISC-V firmware \"%s\"",
- firmware_filename);
- exit(1);
+ if (!qtest_enabled()) {
+ /*
+ * We only ship plain binary bios images in the QEMU source.
+ * With Spike machine that uses ELF images as the default bios,
+ * running QEMU test will complain hence let's suppress the error
+ * report for QEMU testing.
+ */
+ error_report("Unable to load the RISC-V firmware \"%s\"",
+ firmware_filename);
+ exit(1);
+ }
}
return filename;
--
2.26.2
- [PULL 00/15] riscv-to-apply queue, Alistair Francis, 2020/06/03
- [PULL 01/15] riscv: Suppress the error report for QEMU testing with riscv_find_firmware(),
Alistair Francis <=
- [PULL 02/15] riscv: Change the default behavior if no -bios option is specified, Alistair Francis, 2020/06/03
- [PULL 03/15] hw/riscv: sifive_u: Remove the riscv_ prefix of the soc* functions, Alistair Francis, 2020/06/03
- [PULL 04/15] hw/riscv: virt: Remove the riscv_ prefix of the machine* functions, Alistair Francis, 2020/06/03
- [PULL 05/15] hw/riscv: spike: Remove deprecated ISA specific machines, Alistair Francis, 2020/06/03
- [PULL 09/15] riscv: sifive_e: Manually define the machine, Alistair Francis, 2020/06/03
- [PULL 08/15] docs: deprecated: Update the -bios documentation, Alistair Francis, 2020/06/03
- [PULL 07/15] target/riscv: Drop support for ISA spec version 1.09.1, Alistair Francis, 2020/06/03
- [PULL 06/15] target/riscv: Remove the deprecated CPUs, Alistair Francis, 2020/06/03
- Re: [PULL 00/15] riscv-to-apply queue, Peter Maydell, 2020/06/04