提交 a5b0f6d5 编写于 作者: M Michael Walle

target-lm32: flush tlb after clearing env

The tlb data is stored within the CPU env. Therefore, the initialization
has to be done after we clear the environment. Otherwise the tlb will have
a valid entry for address 0x0.
Signed-off-by: NMichael Walle <michael@walle.cc>
上级 de55c4bd
...@@ -36,10 +36,10 @@ static void lm32_cpu_reset(CPUState *s) ...@@ -36,10 +36,10 @@ static void lm32_cpu_reset(CPUState *s)
lcc->parent_reset(s); lcc->parent_reset(s);
tlb_flush(env, 1);
/* reset cpu state */ /* reset cpu state */
memset(env, 0, offsetof(CPULM32State, breakpoints)); memset(env, 0, offsetof(CPULM32State, breakpoints));
tlb_flush(env, 1);
} }
static void lm32_cpu_realizefn(DeviceState *dev, Error **errp) static void lm32_cpu_realizefn(DeviceState *dev, Error **errp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册