qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: qemu-ppc@nongnu.org
Cc: stuart.yoder@freescale.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v3 3/4] PPC: mpc8554ds: Tell user about exceeding RAM limits
Date: Wed, 12 Nov 2014 22:56:39 +0100	[thread overview]
Message-ID: <1415829400-58216-4-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1415829400-58216-1-git-send-email-agraf@suse.de>

The mpc8544ds board only supports up to 3GB of RAM due to its limited
address space.

When the user requests more, abort and tell him that he should use less.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/ppc/mpc8544ds.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/ppc/mpc8544ds.c b/hw/ppc/mpc8544ds.c
index f131633..fb74b3f 100644
--- a/hw/ppc/mpc8544ds.c
+++ b/hw/ppc/mpc8544ds.c
@@ -15,6 +15,7 @@
 #include "hw/boards.h"
 #include "sysemu/device_tree.h"
 #include "hw/ppc/openpic.h"
+#include "qemu/error-report.h"
 
 static void mpc8544ds_fixup_devtree(PPCE500Params *params, void *fdt)
 {
@@ -38,6 +39,11 @@ static void mpc8544ds_init(MachineState *machine)
         .spin_base = 0xEF000000ULL,
     };
 
+    if (machine->ram_size > 0xc0000000) {
+        error_report("The MPC8544DS board only supports up to 3GB of RAM");
+        exit(1);
+    }
+
     ppce500_init(machine, &params);
 }
 
-- 
1.8.1.4

  parent reply	other threads:[~2014-11-12 21:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 21:56 [Qemu-devel] [PATCH v3 0/4] PPC: e500: Support more RAM Alexander Graf
2014-11-12 21:56 ` [Qemu-devel] [PATCH v3 1/4] PPC: e500: Move CCSR definition to params Alexander Graf
2014-11-12 21:56 ` [Qemu-devel] [PATCH v3 2/4] PPC: e500: Move CCSR and MMIO space to upper end of address space Alexander Graf
2014-11-12 21:56 ` Alexander Graf [this message]
2014-11-12 21:56 ` [Qemu-devel] [PATCH v3 4/4] PPC: e500 pci host: Add support for ATMUs Alexander Graf
2014-11-13 15:08   ` [Qemu-devel] [Qemu-ppc] " Bharat.Bhushan
2014-11-13 19:06     ` Alexander Graf

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=1415829400-58216-4-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=stuart.yoder@freescale.com \
    /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).