}
}
+static char *riscv_find_firmware(const char *firmware_filename)
+{
+ char *filename;
+
+ filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, firmware_filename);
+ if (filename == NULL) {
+ if (!qtest_enabled()) {
+ /*
+ * We only ship OpenSBI binary bios images in the QEMU source.
+ * For machines that use images other than 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;
+}
+
target_ulong riscv_find_and_load_firmware(MachineState *machine,
const char *default_machine_firmware,
hwaddr firmware_load_addr,
return firmware_end_addr;
}
-char *riscv_find_firmware(const char *firmware_filename)
-{
- char *filename;
-
- filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, firmware_filename);
- if (filename == NULL) {
- if (!qtest_enabled()) {
- /*
- * We only ship OpenSBI binary bios images in the QEMU source.
- * For machines that use images other than 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;
-}
-
target_ulong riscv_load_firmware(const char *firmware_filename,
hwaddr firmware_load_addr,
symbol_fn_t sym_cb)
const char *default_machine_firmware,
hwaddr firmware_load_addr,
symbol_fn_t sym_cb);
-char *riscv_find_firmware(const char *firmware_filename);
target_ulong riscv_load_firmware(const char *firmware_filename,
hwaddr firmware_load_addr,
symbol_fn_t sym_cb);