From: Rob Herring <robherring2@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Rob Herring <rob.herring@linaro.org>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] arm: highbank: setup custom MPIDR value
Date: Mon, 24 Feb 2014 16:14:46 -0600 [thread overview]
Message-ID: <1393280086-19431-2-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1393280086-19431-1-git-send-email-robherring2@gmail.com>
From: Rob Herring <rob.herring@linaro.org>
Calxeda highbank platform uses a cluster id of 9 which makes MPIDR
register be 0x8000090n where n is the core number. This causes problems
on current kernels expecting the MPIDR to match DT cpu reg property.
Midway is "normal" and has a cluster id of 0, so it does not need this
override.
Signed-off-by: Rob Herring <rob.herring@linaro.org>
---
hw/arm/highbank.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index d76a1d1..e73d86f 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -241,6 +241,15 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine)
error_report("%s", error_get_pretty(err));
exit(1);
}
+
+ if (machine == CALXEDA_HIGHBANK) {
+ object_property_set_int(OBJECT(cpu), 0x80000900 | n, "mpidr",
+ &err);
+ if (err) {
+ error_report("%s", error_get_pretty(err));
+ exit(1);
+ }
+ }
object_property_set_bool(OBJECT(cpu), true, "realized", &err);
if (err) {
error_report("%s", error_get_pretty(err));
--
1.8.3.2
next prev parent reply other threads:[~2014-02-24 22:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 22:14 [Qemu-devel] [PATCH 1/2] target-arm: make MPIDR a property Rob Herring
2014-02-24 22:14 ` Rob Herring [this message]
2014-02-24 22:28 ` Peter Maydell
2014-02-24 23:13 ` Rob Herring
2014-02-24 23:34 ` Peter Maydell
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=1393280086-19431-2-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rob.herring@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.