summaryrefslogtreecommitdiffstats
path: root/hw/mips/malta.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk2020-07-21 08:15:05 +0200
committerPhilippe Mathieu-Daudé2020-10-17 13:59:40 +0200
commita4374f86dc648b6cf10a7c8c40bde33722e5b25d (patch)
tree2ddcbb343bf455879ebe127be9bdaa70ee409f6f /hw/mips/malta.c
parenthw/mips: Rename TYPE_MIPS_BOSTON to TYPE_BOSTON (diff)
downloadqemu-a4374f86dc648b6cf10a7c8c40bde33722e5b25d.tar.gz
qemu-a4374f86dc648b6cf10a7c8c40bde33722e5b25d.tar.xz
qemu-a4374f86dc648b6cf10a7c8c40bde33722e5b25d.zip
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/malta.c')
-rw-r--r--hw/mips/malta.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index beb0f43941..9d1a3b50b7 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1332,10 +1332,8 @@ void mips_malta_init(MachineState *machine)
/* Load firmware from flash. */
if (!dinfo) {
/* Load a BIOS 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, FLASH_ADDRESS,
BIOS_SIZE);
@@ -1344,9 +1342,8 @@ void mips_malta_init(MachineState *machine)
bios_size = -1;
}
if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
- !kernel_filename && !qtest_enabled()) {
- error_report("Could not load MIPS bios '%s', and no "
- "-kernel argument was specified", bios_name);
+ bios_name && !qtest_enabled()) {
+ error_report("Could not load MIPS bios '%s'", bios_name);
exit(1);
}
}