From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI272-0007Zt-75 for qemu-devel@nongnu.org; Mon, 24 Feb 2014 15:26:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WI271-0002nJ-0y for qemu-devel@nongnu.org; Mon, 24 Feb 2014 15:26:52 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI270-0002n7-Qs for qemu-devel@nongnu.org; Mon, 24 Feb 2014 15:26:50 -0500 From: Peter Maydell Date: Mon, 24 Feb 2014 20:24:02 +0000 Message-Id: <1393273442-20736-5-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1393273442-20736-1-git-send-email-peter.maydell@linaro.org> References: <1393273442-20736-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 4/4] virt: Set reset-cbar on CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Rob Herring , Peter Crosthwaite , Evgeny Voevodin , patches@linaro.org, Alexey Kardashevskiy , Igor Mitsyanko , Dmitry Solodkiy , Maksim Kozlov , =?UTF-8?q?Andreas=20F=C3=A4rber?= 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 --- 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