aboutsummaryrefslogtreecommitdiff
path: root/target-lm32
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2013-02-26 19:51:52 +0100
committerMichael Walle <michael@walle.cc>2013-03-18 19:40:34 +0100
commita5b0f6d5c0f6678c078354c432a1f0943374f087 (patch)
treeab6e51389f009f3857355229be7993e88698a30a /target-lm32
parentde55c4bd8bd163ec6c10edc085193bbcf8f9e15e (diff)
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: Michael Walle <michael@walle.cc>
Diffstat (limited to 'target-lm32')
-rw-r--r--target-lm32/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c
index bbb7fbf768..23c05ddbed 100644
--- a/target-lm32/cpu.c
+++ b/target-lm32/cpu.c
@@ -36,10 +36,10 @@ static void lm32_cpu_reset(CPUState *s)
lcc->parent_reset(s);
- tlb_flush(env, 1);
-
/* reset cpu state */
memset(env, 0, offsetof(CPULM32State, breakpoints));
+
+ tlb_flush(env, 1);
}
static void lm32_cpu_realizefn(DeviceState *dev, Error **errp)