From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
by mx.groups.io with SMTP id smtpd.web12.6423.1631706817054308476
for ;
Wed, 15 Sep 2021 04:53:38 -0700
Authentication-Results: mx.groups.io;
dkim=fail reason="body hash did not verify" header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=kz3A74K3;
spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: damian.bassa@intel.com)
X-IronPort-AV: E=McAfee;i="6200,9189,10107"; a="285986023"
X-IronPort-AV: E=Sophos;i="5.85,295,1624345200";
d="scan'208,217";a="285986023"
Received: from fmsmga005.fm.intel.com ([10.253.24.32])
by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2021 04:53:35 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.85,295,1624345200";
d="scan'208,217";a="700168138"
Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19])
by fmsmga005.fm.intel.com with ESMTP; 15 Sep 2021 04:53:35 -0700
Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by
ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.1.2242.12; Wed, 15 Sep 2021 04:53:34 -0700
Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by
orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.1.2242.12 via Frontend Transport; Wed, 15 Sep 2021 04:53:34 -0700
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172)
by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.1.2242.12; Wed, 15 Sep 2021 04:53:34 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=RMn3ilSW/zLala4+clUtjNRouP9oZkabcI1qT3uiaz7zR0mygGiQauVnt99bhW2iY/h3i2/R281y2K1Bs2n/wJCTJQa+9v9Y8HOCzpd4mZR6dRZJ17qDP8/2u4/kO4V24mdRVNuUDmYGI8GH/gdMFOcCqcpK93n8mgYTTQU2j+dWfkpXO43TCWT1X5+BoGUHEhq5qnGN4UwQZc9X6BjsRTC2IaeFVe2MfFMWJm7PXLkgF4FZnyEsLfGrVYvtsQx7nifgio4L55KHJVnSGCBfoYex/jvjMq3RXWDY834ezhatzsN94bYcMxDNh1a+YGoXjfaE2uKmy0f7WwB0u5AzNw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
bh=HOylcD1TwnhHqCqLWaDYtVe+ncrcFzrYdrDa4kmfI3g=;
b=lz9KVL0jfUtF4ETXcrYFDAoW4eA7HNEFeIctn84GcCN57IsX2YOLnscFhN48mcgzYAaQPAtzO9cETtnoOXjWESoELbbItRDz2ujiHL+IlPlGf51xCRIC0zzZ+kyY7QPKbSgZtXciIgxS1b3H/744ZW4w1VUiJYUMM0BZhwntJsNDflE29ZvfvZlwZpSLh2Wxltet6QvKBtDOjI/HwPOF6VuylKlHdHheqyqUhfJzewFWjHCR5LL6s3AT8the0fflCQs3fXYwzXEhw5fuRW0aMj+hQdh9RZ+tJC+oZBXRcGkgt375SqvALpn8NnBIdBTFl+Ia5cyomXYOvDpbsBTxlQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;
s=selector2-intel-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=HOylcD1TwnhHqCqLWaDYtVe+ncrcFzrYdrDa4kmfI3g=;
b=kz3A74K3N4q5GkJQW1Lvq73G/wDXSbs4+oIXiV2GjmANHJ+6bcGWbLcyogImktcoIS0WtiryQ8vd2ddFDJaeFg7ch8jeSYhQtvC4O2kO0fXBqtmQKQ3c9jaPZGDj3KaVZ29qm3GOsCJvaPqt+PJheZ5sv9rZLLlFBr3RoIksS10=
Received: from CO1PR11MB5187.namprd11.prod.outlook.com (2603:10b6:303:95::15)
by MWHPR11MB1710.namprd11.prod.outlook.com (2603:10b6:300:26::23) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.17; Wed, 15 Sep
2021 11:53:33 +0000
Received: from CO1PR11MB5187.namprd11.prod.outlook.com
([fe80::60d4:c5c8:b43c:f940]) by CO1PR11MB5187.namprd11.prod.outlook.com
([fe80::60d4:c5c8:b43c:f940%6]) with mapi id 15.20.4523.014; Wed, 15 Sep 2021
11:53:33 +0000
From: "Bassa, Damian"
To: "Wu, Hao A" , "devel@edk2.groups.io"
, "Ni, Ray"
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Enumerator to check for RCiEP before looking for RP
Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Enumerator to check
for RCiEP before looking for RP
Thread-Index: AdeY+paMpehWSOTWSAKEuG98y9jpqAFJPSagAABB0NAAEpzXsAGFIWvAAWn5jXA=
Date: Wed, 15 Sep 2021 11:53:33 +0000
Message-ID:
References:
In-Reply-To:
Accept-Language: pl-PL, en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
dlp-product: dlpe-windows
dlp-reaction: no-action
dlp-version: 11.6.200.16
authentication-results: intel.com; dkim=none (message not signed)
header.d=none;intel.com; dmarc=none action=none header.from=intel.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 520fb552-2734-48c3-4e6e-08d9783f71ce
x-ms-traffictypediagnostic: MWHPR11MB1710:
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs:
x-ms-oob-tlc-oobclassifiers: OLM:6790;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Q6GNt8VJg+QOzxeTW2zLWz/rZv/XWAh6ig4bASm9TXO4IR130f7Obtess33Fx8+RjKo5XhREL72H+iVweF62lnrgqXCTZDjbcfpuLrHVVzOyWdr35sRC6x4nj5M15+ePgEbPbTG8ONshN43uFVfK4ReRwY66nsTzBTeyhEA2GqdJp3RtMmVXvi++m2JZmyVOdjvj9+ZEwevVRJv9hEavNalj+djir6HjhRZqW7PxQI5WlxYMBGHKifmMrL4KEHHNjZPK72D20S93vFYDqcoF787ld0wnxUofgzfmD99C5wby01EEuZljqLQrbGfigwkseavWB/tMElDVdl/Z3+s5SLd4NpXi+jRg2L/Vls8DWWKYDo7T+QtjZWBnn5hId/VJI9E50iK/twXmmcrp2pCt8aNQdUmQnzbEZytCfs6CuNPvh6PTVcrM7Vt1BltVLvFHIJSEuhM4eKc51DRyM/OZarmcHvUgnmmo/rn63V1dGgZdOOp+dq495iKix8IVr7OBzv3kThMjSSgH4nXABQT79G7mIGkW4bZ1ApQVcx21HEuA4uIG1jP1OMxKj2PWwdbTBTOPCrvk+1OLYLS5KD0kTfnr55AMFzCKbtlT+xpqKATOvera5Rk2VQ2OlIDh7WaTt8u04o7fXxrJ5i5wgFGJGeICxoWGhTrFb+bjaglkl14CUqlm7KlJGILvN8I557Nd47kkqr+HL/RWwO2brYNXElyOja2pCtG1U6KOoODrBfgN6q02ut2LTnSvvhY2GYyjDzlq8k6LMyCm8NciP5ASTMhSWjWTR2eNLTVqmE87xEhw/kPXcHIfAXN3Yle9Ad4FYhE5x40V25Twj33YiTVfxw==
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB5187.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(396003)(346002)(39860400002)(136003)(366004)(5660300002)(122000001)(478600001)(66476007)(66556008)(52536014)(71200400001)(166002)(2906002)(33656002)(55016002)(76236003)(83380400001)(186003)(38070700005)(86362001)(66446008)(8676002)(38100700002)(53546011)(76116006)(110136005)(7696005)(64756008)(6636002)(6506007)(26005)(316002)(9686003)(66574015)(8936002)(66946007);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?iso-8859-2?Q?vcsuuVa0EaBhm/Y8AGhHT+dbCFj51+87o7ChqGaGeDlGgRJOupUGzOYxLp?=
=?iso-8859-2?Q?/C/6TSmphk50gi5wbrSdonevZzXCqDSvWw8oZBi1F88yWgywY4R2pcGQDF?=
=?iso-8859-2?Q?CTCyfyWb0j4E33sSYAheidg2wt4fhiU6Ufh4gobFhO/xGT956zyQRQ0ZS6?=
=?iso-8859-2?Q?yr0QtWDhpp3dvW/Olwhx8MnNUK1kivM2pSuMfT1BtGZxFFtxyc3Gd7ms6y?=
=?iso-8859-2?Q?X9pIUmgvqRzlCjc0nyugMd1brd8eoq0/96ic8OmvgqW0AMdUABKZ8ZFMGB?=
=?iso-8859-2?Q?+WEx1GmFj0SZt3qBVz+02BocyLniRVAIJDomFw/eblQ6KtdvT2Ia/lRR13?=
=?iso-8859-2?Q?P8VbIF2IrvXiptXg1XuNFwAbcON4qjB2az1wkzPvPnQYkdoGQTjKL/uQ1C?=
=?iso-8859-2?Q?dBRm74jKo+sKFvMwaEZ2ARHzhPFj1qPjUDrKHrRsYAZ+iNZsKzhw4DApyX?=
=?iso-8859-2?Q?S/kbYFnPyjappdvZETjBCH8H8xJFfoahHecJMn/6cF7vl8medwYqbqvQHH?=
=?iso-8859-2?Q?/vInzD1DtgFYnfbwoxsiGcII8C+g6PSsvBNJMKuI0Zz9FWCa5ahb6vFoBA?=
=?iso-8859-2?Q?3pfUS60we0K+ssoLZSD91YjeXer5xhLQrGZB9r5LcysbbMCF4alnoWRxE1?=
=?iso-8859-2?Q?Yl49FAFRW1AwdlZNH7mg7pnHEd3QDToS9dakXiSqmsIvX9XXJuNfL9vNOF?=
=?iso-8859-2?Q?mG7LmWzplLT3IlwsKLYo13WfR+d6sOt0KW1YEWorv9M/W802BNCurSmmHS?=
=?iso-8859-2?Q?SfbptXnpzO8XJagE185bUQf9QR+eqINb470q1rZK2Ikl48774kyap/daTE?=
=?iso-8859-2?Q?asChM2p307jXMLbcwzbaxrkg7AUNb5hSx7KyQIPiWTzhDeCHccQIg0W89d?=
=?iso-8859-2?Q?aT4AnCC4L0z+sAdcsQ/AkkPIjp5VTdy/gcjB8fTVD8ZHjWnLFve96/egB9?=
=?iso-8859-2?Q?dan6aqQbvZRjbPEekaXZpRcy6w5ZAtIsFSKGGvFSwTQPTqurmDcAW81+wM?=
=?iso-8859-2?Q?4Lk2laFEFOyVUKa+jp7SRg8e027UG8xn9RxzXSwxvjn9qL4qrsB1JbxpJp?=
=?iso-8859-2?Q?lFUhN7GibgA945WzGanuBrsuqnaPF3OQtJwRnTTmWLnYaXhRiPfbs+k+iV?=
=?iso-8859-2?Q?CoH9aFZVKDdSwIPlYFM7L/8vJ5X0rvdKbBShxuIBq8Ijo1+MveUEGGVzKq?=
=?iso-8859-2?Q?qOAsblxGs32nOHa7qnE5VcaLXWC6iqUN3R1gWO+OwnEuC0zOBBmNUB+mDr?=
=?iso-8859-2?Q?iNc9vlP/IF1TUrW6zjaLeYrXTy6cRiqsrJ6ykRf/oygyviKkxqJ7ccE72m?=
=?iso-8859-2?Q?pHZRq6W5+xrzvc0IH1JvWGsLOFlar3QXeiyqIOfwpj+9YeOo15dQVuDptG?=
=?iso-8859-2?Q?NNewx9nYoD?=
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5187.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 520fb552-2734-48c3-4e6e-08d9783f71ce
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2021 11:53:33.5382
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: djSUWK1P7aO6BCqqZJdNlc8ogwMt59ZJ1mNjtEot578T58lDWu3Mtsy3RL8ud4MCumf3eFAQCbLQUJZHDShHyA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1710
Return-Path: damian.bassa@intel.com
X-OriginatorOrg: intel.com
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_CO1PR11MB5187FAF4715A61257F801D5A8DDB9CO1PR11MB5187namp_"
--_000_CO1PR11MB5187FAF4715A61257F801D5A8DDB9CO1PR11MB5187namp_
Content-Type: text/plain; charset="iso-8859-2"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Should we consider this workaround? I'm having issues interpreting this par=
t of PCIe spec.
My understanding of this quote is that this capability can exist in but it =
shouldn't be considered.
I would assume it's possible option that it needs to be considered? Is that=
wrong?
Damian
From: Wu, Hao A
Sent: Wednesday, September 8, 2021 9:17 AM
To: Bassa, Damian ; devel@edk2.groups.io; Ni, Ray <=
ray.ni@intel.com>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Enumerator to che=
ck for RCiEP before looking for RP
Really sorry for the late response.
So this is a workaround for RCiEP device that is not compliant to the PCIe =
spec:
|> ARI is an optional capability. This capability must be implemented by e=
ach
|> Function in an ARI Device. It is not applicable to a Root Port, a Switc=
h
|> Downstream Port, an RCiEP, or a Root Complex Event Collector.
If this the case, could you help to:
* Add a comment that briefly describe this workaround before the newly adde=
d code
* Also mention this workaround information in the commit log message.
* Send out a V2 version of the patch?
Thanks in advance.
Hello Ray, please help to raise if you have concern on this.
Best Regards,
Hao Wu
From: Bassa, Damian >
Sent: Wednesday, September 1, 2021 1:45 AM
To: Wu, Hao A >; devel@edk2.g=
roups.io; Ni, Ray >
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Enumerator to che=
ck for RCiEP before looking for RP
It refers to access to the root port device that doesn't exist in case we a=
re dealing with RCiEP device.
There can be specific case where RCiEP device has ARI extended capability I=
D (even though it's unsupported in this case).
In such a case PciSearchDevice goes to CreatePciIoDevice through GatherDevi=
ceInfo. And in this case parent is PCI_IO_DEVICE instance created from Crea=
teRootBridge function, which isn't valid PCIe device and doesn't have speci=
fic bus, only a range of buses. In that case enumerator tries to use this i=
nstance to read operation using default 0 bus number, which isn't correct.
Damian
From: Wu, Hao A >
Sent: Tuesday, August 31, 2021 6:28 AM
To: devel@edk2.groups.io; Wu, Hao A >; Bassa, Damian >; Ni, Ray >
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Enumerator to che=
ck for RCiEP before looking for RP
From: devel@edk2.groups.io > On Behalf Of Wu, Hao A
Sent: Tuesday, August 31, 2021 12:25 PM
To: devel@edk2.groups.io; Bassa, Damian >
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Enumerator to che=
ck for RCiEP before looking for RP
Really sorry,
Could you help to provide more information on the below statement?
"undefined parent register accesses"
Thanks in advance.
Best Regards,
Hao Wu
From: devel@edk2.groups.io > On Behalf Of Bassa, Damian
Sent: Tuesday, August 24, 2021 11:15 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Enumerator to check f=
or RCiEP before looking for RP
Before trying to access parent root port to check ARI capabilities,
enumerator should see if Endpoint device is not Root Complex integrated
to avoid undefined parent register accesses in these cases.
Signed-off-by: Damian Bassa damian.bassa@intel.com
---
.../Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeMod=
ulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
index db1b35f8ef..6451fb8af9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
@@ -2153,6 +2153,7 @@ CreatePciIoDevice (
PCI_IO_DEVICE *PciIoDevice;
EFI_PCI_IO_PROTOCOL *PciIo;
EFI_STATUS Status;
+ PCI_REG_PCIE_CAPABILITY Capability;
PciIoDevice =3D AllocateZeroPool (sizeof (PCI_IO_DEVICE));
if (PciIoDevice =3D=3D NULL) {
@@ -2229,7 +2230,16 @@ CreatePciIoDevice (
return NULL;
}
- if (PcdGetBool (PcdAriSupport)) {
+ PciIo->Pci.Read (
+ PciIo,
+ EfiPciIoWidthUint16,
+ PciIoDevice->PciExpressCapabilityOffset + OFFSET_OF (PCI_C=
APABILITY_PCIEXP, Capability),
+ 1,
+ &Capability.Uint16
+ );
+
+ if (PcdGetBool (PcdAriSupport) &&
+ Capability.Bits.DevicePortType !=3D PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX=
_INTEGRATED_ENDPOINT) {
//
// Check if the device is an ARI device.
//
--
2.27.0.windows.1
________________________________
Intel Technology Poland sp. z o.o.
ul. S=B3owackiego 173 | 80-298 Gda=F1sk | S=B1d Rejonowy Gda=F1sk P=F3=B3no=
c | VII Wydzia=B3 Gospodarczy Krajowego Rejestru S=B1dowego - KRS 101882 | =
NIP 957-07-52-316 | Kapita=B3 zak=B3adowy 200.000 PLN.
Ta wiadomo=B6=E6 wraz z za=B3=B1cznikami jest przeznaczona dla okre=B6loneg=
o adresata i mo=BFe zawiera=E6 informacje poufne. W razie przypadkowego otr=
zymania tej wiadomo=B6ci, prosimy o powiadomienie nadawcy oraz trwa=B3e jej=
usuni=EAcie; jakiekolwiek przegl=B1danie lub rozpowszechnianie jest zabron=
ione.
This e-mail and any attachments may contain confidential material for the s=
ole use of the intended recipient(s). If you are not the intended recipient=
, please contact the sender and delete all copies; any review or distributi=
on by others is strictly prohibited.
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydz=
ial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-31=
6 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata=
i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wi=
adomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiek=
olwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the s=
ole use of the intended recipient(s). If you are not the intended recipient=
, please contact the sender and delete all copies; any review or distributi=
on by others is strictly prohibited.
--_000_CO1PR11MB5187FAF4715A61257F801D5A8DDB9CO1PR11MB5187namp_
Content-Type: text/html; charset="iso-8859-2"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Should we consider this workaround? I’m having=
issues interpreting this part of PCIe spec.
My understanding of this quote is that this capabili=
ty can exist in but it shouldn’t be considered.
I would assume it’s possible option that it ne=
eds to be considered? Is that wrong?
Damian
From: Wu, Hao A <hao.a.wu@intel.com>
Sent: Wednesday, September 8, 2021 9:17 AM
To: Bassa, Damian <damian.bassa@intel.com>; devel@edk2.groups.=
io; Ni, Ray <ray.ni@intel.com>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Enumerator=
to check for RCiEP before looking for RP
Really sorry for the late response.
So this is a workaround for RCiEP device that is not=
compliant to the PCIe spec:
|> ARI is an optional capability. This capa=
bility must be implemented by each
|> Function in an ARI Device. It is not app=
licable to a Root Port, a Switch
|> Downstream Port, an RCiEP, or a Root Com=
plex Event Collector.
If this the case, could you help to:
* Add a comment that briefly describe this workaroun=
d before the newly added code
* Also mention this workaround information in the co=
mmit log message.
* Send out a V2 version of the patch?
Thanks in advance.
Hello Ray, please help to raise if you have concern =
on this.
It refers to access to the root port device that doe=
sn’t exist in case we are dealing with RCiEP device.
There can be specific case where RCiEP device has AR=
I extended capability ID (even though it’s unsupported in this case).
In such a case PciSearchDevice goes to CreatePciIoDe=
vice through GatherDeviceInfo. And in this case parent is PCI_IO_DEVICE ins=
tance created from CreateRootBridge function, which isn’t valid PCIe =
device and doesn’t have specific bus, only
a range of buses. In that case enumerator tries to use this instance to re=
ad operation using default 0 bus number, which isn’t correct.
Damian
Really sorry,
Could you help to provide more information on the be=
low statement?
“undefined parent register accesses”
Thanks in advance.
Before trying to access parent root port to check AR=
I capabilities,
enumerator should see if Endpoint device is not Root=
Complex integrated
to avoid undefined parent register accesses in these=
cases.
Signed-off-by: Damian Bassa
damian.bassa@intel.com
---
.../Bus/Pci/PciBusDxe/PciEnumeratorSupport.c &n=
bsp; | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)=
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnume=
ratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c=
index db1b35f8ef..6451fb8af9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSu=
pport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSu=
pport.c
@@ -2153,6 +2153,7 @@ CreatePciIoDevice (=
PCI_IO_DEVICE &n=
bsp; *PciIoDevice;
EFI_PCI_IO_PROTOCOL *PciIo;<=
/o:p>
EFI_STATUS &nbs=
p; Status;
+ PCI_REG_PCIE_CAPABILITY Capability;
PciIoDevice =3D AllocateZeroPool (=
sizeof (PCI_IO_DEVICE));
if (PciIoDevice =3D=3D NULL) {
@@ -2229,7 +2230,16 @@ CreatePciIoDevice (
return NULL;
}
- if (PcdGetBool (PcdAriSupport)) {=
+ PciIo->Pci.Read (
+ &nb=
sp; PciIo,
+ &nb=
sp; EfiPciIoWidthUint16,
+ &nb=
sp; PciIoDevice->PciExpressCapabilit=
yOffset + OFFSET_OF (PCI_CAPABILITY_PCIEXP, Capability),
+ &nb=
sp; 1,
+ &nb=
sp; &Capability.Uint16=
p>
+ &nb=
sp; );
+
+ if (PcdGetBool (PcdAriSupport) &&
+ Capability.Bits.DevicePortType !=
=3D PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_INTEGRATED_ENDPOINT) {
//
// Check if the device is a=
n ARI device.
//
--
2.27.0.windows.1
Intel Technol=
ogy Poland sp. z o.o.
ul. S=B3owackiego 173 | 80-298 Gd=
a=F1sk | S=B1d Rejonowy Gda=F1sk P=F3=B3noc | VII Wydzia=B3 Gospodarczy Kra=
jowego Rejestru S=B1dowego - KRS 101882 | NIP 957-07-52-316 |
Kapita=B3 zak=B3adowy 200.000 PLN.
Ta wiadomo=B6=
=E6 wraz z za=B3=B1cznikami jest przeznaczona dla okre=B6lonego adresata i =
mo=BFe zawiera=E6 informacje poufne. W razie przypadkowego otrzymania
tej wiadomo=B6ci, prosimy o powiadomienie nadawcy oraz trwa=B3e jej usuni=
=EAcie; jakiekolwiek przegl=B1danie lub rozpowszechnianie jest zabronione.<=
br>
This e-mail and any at=
tachments may contain confidential material for the sole use of the intende=
d recipient(s). If you are not the intended
recipient, please contact the sender and delete all copies; any review or =
distribution by others is strictly prohibited.
Intel =
Technology Poland sp. z o.o.
ul. Słowackiego 173 | 80-298 Gdańsk | Sąd Rejonowy G=
dańsk Północ | VII Wydział Gospodarczy Krajowego Rejest=
ru Sądowego - KRS 101882 | NIP 957-07-52-316 | Kapitał zakła=
dowy 200.000 PLN.
Ta wiadomość wraz z załącznikami jest przeznacz=
ona dla określonego adresata i może zawierać informacje pouf=
ne. W razie przypadkowego otrzymania tej wiadomości, prosimy o powiado=
mienie nadawcy oraz trwałe jej usunięcie; jakiekolwiek przegl=
1;danie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material f=
or the sole use of the intended recipient(s). If you are not the intended r=
ecipient, please contact the sender and delete all copies; any review or di=
stribution by others is strictly prohibited.
--_000_CO1PR11MB5187FAF4715A61257F801D5A8DDB9CO1PR11MB5187namp_--