Skip to content

Commit

Permalink
mips: remove bios_name
Browse files Browse the repository at this point in the history
Cc: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed Dec 10, 2020
1 parent 1684273 commit 59588be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions hw/mips/fuloong2e.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static void mips_fuloong2e_init(MachineState *machine)
write_bootloader(env, memory_region_get_ram_ptr(bios), kernel_entry);
} else {
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,
bios_name ?: FULOONG_BIOSNAME);
machine->firmware ?: FULOONG_BIOSNAME);
if (filename) {
bios_size = load_image_targphys(filename, 0x1fc00000LL,
BIOS_SIZE);
Expand All @@ -348,8 +348,8 @@ static void mips_fuloong2e_init(MachineState *machine)
}

if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
bios_name && !qtest_enabled()) {
error_report("Could not load MIPS bios '%s'", bios_name);
machine->firmware && !qtest_enabled()) {
error_report("Could not load MIPS bios '%s'", machine->firmware);
exit(1);
}
}
Expand Down
6 changes: 3 additions & 3 deletions hw/mips/jazz.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static void mips_jazz_init(MachineState *machine,
memory_region_add_subregion(address_space, 0xfff00000LL, bios2);

/* load the BIOS image. */
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name ?: BIOS_FILENAME);
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, machine->firmware ?: BIOS_FILENAME);
if (filename) {
bios_size = load_image_targphys(filename, 0xfff00000LL,
MAGNUM_BIOS_SIZE);
Expand All @@ -227,8 +227,8 @@ static void mips_jazz_init(MachineState *machine,
bios_size = -1;
}
if ((bios_size < 0 || bios_size > MAGNUM_BIOS_SIZE)
&& bios_name && !qtest_enabled()) {
error_report("Could not load MIPS bios '%s'", bios_name);
&& machine->firmware && !qtest_enabled()) {
error_report("Could not load MIPS bios '%s'", machine->firmware);
exit(1);
}

Expand Down
6 changes: 3 additions & 3 deletions hw/mips/malta.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ void mips_malta_init(MachineState *machine)
if (!dinfo) {
/* Load a BIOS image. */
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,
bios_name ?: BIOS_FILENAME);
machine->firmware ?: BIOS_FILENAME);
if (filename) {
bios_size = load_image_targphys(filename, FLASH_ADDRESS,
BIOS_SIZE);
Expand All @@ -1342,8 +1342,8 @@ void mips_malta_init(MachineState *machine)
bios_size = -1;
}
if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
bios_name && !qtest_enabled()) {
error_report("Could not load MIPS bios '%s'", bios_name);
machine->firmware && !qtest_enabled()) {
error_report("Could not load MIPS bios '%s'", machine->firmware);
exit(1);
}
}
Expand Down
6 changes: 3 additions & 3 deletions hw/mips/mipssim.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,17 @@ mips_mipssim_init(MachineState *machine)
/* Map the BIOS / boot exception handler. */
memory_region_add_subregion(address_space_mem, 0x1fc00000LL, bios);
/* Load a BIOS / boot exception handler image. */
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name ?: BIOS_FILENAME);
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, machine->firmware ?: BIOS_FILENAME);
if (filename) {
bios_size = load_image_targphys(filename, 0x1fc00000LL, BIOS_SIZE);
g_free(filename);
} else {
bios_size = -1;
}
if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
bios_name && !qtest_enabled()) {
machine->firmware && !qtest_enabled()) {
/* Bail out if we have neither a kernel image nor boot vector code. */
error_report("Could not load MIPS bios '%s'", bios_name);
error_report("Could not load MIPS bios '%s'", machine->firmware);
exit(1);
} else {
/* We have a boot vector start address. */
Expand Down

0 comments on commit 59588be

Please sign in to comment.