Skip to content

Commit

Permalink
target/loongarch: Clean up tlb when cpu reset
Browse files Browse the repository at this point in the history
We should make sure that tlb is clean when cpu reset.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20220705070950.2364243-1-gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
gaosong-loongson authored and rth7680 committed Jul 5, 2022
1 parent c1ca312 commit 3517fb7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions target/loongarch/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ static void loongarch_cpu_reset(DeviceState *dev)

#ifndef CONFIG_USER_ONLY
env->pc = 0x1c000000;
memset(env->tlb, 0, sizeof(env->tlb));
#endif

restore_fp_status(env);
Expand Down

0 comments on commit 3517fb7

Please sign in to comment.