diff options
author | Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> | 2020-07-21 09:15:05 +0300 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-10-17 13:59:40 +0200 |
commit | a4374f86dc648b6cf10a7c8c40bde33722e5b25d (patch) | |
tree | 2ddcbb343bf455879ebe127be9bdaa70ee409f6f /hw/mips/fuloong2e.c | |
parent | 27cf0896bfd84a9ccb2cfe315952338f00aa086e (diff) |
hw/mips: Remove exit(1) in case of missing ROM
This patch updates MIPS-based machines to allow starting them without ROM.
In this case CPU starts to execute instructions from the empty memory,
but QEMU allows introspecting the machine configuration.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <159531210571.24117.231100997794891819.stgit@pasha-ThinkPad-X280>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/mips/fuloong2e.c')
-rw-r--r-- | hw/mips/fuloong2e.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index de66215f95..a9e0c2f8d3 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -337,10 +337,8 @@ static void mips_fuloong2e_init(MachineState *machine) kernel_entry = load_kernel(env); write_bootloader(env, memory_region_get_ram_ptr(bios), kernel_entry); } else { - if (bios_name == NULL) { - bios_name = FULOONG_BIOSNAME; - } - filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, + bios_name ?: FULOONG_BIOSNAME); if (filename) { bios_size = load_image_targphys(filename, 0x1fc00000LL, BIOS_SIZE); @@ -350,7 +348,7 @@ static void mips_fuloong2e_init(MachineState *machine) } if ((bios_size < 0 || bios_size > BIOS_SIZE) && - !kernel_filename && !qtest_enabled()) { + bios_name && !qtest_enabled()) { error_report("Could not load MIPS bios '%s'", bios_name); exit(1); } |