Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KI2wg-0005PM-5x for qemu-devel@nongnu.org; Sun, 13 Jul 2008 10:53:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KI2we-0005P6-Nn for qemu-devel@nongnu.org; Sun, 13 Jul 2008 10:53:01 -0400 Received: from [199.232.76.173] (port=39712 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KI2we-0005P3-Kl for qemu-devel@nongnu.org; Sun, 13 Jul 2008 10:53:00 -0400 Received: from smtp.stud.uni-karlsruhe.de ([129.13.62.3]:49576) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KI2we-0006dg-AP for qemu-devel@nongnu.org; Sun, 13 Jul 2008 10:53:00 -0400 Received: from sebastian by localhost with local (Exim 4.69) (envelope-from ) id 1KI2wY-0004bq-A1 for qemu-devel@nongnu.org; Sun, 13 Jul 2008 16:52:54 +0200 Date: Sun, 13 Jul 2008 16:52:54 +0200 From: Sebastian Reichelt Message-Id: <20080713165254.370a7a71.SebastianR@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Sun__13_Jul_2008_16_52_54_+0200_Vb//YhY1Pg8DJt.e" Subject: [Qemu-devel] [PATCH] Special Mask Mode for i8259 PIC 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 This is a multi-part message in MIME format. --Multipart=_Sun__13_Jul_2008_16_52_54_+0200_Vb//YhY1Pg8DJt.e Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello! The i8259 PIC implementation in QEMU (at least up to v0.9.1) contains a special_mask flag, but never uses it. Here is a tiny patch that should match the correct behavior according to the 8259A spec I have. It is also consistent with my own hardware in the cases I have tested. -- Sebastian Reichelt --Multipart=_Sun__13_Jul_2008_16_52_54_+0200_Vb//YhY1Pg8DJt.e Content-Type: text/x-diff; name="i8259.diff" Content-Disposition: attachment; filename="i8259.diff" Content-Transfer-Encoding: 7bit --- hw/i8259.c.old 2008-07-13 03:52:48.000000000 +0200 +++ hw/i8259.c 2008-07-13 03:52:37.000000000 +0200 @@ -123,6 +123,8 @@ master, the IRQ coming from the slave is not taken into account for the priority computation. */ mask = s->isr; + if (s->special_mask) + mask &= ~s->imr; if (s->special_fully_nested_mode && s == &s->pics_state->pics[0]) mask &= ~(1 << 2); cur_priority = get_priority(s, mask); --Multipart=_Sun__13_Jul_2008_16_52_54_+0200_Vb//YhY1Pg8DJt.e--