mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
m68k: remove bios_name
Cc: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20201026143028.3034018-8-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
a408b81b2c
commit
1684273ca8
3 changed files with 7 additions and 11 deletions
|
@ -301,17 +301,17 @@ static void mcf5208evb_init(MachineState *machine)
|
||||||
/* 0xfc0a8000 SDRAM controller. */
|
/* 0xfc0a8000 SDRAM controller. */
|
||||||
|
|
||||||
/* Load firmware */
|
/* Load firmware */
|
||||||
if (bios_name) {
|
if (machine->firmware) {
|
||||||
char *fn;
|
char *fn;
|
||||||
uint8_t *ptr;
|
uint8_t *ptr;
|
||||||
|
|
||||||
fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, machine->firmware);
|
||||||
if (!fn) {
|
if (!fn) {
|
||||||
error_report("Could not find ROM image '%s'", bios_name);
|
error_report("Could not find ROM image '%s'", machine->firmware);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (load_image_targphys(fn, 0x0, ROM_SIZE) < 8) {
|
if (load_image_targphys(fn, 0x0, ROM_SIZE) < 8) {
|
||||||
error_report("Could not load ROM image '%s'", bios_name);
|
error_report("Could not load ROM image '%s'", machine->firmware);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
g_free(fn);
|
g_free(fn);
|
||||||
|
@ -323,7 +323,7 @@ static void mcf5208evb_init(MachineState *machine)
|
||||||
|
|
||||||
/* Load kernel. */
|
/* Load kernel. */
|
||||||
if (!kernel_filename) {
|
if (!kernel_filename) {
|
||||||
if (qtest_enabled() || bios_name) {
|
if (qtest_enabled() || machine->firmware) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
error_report("Kernel image must be specified");
|
error_report("Kernel image must be specified");
|
||||||
|
|
|
@ -868,6 +868,7 @@ static void next_cube_init(MachineState *machine)
|
||||||
MemoryRegion *bmapm1 = g_new(MemoryRegion, 1);
|
MemoryRegion *bmapm1 = g_new(MemoryRegion, 1);
|
||||||
MemoryRegion *bmapm2 = g_new(MemoryRegion, 1);
|
MemoryRegion *bmapm2 = g_new(MemoryRegion, 1);
|
||||||
MemoryRegion *sysmem = get_system_memory();
|
MemoryRegion *sysmem = get_system_memory();
|
||||||
|
const char *bios_name = machine->firmware ?: ROM_FILE;
|
||||||
NeXTState *ns = NEXT_MACHINE(machine);
|
NeXTState *ns = NEXT_MACHINE(machine);
|
||||||
DeviceState *dev;
|
DeviceState *dev;
|
||||||
|
|
||||||
|
@ -924,9 +925,6 @@ static void next_cube_init(MachineState *machine)
|
||||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x0200e000);
|
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x0200e000);
|
||||||
|
|
||||||
/* Load ROM here */
|
/* Load ROM here */
|
||||||
if (bios_name == NULL) {
|
|
||||||
bios_name = ROM_FILE;
|
|
||||||
}
|
|
||||||
/* still not sure if the rom should also be mapped at 0x0*/
|
/* still not sure if the rom should also be mapped at 0x0*/
|
||||||
memory_region_init_rom(rom, NULL, "next.rom", 0x20000, &error_fatal);
|
memory_region_init_rom(rom, NULL, "next.rom", 0x20000, &error_fatal);
|
||||||
memory_region_add_subregion(sysmem, 0x01000000, rom);
|
memory_region_add_subregion(sysmem, 0x01000000, rom);
|
||||||
|
|
|
@ -167,6 +167,7 @@ static void q800_init(MachineState *machine)
|
||||||
const char *kernel_filename = machine->kernel_filename;
|
const char *kernel_filename = machine->kernel_filename;
|
||||||
const char *initrd_filename = machine->initrd_filename;
|
const char *initrd_filename = machine->initrd_filename;
|
||||||
const char *kernel_cmdline = machine->kernel_cmdline;
|
const char *kernel_cmdline = machine->kernel_cmdline;
|
||||||
|
const char *bios_name = machine->firmware ?: MACROM_FILENAME;
|
||||||
hwaddr parameters_base;
|
hwaddr parameters_base;
|
||||||
CPUState *cs;
|
CPUState *cs;
|
||||||
DeviceState *dev;
|
DeviceState *dev;
|
||||||
|
@ -400,9 +401,6 @@ static void q800_init(MachineState *machine)
|
||||||
rom = g_malloc(sizeof(*rom));
|
rom = g_malloc(sizeof(*rom));
|
||||||
memory_region_init_rom(rom, NULL, "m68k_mac.rom", MACROM_SIZE,
|
memory_region_init_rom(rom, NULL, "m68k_mac.rom", MACROM_SIZE,
|
||||||
&error_abort);
|
&error_abort);
|
||||||
if (bios_name == NULL) {
|
|
||||||
bios_name = MACROM_FILENAME;
|
|
||||||
}
|
|
||||||
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
||||||
memory_region_add_subregion(get_system_memory(), MACROM_ADDR, rom);
|
memory_region_add_subregion(get_system_memory(), MACROM_ADDR, rom);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue