qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, "Andreas Färber" <afaerber@suse.de>,
	aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH qom-cpu 1/2] shix: Catch CPU initialization errors
Date: Tue,  9 Apr 2013 16:51:23 +0200	[thread overview]
Message-ID: <1365519084-4229-2-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1365519084-4229-1-git-send-email-afaerber@suse.de>

Print an error message as done for the r2d machine and exit.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/sh4/shix.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index c23d4af..f5cfef9 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -52,6 +52,10 @@ static void shix_init(QEMUMachineInitArgs *args)
 
     printf("Initializing CPU\n");
     env = cpu_init(cpu_model);
+    if (env == NULL) {
+        fprintf(stderr, "Unable to find CPU definition\n");
+        exit(1);
+    }
 
     /* Allocate memory space */
     printf("Allocating ROM\n");
-- 
1.8.1.4

  reply	other threads:[~2013-04-09 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09 14:51 [Qemu-devel] [PATCH qom-cpu 0/2] target-sh4: SuperHCPU fixups Andreas Färber
2013-04-09 14:51 ` Andreas Färber [this message]
2013-04-09 15:05   ` [Qemu-devel] [PATCH qom-cpu 1/2] shix: Catch CPU initialization errors Peter Maydell
2013-04-09 14:51 ` [Qemu-devel] [PATCH qom-cpu 2/2] sh7750: Change cpu field type to SuperHCPU Andreas Färber
2013-04-09 15:29   ` Peter Maydell
2013-04-09 17:10     ` Andreas Färber
2013-04-13 12:35       ` Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365519084-4229-2-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).