From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9HWv-0001PJ-9x for qemu-devel@nongnu.org; Tue, 23 Jan 2007 04:01:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9HWs-0001Mo-Of for qemu-devel@nongnu.org; Tue, 23 Jan 2007 04:01:24 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9HWs-0001Lu-3P for qemu-devel@nongnu.org; Tue, 23 Jan 2007 04:01:22 -0500 Received: from [82.232.2.251] (helo=mail.aurel32.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9HWr-0002Zf-8j for qemu-devel@nongnu.org; Tue, 23 Jan 2007 04:01:21 -0500 Received: from anguille.univ-lyon1.fr ([134.214.4.207]) by mail.aurel32.net with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1H9HWx-00031r-Ju for qemu-devel@nongnu.org; Tue, 23 Jan 2007 10:01:27 +0100 Message-ID: <45B5CED0.7020807@aurel32.net> Date: Tue, 23 Jan 2007 10:01:04 +0100 From: Aurelien Jarno MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] IRQ acknowledge on MIPS References: <20070123004819.GA10927@amd64.aurel32.net> In-Reply-To: <20070123004819.GA10927@amd64.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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 Hi all, Some news on that point. After a discussion with Paul Brook, Thiemo Seufer and Ralf Baechle on IRC yesterday, we got convinced that the current IRQ handling is not correct. The hardware interrupt is currently deasserted by the CPU itself (in cpu-exec.c). It should be deasserted by the interrupt controller (the i8259a in our case), so that pending interrupts are not missed. This is wrong for MIPS, but also for x86_64 and PowerPC. ARM is correctly implemented though. Then after playing with the current code, I am sure we are missing a simple interrupt controller for the MIPS CPU. It supports 6 hardware interrupts (IP2 to IP7) and we are using two of them in the current emulation: one for the i8259a and the other for the timer. In both case the current code assert and deassert a CPU_INTERRUPT_HARD. The interrupt controller should assert and deassert the CPU_INTERRUPT_HARD upon the contents of the CP0 cause and CP0 status (ie mask) registers. Currently we are totally ignoring that interrupts can be masked and leave this task to the operating system. I will try to write the missing code this night. Bye, Aurelien -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net