aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/mac_oldworld.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-12-17 17:35:09 +0100
committerMarkus Armbruster <armbru@redhat.com>2016-01-13 11:58:58 +0100
commitc525436e69bb7e74ca96982a40b8ead037186049 (patch)
treedeba652f822c68c7eff9dd92af502a1848a1e8e8 /hw/ppc/mac_oldworld.c
parent6231a6da9f40c3a33589402c9c57557e3a4f05ad (diff)
hw: Don't use hw_error() for machine initialization errors
Printing CPU registers is not helpful during machine initialization. Moreover, these are straightforward configuration or "can get resources" errors, so dumping core isn't appropriate either. Replace hw_error() by error_report(); exit(1). Matches how we report these errors in other machine initializations. Cc: Richard Henderson <rth@twiddle.net> Cc: qemu-arm@nongnu.org Cc: qemu-ppc@nongnu.org Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Markus Armbruster <armbru@pond.sub.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <1450370121-5768-2-git-send-email-armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'hw/ppc/mac_oldworld.c')
-rw-r--r--hw/ppc/mac_oldworld.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 21eaf0e66b..c3f9fe3907 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -38,6 +38,7 @@
#include "hw/ide.h"
#include "hw/loader.h"
#include "elf.h"
+#include "qemu/error-report.h"
#include "sysemu/kvm.h"
#include "kvm_ppc.h"
#include "sysemu/block-backend.h"
@@ -153,7 +154,7 @@ static void ppc_heathrow_init(MachineState *machine)
bios_size = -1;
}
if (bios_size < 0 || bios_size > BIOS_SIZE) {
- hw_error("qemu: could not load PowerPC bios '%s'\n", bios_name);
+ error_report("could not load PowerPC bios '%s'", bios_name);
exit(1);
}
@@ -178,8 +179,7 @@ static void ppc_heathrow_init(MachineState *machine)
kernel_base,
ram_size - kernel_base);
if (kernel_size < 0) {
- hw_error("qemu: could not load kernel '%s'\n",
- kernel_filename);
+ error_report("could not load kernel '%s'", kernel_filename);
exit(1);
}
/* load initrd */
@@ -188,8 +188,8 @@ static void ppc_heathrow_init(MachineState *machine)
initrd_size = load_image_targphys(initrd_filename, initrd_base,
ram_size - initrd_base);
if (initrd_size < 0) {
- hw_error("qemu: could not load initial ram disk '%s'\n",
- initrd_filename);
+ error_report("could not load initial ram disk '%s'",
+ initrd_filename);
exit(1);
}
cmdline_base = round_page(initrd_base + initrd_size);
@@ -246,7 +246,8 @@ static void ppc_heathrow_init(MachineState *machine)
((qemu_irq *)env->irq_inputs)[PPC6xx_INPUT_INT];
break;
default:
- hw_error("Bus model not supported on OldWorld Mac machine\n");
+ error_report("Bus model not supported on OldWorld Mac machine");
+ exit(1);
}
}
@@ -259,7 +260,8 @@ static void ppc_heathrow_init(MachineState *machine)
/* init basic PC hardware */
if (PPC_INPUT(env) != PPC_FLAGS_INPUT_6xx) {
- hw_error("Only 6xx bus is supported on heathrow machine\n");
+ error_report("Only 6xx bus is supported on heathrow machine");
+ exit(1);
}
pic = heathrow_pic_init(&pic_mem, 1, heathrow_irqs);
pci_bus = pci_grackle_init(0xfec00000, pic,