@@ -88,11 +88,22 @@ static void mb_cpu_reset(CPUState *s)
#endif
}
+static void mb_cpu_setup_as(CPUState *cs)
+{
+#ifndef CONFIG_USER_ONLY
+ MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);
+ CPUMBState *env = &cpu->env;
+
+ cpu_address_space_init(cs, env->as);
+#endif
+}
+
static void mb_cpu_realizefn(DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
MicroBlazeCPUClass *mcc = MICROBLAZE_CPU_GET_CLASS(dev);
+ mb_cpu_setup_as(cs);
cpu_reset(cs);
qemu_init_vcpu(cs);
@@ -123,6 +134,9 @@ static const VMStateDescription vmstate_mb_cpu = {
};
static Property mb_properties[] = {
+#ifndef CONFIG_USER_ONLY
+ DEFINE_PROP_ADDRESS_SPACE("address-space", MicroBlazeCPU, env.as),
+#endif
DEFINE_PROP_UINT32("xlnx.base-vectors", MicroBlazeCPU, base_vectors, 0),
DEFINE_PROP_END_OF_LIST(),
};