From nobody Fri May 3 18:00:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68649+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68649+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1607593043; cv=none; d=zohomail.com; s=zohoarc; b=Sm99YQXePT7mD2CLtpRW4UxgqIq7iFZo7ZD8b/cUlFODoU+kxEDf4Nm6PizfKgBEAsvMfOF9GsvgGTrXkC18qvY5tu1FJTHMgNcvR4iyGx7lICGqWW22/k4fWhvlelklh5nJC+gB2buVGHm72mWfAn0TSlu0s2FSyAdgAiUGuuc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607593043; h=Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=TpFgmOlC4eAojgo2CUF2xgtDNMUjXb/htbhn0PUcLNw=; b=ljOeE4LrEg5Za8yb4VbzIzwxy22l3yMAmyouqiBP5KtS6zX8US6MeKpzNV/LRDmQci8ibj7OUqkivTkH0WQWeWyMTFcpGVejl/r9w/QdhJq9DFFwEKqP4sUZYCQS7jFAE5csBq1dVUrttXAtZHYbh+SQA6bTVwgLrVmu3NnEFx8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68649+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1607593043942661.0288193043021; Thu, 10 Dec 2020 01:37:23 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 16L2YY1788612xyZwD3rjlD1; Thu, 10 Dec 2020 01:37:23 -0800 X-Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) by mx.groups.io with SMTP id smtpd.web09.9510.1607439115299152300 for ; Tue, 08 Dec 2020 06:51:55 -0800 X-IronPort-AV: E=Sophos;i="5.78,402,1599523200"; d="scan'208";a="102603935" X-Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1a-67b371d8.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 08 Dec 2020 14:51:48 +0000 X-Received: from EX13MTAUEE001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-1a-67b371d8.us-east-1.amazon.com (Postfix) with ESMTPS id 70D4DA1241 for ; Tue, 8 Dec 2020 14:51:47 +0000 (UTC) X-Received: from EX13D08UEE004.ant.amazon.com (10.43.62.182) by EX13MTAUEE001.ant.amazon.com (10.43.62.200) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Dec 2020 14:51:45 +0000 X-Received: from EX13D33EUC004.ant.amazon.com (10.43.164.63) by EX13D08UEE004.ant.amazon.com (10.43.62.182) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Dec 2020 14:51:45 +0000 X-Received: from EX13D33EUC004.ant.amazon.com ([10.43.164.63]) by EX13D33EUC004.ant.amazon.com ([10.43.164.63]) with mapi id 15.00.1497.006; Tue, 8 Dec 2020 14:51:44 +0000 From: "Borghorst, Hendrik via groups.io" To: "devel@edk2.groups.io" CC: "Woodhouse, David" Subject: [edk2-devel] [PATCH] Ovmf: Set matching PCI routing values in PIIX4 Thread-Topic: [PATCH] Ovmf: Set matching PCI routing values in PIIX4 Thread-Index: AQHWzXGlm8yHS2y0QU+AQVjrOXirBw== Date: Tue, 8 Dec 2020 14:51:44 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.164.68] MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,hborghor@amazon.com X-Gm-Message-State: bnjQxiD2b3yqLw7P9NgnOm9nx1787277AA= Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1607593043; bh=TpFgmOlC4eAojgo2CUF2xgtDNMUjXb/htbhn0PUcLNw=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=kQSe0nqsWfGvez5+4zJJLTxjem8HfpeaZcdTH8PJgcHU7aXPxKWeYVGTDCPb4ztKSiq bjjph6s5GDMpdEgxBftiO+ZcRaRHgX0LuQ599zN9E3KD+48pLCTdSai80vr2RS+xGs2Wk LpKt+CUv35uhlWWgVmymeXR9EdB9cbQII3c= X-ZohoMail-DKIM: pass (identity @groups.io) 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(-) 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 =3D 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 ()) { --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68649): https://edk2.groups.io/g/devel/message/68649 Mute This Topic: https://groups.io/mt/78850811/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-