From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web11.36022.1607957495111786691 for ; Mon, 14 Dec 2020 06:51:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G3ZD2ULU; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607957494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=30L9LzcmsHsx2nEVG5kuqksfo576Mig+xTJaW0Dxeys=; b=G3ZD2ULULCF0j+SZDkdmU9tkNRDRk3ZlVUQNqPl5WLHLc2x2dR5mrUXTh71u7Dv42NWIPV wOIveL+r/rNEJ6jziftWggRG5CLWRtrKa7JQrog8Kglpj0VUIbXAAyh80tmcUSsGPkLSsa spzy/r6m1OiXGn9b6Zrm1yfTkzOcw7E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-TqqnZZJuPCKUt02uFUpGvQ-1; Mon, 14 Dec 2020 09:51:31 -0500 X-MC-Unique: TqqnZZJuPCKUt02uFUpGvQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6CD4359; Mon, 14 Dec 2020 14:51:30 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-221.ams2.redhat.com [10.36.113.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8762660615; Mon, 14 Dec 2020 14:51:28 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] Ovmf: Set matching PCI routing values in PIIX4 To: hborghor@amazon.de, "Woodhouse, David" Cc: devel@edk2.groups.io References: <5730ec22e8ee60485046e40c131f61712ad81206.camel@amazon.com> From: "Laszlo Ersek" Message-ID: Date: Mon, 14 Dec 2020 15:51:27 +0100 MIME-Version: 1.0 In-Reply-To: <5730ec22e8ee60485046e40c131f61712ad81206.camel@amazon.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Hendrik, On 12/09/20 11:55, Borghorst, Hendrik via groups.io wrote: > From 1d887726b2ff42ed2c90fcdaa8549c3ed8be4b7d Mon Sep 17 00:00:00 2001 > From: Hendrik Borghorst > Date: Tue, 8 Dec 2020 14:36:48 +0100 > Subject: [PATCH] Ovmf: Set matching PCI routing values in PIIX4 > > The OVMF package tries to mimic the PCI initialization of SeaBIOS. > Both set the PCI_INTERRUPT_LINE register according to the same > logic with rotation based on IRQs (10, 10, 11, 11). However, while > SeaBIOS applies these IRQs to the PCI interrupt routing register (0x60) > of the PIIX4, OVMF wrongly applies (11, 11, 10, 10) which breaks legacy > INTx routing. > > Signed-off-by: Hendrik Borghorst > Reviewed-by: David Woodhouse > --- > .../PlatformBootManagerLib/BdsPlatform.c | 24 +++++++++---------- > 1 file changed, 12 insertions(+), 12 deletions(-) this patch seems malformed; I'll comment on the other posting of it instead. Meanwhile, David, can you please send your R-b to the list (under that thread)? Thanks, Laszlo > > diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > index 3c55ec9bd9..b8c3f54be6 100644 > --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > @@ -1211,24 +1211,24 @@ PciAcpiInitialization ( > // > // 00:01.0 ISA Bridge (PIIX4) LNK routing targets > // > - PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x60), 0x0b); // A > - PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x61), 0x0b); // B > - PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x62), 0x0a); // C > - PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x63), 0x0a); // D > + PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x60), PciHostIrqs[0]); // A > + PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x61), PciHostIrqs[1]); // B > + PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x62), PciHostIrqs[2]); // C > + PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x63), PciHostIrqs[3]); // D > break; > case INTEL_Q35_MCH_DEVICE_ID: > Pmba = POWER_MGMT_REGISTER_Q35 (ICH9_PMBASE); > // > // 00:1f.0 LPC Bridge (Q35) LNK routing targets > // > - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x60), 0x0a); // A > - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x61), 0x0a); // B > - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x62), 0x0b); // C > - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x63), 0x0b); // D > - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x68), 0x0a); // E > - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x69), 0x0a); // F > - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x6a), 0x0b); // G > - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x6b), 0x0b); // H > + PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x60), PciHostIrqs[0]); // A > + PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x61), PciHostIrqs[1]); // B > + PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x62), PciHostIrqs[2]); // C > + PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x63), PciHostIrqs[3]); // D > + PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x68), PciHostIrqs[0]); // E > + PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x69), PciHostIrqs[1]); // F > + PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x6a), PciHostIrqs[2]); // G > + PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x6b), PciHostIrqs[3]); // H > break; > default: > if (XenDetected ()) { >