From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KarLV-0002t2-6s for qemu-devel@nongnu.org; Wed, 03 Sep 2008 08:20:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KarLT-0002sK-AY for qemu-devel@nongnu.org; Wed, 03 Sep 2008 08:20:24 -0400 Received: from [199.232.76.173] (port=44333 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KarLS-0002sB-UJ for qemu-devel@nongnu.org; Wed, 03 Sep 2008 08:20:23 -0400 Received: from the-doors.enix.org ([193.19.211.1]:36706) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KarLT-0002GE-1F for qemu-devel@nongnu.org; Wed, 03 Sep 2008 08:20:23 -0400 Date: Wed, 3 Sep 2008 14:20:21 +0200 From: Thomas Petazzoni Subject: Re: [Qemu-devel] MIPS kernel hanging when loaded through U-Boot in qemu Message-ID: <20080903142021.4f7f8431@surf> In-Reply-To: <20080903140337.78afd030@surf> References: <20080828110042.1d27e8bb@surf> <20080903092511.4918f2d6@surf> <20080903105447.GA17474@networkno.de> <20080903140337.78afd030@surf> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/mFru0lxd_diD2fvwmMKB9Ci"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Sig_/mFru0lxd_diD2fvwmMKB9Ci Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le Wed, 3 Sep 2008 14:03:37 +0200, Thomas Petazzoni a =C3=A9crit : > > 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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); + } =20 /* * Before R2 both interrupt numbers were fixed to 7, so on R2 only: --=20 Thomas Petazzoni, thomas.petazzoni@enix.org, http://thomas.enix.org Jabber, thomas.petazzoni@jabber.dk Toulibre, http://www.toulibre.org - APRIL, http://www.april.org Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E 1624 F653 CB30 98D3 F7A7 --Sig_/mFru0lxd_diD2fvwmMKB9Ci Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIvoEF9lPLMJjT96cRAkJEAJ4tnDf2FrCNFeIkhG+g3y+HSSmUbQCfQK3n f0/YcmlH3NrG7qXoanAcMzo= =6oA5 -----END PGP SIGNATURE----- --Sig_/mFru0lxd_diD2fvwmMKB9Ci--