|
@@ -141,6 +141,7 @@ static void ref405ep_fpga_init(MemoryRegion *sysmem, uint32_t base)
|
|
|
static void ref405ep_init(MachineState *machine)
|
|
|
{
|
|
|
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
|
|
+ const char *bios_name = machine->firmware ?: BIOS_FILENAME;
|
|
|
const char *kernel_filename = machine->kernel_filename;
|
|
|
const char *kernel_cmdline = machine->kernel_cmdline;
|
|
|
const char *initrd_filename = machine->initrd_filename;
|
|
@@ -206,8 +207,6 @@ static void ref405ep_init(MachineState *machine)
|
|
|
memory_region_init_rom(bios, NULL, "ef405ep.bios", BIOS_SIZE,
|
|
|
&error_fatal);
|
|
|
|
|
|
- if (bios_name == NULL)
|
|
|
- bios_name = BIOS_FILENAME;
|
|
|
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
|
|
if (filename) {
|
|
|
bios_size = load_image_size(filename,
|
|
@@ -425,6 +424,7 @@ static void taihu_cpld_init(MemoryRegion *sysmem, uint32_t base)
|
|
|
static void taihu_405ep_init(MachineState *machine)
|
|
|
{
|
|
|
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
|
|
+ const char *bios_name = machine->firmware ?: BIOS_FILENAME;
|
|
|
const char *kernel_filename = machine->kernel_filename;
|
|
|
const char *initrd_filename = machine->initrd_filename;
|
|
|
char *filename;
|
|
@@ -475,8 +475,6 @@ static void taihu_405ep_init(MachineState *machine)
|
|
|
} else
|
|
|
#endif
|
|
|
{
|
|
|
- if (bios_name == NULL)
|
|
|
- bios_name = BIOS_FILENAME;
|
|
|
bios = g_new(MemoryRegion, 1);
|
|
|
memory_region_init_rom(bios, NULL, "taihu_405ep.bios", BIOS_SIZE,
|
|
|
&error_fatal);
|