summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorGuan Xuetao2012-08-10 08:42:23 +0200
committerBlue Swirl2012-08-11 11:36:56 +0200
commitd48813dd7639885339e5e7a8cdf2d0e3ca714e1f (patch)
treee5e3f37d5d141c0e5dc1ca29a4adb79cc7098836 /linux-user
parentunicore32-softmmu: Add coprocessor 0(sysctrl) and 1(ocd) instruction support (diff)
downloadqemu-d48813dd7639885339e5e7a8cdf2d0e3ca714e1f.tar.gz
qemu-d48813dd7639885339e5e7a8cdf2d0e3ca714e1f.tar.xz
qemu-d48813dd7639885339e5e7a8cdf2d0e3ca714e1f.zip
unicore32-softmmu: Make UniCore32 cpuid & exceptions correct and runable
This patch initializes the cpuid to exactly correct value because linux kernel will check it. In addition, the exception types are specified in proper situations. Then it could make exceptions generated correctly and timely. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 53714de0d4..9d921aa4f0 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -958,7 +958,8 @@ void cpu_loop(CPUUniCore32State *env)
}
}
break;
- case UC32_EXCP_TRAP:
+ case UC32_EXCP_DTRAP:
+ case UC32_EXCP_ITRAP:
info.si_signo = SIGSEGV;
info.si_errno = 0;
/* XXX: check env->error_code */