aboutsummaryrefslogtreecommitdiff
path: root/target-unicore32/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-unicore32/cpu.c')
-rw-r--r--target-unicore32/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-unicore32/cpu.c b/target-unicore32/cpu.c
index 7bcf3b3658..b7024c85bb 100644
--- a/target-unicore32/cpu.c
+++ b/target-unicore32/cpu.c
@@ -93,10 +93,12 @@ static void uc32_cpu_realizefn(DeviceState *dev, Error **errp)
static void uc32_cpu_initfn(Object *obj)
{
+ CPUState *cs = CPU(obj);
UniCore32CPU *cpu = UNICORE32_CPU(obj);
CPUUniCore32State *env = &cpu->env;
static bool inited;
+ cs->env_ptr = env;
cpu_exec_init(env);
#ifdef CONFIG_USER_ONLY