summaryrefslogtreecommitdiffstats
path: root/hw/unicore32
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-12-17 17:35:09 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:24 -0600
commit5ae6bf705b62d3908fa0b898eb7fd92fe0649452 (patch)
tree6ed7ccf14da17037a1e9e77ce97bd0f2f990509e /hw/unicore32
parentfe216fccd8e59982f120f0643f3363a7c95ccb67 (diff)
downloadhqemu-5ae6bf705b62d3908fa0b898eb7fd92fe0649452.zip
hqemu-5ae6bf705b62d3908fa0b898eb7fd92fe0649452.tar.gz
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/unicore32')
-rw-r--r--hw/unicore32/puv3.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c
index 91117b2..1968202 100644
--- a/hw/unicore32/puv3.c
+++ b/hw/unicore32/puv3.c
@@ -17,6 +17,7 @@
#include "hw/boards.h"
#include "hw/loader.h"
#include "hw/i386/pc.h"
+#include "qemu/error-report.h"
#include "sysemu/qtest.h"
#undef DEBUG_PUV3
@@ -95,7 +96,8 @@ static void puv3_load_kernel(const char *kernel_filename)
size = load_image_targphys(kernel_filename, KERNEL_LOAD_ADDR,
KERNEL_MAX_SIZE);
if (size < 0) {
- hw_error("Load kernel error: '%s'\n", kernel_filename);
+ error_report("Load kernel error: '%s'", kernel_filename);
+ exit(1);
}
/* cheat curses that we have a graphic console, only under ocd console */
@@ -112,7 +114,8 @@ static void puv3_init(MachineState *machine)
UniCore32CPU *cpu;
if (initrd_filename) {
- hw_error("Please use kernel built-in initramdisk.\n");
+ error_report("Please use kernel built-in initramdisk");
+ exit(1);
}
if (!cpu_model) {
@@ -121,7 +124,8 @@ static void puv3_init(MachineState *machine)
cpu = uc32_cpu_init(cpu_model);
if (!cpu) {
- hw_error("Unable to find CPU definition\n");
+ error_report("Unable to find CPU definition");
+ exit(1);
}
env = &cpu->env;
OpenPOWER on IntegriCloud