aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/prep.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/prep.c
parent6231a6da9f40c3a33589402c9c57557e3a4f05ad (diff)
downloadqemu-c525436e69bb7e74ca96982a40b8ead037186049.zip
qemu-c525436e69bb7e74ca96982a40b8ead037186049.tar.gz
qemu-c525436e69bb7e74ca96982a40b8ead037186049.tar.bz2
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/prep.c')
-rw-r--r--hw/ppc/prep.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 5ad28f7..0e102fc 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -33,6 +33,7 @@
#include "hw/pci/pci_host.h"
#include "hw/ppc/ppc.h"
#include "hw/boards.h"
+#include "qemu/error-report.h"
#include "qemu/log.h"
#include "hw/ide.h"
#include "hw/loader.h"
@@ -532,7 +533,7 @@ static void ppc_prep_init(MachineState *machine)
kernel_size = load_image_targphys(kernel_filename, 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 */
@@ -541,8 +542,9 @@ static void ppc_prep_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);
}
} else {
initrd_base = 0;
@@ -569,7 +571,8 @@ static void ppc_prep_init(MachineState *machine)
}
if (PPC_INPUT(env) != PPC_FLAGS_INPUT_6xx) {
- hw_error("Only 6xx bus is supported on PREP machine\n");
+ error_report("Only 6xx bus is supported on PREP machine");
+ exit(1);
}
dev = qdev_create(NULL, "raven-pcihost");