aboutsummaryrefslogtreecommitdiff
path: root/hw/mips/mipssim.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>2020-07-21 09:15:05 +0300
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-10-17 13:59:40 +0200
commita4374f86dc648b6cf10a7c8c40bde33722e5b25d (patch)
tree2ddcbb343bf455879ebe127be9bdaa70ee409f6f /hw/mips/mipssim.c
parent27cf0896bfd84a9ccb2cfe315952338f00aa086e (diff)
downloadqemu-a4374f86dc648b6cf10a7c8c40bde33722e5b25d.zip
qemu-a4374f86dc648b6cf10a7c8c40bde33722e5b25d.tar.gz
qemu-a4374f86dc648b6cf10a7c8c40bde33722e5b25d.tar.bz2
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/mipssim.c')
-rw-r--r--hw/mips/mipssim.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
index 97dcc23..aaa62a0 100644
--- a/hw/mips/mipssim.c
+++ b/hw/mips/mipssim.c
@@ -177,10 +177,7 @@ 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. */
- if (bios_name == NULL) {
- bios_name = BIOS_FILENAME;
- }
- filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
+ filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name ?: BIOS_FILENAME);
if (filename) {
bios_size = load_image_targphys(filename, 0x1fc00000LL, BIOS_SIZE);
g_free(filename);
@@ -188,10 +185,9 @@ mips_mipssim_init(MachineState *machine)
bios_size = -1;
}
if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
- !kernel_filename && !qtest_enabled()) {
+ bios_name && !qtest_enabled()) {
/* Bail out if we have neither a kernel image nor boot vector code. */
- error_report("Could not load MIPS bios '%s', and no "
- "-kernel argument was specified", bios_name);
+ error_report("Could not load MIPS bios '%s'", bios_name);
exit(1);
} else {
/* We have a boot vector start address. */