diff options
Diffstat (limited to 'target-arm/cpu.c')
-rw-r--r-- | target-arm/cpu.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 408d207865..45ad7f0260 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -252,18 +252,15 @@ static Property arm_cpu_reset_hivecs_property = static void arm_cpu_post_init(Object *obj) { ARMCPU *cpu = ARM_CPU(obj); - Error *err = NULL; if (arm_feature(&cpu->env, ARM_FEATURE_CBAR)) { qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_cbar_property, - &err); - assert_no_error(err); + &error_abort); } if (!arm_feature(&cpu->env, ARM_FEATURE_M)) { qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_hivecs_property, - &err); - assert_no_error(err); + &error_abort); } } @@ -980,10 +977,12 @@ static const ARMCPUInfo arm_cpus[] = { { .name = "any", .initfn = arm_any_initfn }, #endif #endif + { .name = NULL } }; static Property arm_cpu_properties[] = { DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false), + DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0), DEFINE_PROP_END_OF_LIST() }; @@ -1043,11 +1042,13 @@ static const TypeInfo arm_cpu_type_info = { static void arm_cpu_register_types(void) { - int i; + const ARMCPUInfo *info = arm_cpus; type_register_static(&arm_cpu_type_info); - for (i = 0; i < ARRAY_SIZE(arm_cpus); i++) { - cpu_register(&arm_cpus[i]); + + while (info->name) { + cpu_register(info); + info++; } } |