qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] MIPS kernel hanging when loaded through U-Boot in qemu


From: Thomas Petazzoni
Subject: Re: [Qemu-devel] MIPS kernel hanging when loaded through U-Boot in qemu
Date: Wed, 3 Sep 2008 14:20:21 +0200

Le Wed, 3 Sep 2008 14:03:37 +0200,
Thomas Petazzoni <address@hidden> a écrit :

> > Qemu always allows to set this Cause bit, independent of the CPU
> > type. So I figure we have two bugs:
> >  - The kernel should try to clear the IV bit if it doesn't intend to
> >    use it

I tried this approach, using the following patch to the kernel, and it
now works, the kernel boots successfully !

This solves my problem of demoing U-Boot+kernel on MIPS, but it's quite
useless for others since the qemu-mips platform has been removed from
the kernel between .24 and .25. Except if the bug is present for other
platforms, in which case Qemu could probably be fixed as you suggested ?

Thanks!

Thomas

---
 arch/mips/kernel/traps.c |    3 +++
 1 file changed, 3 insertions(+)

Index: kernel.old/arch/mips/kernel/traps.c
===================================================================
--- kernel.old.orig/arch/mips/kernel/traps.c
+++ kernel.old/arch/mips/kernel/traps.c
@@ -1351,6 +1351,9 @@
                } else
                        set_c0_cause(CAUSEF_IV);
        }
+       else {
+               clear_c0_cause(CAUSEF_IV);
+       }
 
        /*
         * Before R2 both interrupt numbers were fixed to 7, so on R2 only:

-- 
Thomas Petazzoni, address@hidden, http://thomas.enix.org
Jabber, address@hidden
Toulibre, http://www.toulibre.org - APRIL, http://www.april.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E  1624 F653 CB30 98D3 F7A7

Attachment: signature.asc
Description: PGP signature


reply via email to

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