From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Rob Herring" <rob.herring@linaro.org>,
"Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
"Evgeny Voevodin" <e.voevodin@samsung.com>,
patches@linaro.org, "Alexey Kardashevskiy" <aik@ozlabs.ru>,
"Igor Mitsyanko" <i.mitsyanko@gmail.com>,
"Dmitry Solodkiy" <d.solodkiy@samsung.com>,
"Maksim Kozlov" <m.kozlov@samsung.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 4/4] virt: Set reset-cbar on CPUs
Date: Mon, 24 Feb 2014 20:24:02 +0000 [thread overview]
Message-ID: <1393273442-20736-5-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1393273442-20736-1-git-send-email-peter.maydell@linaro.org>
Set the reset-cbar property on CPUs used by the virt board,
if they have it. This isn't necessary for correct functioning
under Linux (since the A9 isn't a valid CPU for the virt board),
but it is the correct behaviour.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/virt.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 517f2fe..b418b77 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -379,6 +379,7 @@ static void machvirt_init(QEMUMachineInitArgs *args)
for (n = 0; n < smp_cpus; n++) {
ObjectClass *oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model);
Object *cpuobj;
+ Error *err = NULL;
if (!oc) {
fprintf(stderr, "Unable to find CPU definition\n");
@@ -390,6 +391,16 @@ static void machvirt_init(QEMUMachineInitArgs *args)
if (n > 0) {
object_property_set_bool(cpuobj, true, "start-powered-off", NULL);
}
+
+ if (object_property_find(cpuobj, "reset-cbar", NULL)) {
+ object_property_set_int(cpuobj, vbi->memmap[VIRT_CPUPERIPHS].base,
+ "reset-cbar", &err);
+ if (err) {
+ error_report("%s", error_get_pretty(err));
+ exit(1);
+ }
+ }
+
object_property_set_bool(cpuobj, true, "realized", NULL);
}
fdt_add_cpu_nodes(vbi);
--
1.8.5
next prev parent reply other threads:[~2014-02-24 20:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 20:23 [Qemu-devel] [PATCH 0/4] ARM: Set reset-cbar property for A9 and A15 boards Peter Maydell
2014-02-24 20:23 ` [Qemu-devel] [PATCH 1/4] vexpress: Set reset-cbar property for CPUs Peter Maydell
2014-02-25 8:42 ` Peter Crosthwaite
2014-02-24 20:24 ` [Qemu-devel] [PATCH 2/4] realview-pbx-a9: " Peter Maydell
2014-02-25 8:26 ` Peter Crosthwaite
2014-02-24 20:24 ` [Qemu-devel] [PATCH 3/4] exynos4210: Set reset-cbar property of Cortex-A9 CPUs Peter Maydell
2014-02-25 8:18 ` Peter Crosthwaite
2014-02-24 20:24 ` Peter Maydell [this message]
2014-02-25 8:23 ` [Qemu-devel] [PATCH 4/4] virt: Set reset-cbar on CPUs Peter Crosthwaite
2014-02-26 17:05 ` 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=1393273442-20736-5-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=aik@ozlabs.ru \
--cc=d.solodkiy@samsung.com \
--cc=e.voevodin@samsung.com \
--cc=i.mitsyanko@gmail.com \
--cc=m.kozlov@samsung.com \
--cc=patches@linaro.org \
--cc=peter.crosthwaite@xilinx.com \
--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 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).