qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] MIPS CP0 not usable in kernel mode?


From: Stefan Weil
Subject: [Qemu-devel] [PATCH] MIPS CP0 not usable in kernel mode?
Date: Thu, 23 Mar 2006 20:48:25 +0100
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)

Hello,

according to MIPS32 4KE User's Manual, coprocessor CP0 is
always usable when the processor is running in kernel mode.

So in kernel mode, exception "CP0 is not usable" should
not happen.

I think the boolean expression which checks for the
exception condition has to be inverted - see my patch
for translate.c.

Kind regards,
Stefan



RCS file: /sources/qemu/qemu/target-mips/translate.c,v
retrieving revision 1.11
diff -u -r1.11 translate.c
--- target-mips/translate.c    5 Dec 2005 19:59:36 -0000    1.11
+++ target-mips/translate.c    23 Mar 2006 19:25:53 -0000
@@ -1180,7 +1180,7 @@
    const unsigned char *opn = "unk";

    if (!(ctx->CP0_Status & (1 << CP0St_CU0)) &&
-        !(ctx->hflags & MIPS_HFLAG_UM) &&
+        (ctx->hflags & MIPS_HFLAG_UM) &&
        !(ctx->hflags & MIPS_HFLAG_ERL) &&
        !(ctx->hflags & MIPS_HFLAG_EXL)) {
        if (loglevel & CPU_LOG_TB_IN_ASM) {

//




reply via email to

[Prev in Thread] Current Thread [Next in Thread]