mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
hw/riscv/boot.c: make riscv_find_firmware() static
The only caller is riscv_find_and_load_firmware(), which is in the same file. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Bin Meng <bmeng@tinylab.org> Signed-off-by: Bin Meng <bmeng@tinylab.org> Message-Id: <20221221182300.307900-5-dbarboza@ventanamicro.com> Message-Id: <20221229091828.1945072-10-bmeng@tinylab.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
a8a7f680d2
commit
808faef7cd
2 changed files with 22 additions and 23 deletions
|
@ -75,6 +75,28 @@ target_ulong riscv_calc_kernel_start_addr(RISCVHartArrayState *harts,
|
|||
}
|
||||
}
|
||||
|
||||
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,
|
||||
|
@ -104,28 +126,6 @@ target_ulong riscv_find_and_load_firmware(MachineState *machine,
|
|||
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)
|
||||
|
|
|
@ -37,7 +37,6 @@ target_ulong riscv_find_and_load_firmware(MachineState *machine,
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue