[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH arm-devs v1 5/6] arm/xilinx_zynq: Use object_new() r
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [PATCH arm-devs v1 5/6] arm/xilinx_zynq: Use object_new() rather than cpu_arm_init() |
Date: |
Wed, 27 Nov 2013 01:03:25 -0800 |
To allow the machine model to set device properties before CPU
realization.
Signed-off-by: Peter Crosthwaite <address@hidden>
---
hw/arm/xilinx_zynq.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 46924a0..b4553e8 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -110,15 +110,20 @@ static void zynq_init(QEMUMachineInitArgs *args)
SysBusDevice *busdev;
qemu_irq pic[64];
NICInfo *nd;
+ Error *err = NULL;
int n;
if (!cpu_model) {
cpu_model = "cortex-a9";
}
+ cpu_model = g_strdup_printf("%s-" TYPE_ARM_CPU, cpu_model);
- cpu = cpu_arm_init(cpu_model);
- if (!cpu) {
- fprintf(stderr, "Unable to find CPU definition\n");
+ cpu = ARM_CPU(object_new(cpu_model));
+ g_free((void *)cpu_model);
+
+ object_property_set_bool(OBJECT(cpu), true, "realized", &err);
+ if (err) {
+ fprintf(stderr, "%s\n", error_get_pretty(err));
exit(1);
}
--
1.8.4.4
- Re: [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property, (continued)
- Re: [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property, Andreas Färber, 2013/11/27
- Re: [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property, Peter Maydell, 2013/11/27
- Re: [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property, Peter Crosthwaite, 2013/11/27
- Re: [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property, Peter Maydell, 2013/11/27
- Re: [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property, Peter Crosthwaite, 2013/11/27
- Re: [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property, Andreas Färber, 2013/11/27
[Qemu-devel] [PATCH arm-devs v1 3/6] arm/highbank: Use object_new() rather than cpu_arm_init(), Peter Crosthwaite, 2013/11/27
[Qemu-devel] [PATCH arm-devs v1 4/6] arm/highbank: Fix CBAR intialisation, Peter Crosthwaite, 2013/11/27
[Qemu-devel] [PATCH arm-devs v1 5/6] arm/xilinx_zynq: Use object_new() rather than cpu_arm_init(),
Peter Crosthwaite <=
[Qemu-devel] [PATCH arm-devs v1 6/6] arm/xilinx_zynq: Implement CBAR intialisation, Peter Crosthwaite, 2013/11/27