- memory_region_init_ram(ram, NULL, "versatile.ram", machine->ram_size,
- &error_abort);
- vmstate_register_ram_global(ram);
+
+ cpuobj = object_new(machine->cpu_type);
+
+ /* By default ARM1176 CPUs have EL3 enabled. This board does not
+ * currently support EL3 so the CPU EL3 property is disabled before
+ * realization.
+ */
+ if (object_property_find(cpuobj, "has_el3", NULL)) {
+ object_property_set_bool(cpuobj, false, "has_el3", &error_fatal);
+ }
+
+ object_property_set_bool(cpuobj, true, "realized", &error_fatal);
+
+ cpu = ARM_CPU(cpuobj);
+
+ memory_region_allocate_system_memory(ram, NULL, "versatile.ram",
+ machine->ram_size);