From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8T3d-0000LT-6m for qemu-devel@nongnu.org; Mon, 03 Sep 2012 05:35:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8T3X-0002eS-A5 for qemu-devel@nongnu.org; Mon, 03 Sep 2012 05:35:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8T3X-0002eJ-28 for qemu-devel@nongnu.org; Mon, 03 Sep 2012 05:34:55 -0400 Message-ID: <504479B9.4010801@redhat.com> Date: Mon, 03 Sep 2012 11:34:49 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1346640974-30974-1-git-send-email-mmogilvi_qemu@miniinfo.net> <1346640974-30974-6-git-send-email-mmogilvi_qemu@miniinfo.net> <50446F9A.4070809@web.de> In-Reply-To: <50446F9A.4070809@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Richard Henderson , Matthew Ogilvie , qemu-devel@nongnu.org Il 03/09/2012 10:51, Jan Kiszka ha scritto: > The only thing that worries me is that we just consider the PC so far > while the i8259 is also used on different architectures (PPC, MIPS, Alpha?). Why is this a problem? All of them use IRQ2 for a cascade, and initialize icw3 to 0x4/0x2 (I checked OpenBIOS, rth's palcode for Alpha, and Linux). BTW, from the palcode it looks like Alpha wants LTIM=1, so it would be nice to implement that one as well: /* ??? MILO initializes the PIC as edge triggered; I do not know how SRM initializes them. However, Linux seems to expect that these are level triggered. That may be a kernel bug, but level triggers are more reliable anyway so lets go with that. */ /* Initialize level triggers. The CY82C693UB that's on real alpha hardware doesn't have this; this is a PIIX extension. However, QEMU doesn't implement regular level triggers. */ outb(0xff, PORT_PIC2_ELCR); outb(0xff, PORT_PIC1_ELCR); Paolo