blob: 4d7b9e103ecb06a68b0c8f8af2499347c9472fbe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
graphic: 0.958
architecture: 0.873
x86: 0.855
performance: 0.819
mistranslation: 0.808
kernel: 0.807
device: 0.779
ppc: 0.769
debug: 0.748
user-level: 0.737
network: 0.653
permissions: 0.642
semantic: 0.638
peripherals: 0.620
TCG: 0.612
PID: 0.589
files: 0.528
register: 0.506
boot: 0.490
hypervisor: 0.487
vnc: 0.434
socket: 0.412
risc-v: 0.378
virtual: 0.373
KVM: 0.371
VMM: 0.335
arm: 0.308
i386: 0.264
assembly: 0.263
infinite loop due to improper deal with "eret" on mips32
1.qemu 2.9.1 release on the official web build with tcg
2.cmd: qemu-system-mips -kernel kernelfile
3. host: ubuntu 16.04.1 with linux kernel 4.6.2 x86_64
guest: mips bigendian 32bit (tplink firmware)
detail:
static inline void exception_return(CPUMIPSState *env)
{
debug_pre_eret(env);
if (env->CP0_Status & (1 << CP0St_ERL)) {
set_pc(env, env->CP0_ErrorEPC);
env->CP0_Status &= ~(1 << CP0St_ERL);
} else {
set_pc(env, env->CP0_EPC);
env->CP0_Status &= ~(1 << CP0St_EXL);====================> ISSUE????
}
compute_hflags(env);
debug_post_eret(env);
}
void helper_eret(CPUMIPSState *env)
{
exception_return(env);
env->lladdr = 1;
}
In the Issue Line, there is no check CP0_Status whether int is disabled (should not enter int routine),
that result in the cpu can not jump out the int routine.
What model/cpu is your router?
Which MIPS guest CPU are you using? Are you sure it matches the CPU of your router?
Is your tplink firmware publicly available? (to reproduce your problem).
My guess is your router CPU doesn't match the ISA (likely your CPU has extensions to the 24Kf ISA).
[Expired for QEMU because there has been no activity for 60 days.]
This seems to affect me too; I have a loop on interrupt handler after the first interrupt called.
The version of qemu is latest 3.1 from upstream, so this is not Ubuntu issue.
However, have you done with it? Just commenting out
env->CP0_Status &= ~(1 << CP0St_EXL);
does not help.
|