aboutsummaryrefslogtreecommitdiff
path: root/target/mips/tcg/sysemu/tlb_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-05-02 00:11:25 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-06-28 10:13:42 +0530
commit8ec7e3c53d48c61e31dd251b84a2b8190a14542d (patch)
treeec68ebf0e3cc334babb1d5c6b3d23efdf520108e /target/mips/tcg/sysemu/tlb_helper.c
parenta638af09b6c6b1259803a377a53ef242c5af6af5 (diff)
target/mips: Use an exception for semihosting
Within do_interrupt, we hold the iothread lock, which is required for Chardev access for the console, and for the round trip for use_gdb_syscalls(). Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/mips/tcg/sysemu/tlb_helper.c')
-rw-r--r--target/mips/tcg/sysemu/tlb_helper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/mips/tcg/sysemu/tlb_helper.c b/target/mips/tcg/sysemu/tlb_helper.c
index 73254d1929..57ffad2902 100644
--- a/target/mips/tcg/sysemu/tlb_helper.c
+++ b/target/mips/tcg/sysemu/tlb_helper.c
@@ -1053,6 +1053,10 @@ void mips_cpu_do_interrupt(CPUState *cs)
}
offset = 0x180;
switch (cs->exception_index) {
+ case EXCP_SEMIHOST:
+ cs->exception_index = EXCP_NONE;
+ mips_semihosting(env);
+ return;
case EXCP_DSS:
env->CP0_Debug |= 1 << CP0DB_DSS;
/*