mirror of https://github.com/xemu-project/xemu.git
xbox: Replace bios_name global with MachineState->firmware field
This commit is contained in:
parent
fe0aa0c191
commit
e1e28ba62e
|
@ -61,14 +61,13 @@
|
||||||
#define MAX_IDE_BUS 2
|
#define MAX_IDE_BUS 2
|
||||||
|
|
||||||
/* FIXME: Clean this up and propagate errors to UI */
|
/* FIXME: Clean this up and propagate errors to UI */
|
||||||
static void xbox_flash_init(MemoryRegion *rom_memory)
|
static void xbox_flash_init(MachineState *ms, MemoryRegion *rom_memory)
|
||||||
{
|
{
|
||||||
const uint32_t rom_start = 0xFF000000;
|
const uint32_t rom_start = 0xFF000000;
|
||||||
|
const char *bios_name;
|
||||||
|
|
||||||
/* Locate BIOS ROM image */
|
/* Locate BIOS ROM image */
|
||||||
if (bios_name == NULL) {
|
bios_name = ms->firmware ?: "bios.bin";
|
||||||
bios_name = "bios.bin";
|
|
||||||
}
|
|
||||||
|
|
||||||
int failed_to_load_bios = 1;
|
int failed_to_load_bios = 1;
|
||||||
char *filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
char *filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
||||||
|
@ -198,7 +197,7 @@ static void xbox_memory_init(PCMachineState *pcms,
|
||||||
*ram_memory = ram;
|
*ram_memory = ram;
|
||||||
memory_region_add_subregion(system_memory, 0, ram);
|
memory_region_add_subregion(system_memory, 0, ram);
|
||||||
|
|
||||||
xbox_flash_init(rom_memory);
|
xbox_flash_init(machine, rom_memory);
|
||||||
pc_system_flash_cleanup_unused(pcms);
|
pc_system_flash_cleanup_unused(pcms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue