From patchwork Mon Jan 21 21:21:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 214256 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 983B72C0079 for ; Tue, 22 Jan 2013 08:21:52 +1100 (EST) Received: from localhost ([::1]:41270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxOoQ-0006Bw-No for incoming@patchwork.ozlabs.org; Mon, 21 Jan 2013 16:21:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxOoC-0005xZ-CE for qemu-devel@nongnu.org; Mon, 21 Jan 2013 16:21:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxOoB-0004Ke-Ep for qemu-devel@nongnu.org; Mon, 21 Jan 2013 16:21:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxOoB-0004KZ-7J for qemu-devel@nongnu.org; Mon, 21 Jan 2013 16:21:35 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0LLLXID024265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 21 Jan 2013 16:21:34 -0500 Received: from bling.home ([10.3.113.8]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0LLLUkG018232; Mon, 21 Jan 2013 16:21:30 -0500 To: seabios@seabios.org From: Alex Williamson Date: Mon, 21 Jan 2013 14:21:30 -0700 Message-ID: <20130121212130.29089.45874.stgit@bling.home> In-Reply-To: <20130121205015.29089.93802.stgit@bling.home> References: <20130121205015.29089.93802.stgit@bling.home> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [RFC PATCH 1/2] q35: Fix PIC-mode interrupt setup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We're initializing the ICH9 PIRQn registers with the IRQEN bit set, which actuall makes them operate in APIC mode rather than PIC mode (see 13.1.17 & 13.1.9). AFAICT, the system boots up in PIC mode and trying to make use of APIC IRQs in boot ROMs does not work. Fix this to use the ISA compatible IRQs. Signed-off-by: Alex Williamson --- src/pciinit.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pciinit.c b/src/pciinit.c index a406bbd..857e8af 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -143,11 +143,9 @@ void mch_isa_bridge_init(struct pci_device *dev, void *arg) /* activate irq remapping in LPC */ /* PIRQ[A-D] routing */ - pci_config_writeb(bdf, ICH9_LPC_PIRQA_ROUT + i, - irq | ICH9_LPC_PIRQ_ROUT_IRQEN); + pci_config_writeb(bdf, ICH9_LPC_PIRQA_ROUT + i, irq); /* PIRQ[E-H] routing */ - pci_config_writeb(bdf, ICH9_LPC_PIRQE_ROUT + i, - irq | ICH9_LPC_PIRQ_ROUT_IRQEN); + pci_config_writeb(bdf, ICH9_LPC_PIRQE_ROUT + i, irq); } outb(elcr[0], ICH9_LPC_PORT_ELCR1); outb(elcr[1], ICH9_LPC_PORT_ELCR2);