summaryrefslogtreecommitdiff
path: root/target-arm/helper.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-05 10:18:18 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:56 +0100
commit149692667f8a46430127ca0555b38965f52177f5 (patch)
tree5ed1da3fd5cd2c2a4ada8bc730b27ab6165b1239 /target-arm/helper.c
parentbd1b282836a7885a13c13f9cc63123fa8e32f02f (diff)
downloadqemu-149692667f8a46430127ca0555b38965f52177f5.zip
target-arm: Update ARMCPU to QOM realizefn
Turn arm_cpu_realize() into a QOM realize function, no longer called via cpu.h prototype. To maintain the semantics of cpu_init(), set realized = true explicitly in cpu_arm_init(). Move GDB coprocessor registration, CPU reset and vCPU initialization into the realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r--target-arm/helper.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index eb7b2910c3..4538a09445 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1272,14 +1272,22 @@ ARMCPU *cpu_arm_init(const char *cpu_model)
cpu = ARM_CPU(object_new(object_class_get_name(oc)));
env = &cpu->env;
env->cpu_model_str = cpu_model;
- arm_cpu_realize(cpu);
+
+ /* TODO this should be set centrally, once possible */
+ object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
if (tcg_enabled() && !inited) {
inited = 1;
arm_translate_init();
}
- cpu_reset(CPU(cpu));
+ return cpu;
+}
+
+void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)
+{
+ CPUARMState *env = &cpu->env;
+
if (arm_feature(env, ARM_FEATURE_NEON)) {
gdb_register_coprocessor(env, vfp_gdb_get_reg, vfp_gdb_set_reg,
51, "arm-neon.xml", 0);
@@ -1290,8 +1298,6 @@ ARMCPU *cpu_arm_init(const char *cpu_model)
gdb_register_coprocessor(env, vfp_gdb_get_reg, vfp_gdb_set_reg,
19, "arm-vfp.xml", 0);
}
- qemu_init_vcpu(env);
- return cpu;
}
/* Sort alphabetically by type name, except for "any". */