From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CE2D31A1E4C for ; Thu, 8 Sep 2016 09:31:10 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 08 Sep 2016 09:30:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,301,1470726000"; d="scan'208";a="1047416126" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 08 Sep 2016 09:30:40 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 8 Sep 2016 09:30:39 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.39]) by FMSMSX114.amr.corp.intel.com ([10.18.116.8]) with mapi id 14.03.0248.002; Thu, 8 Sep 2016 09:29:35 -0700 From: "Carsey, Jaben" To: Abdul Lateef Attar , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" Thread-Topic: [edk2] [PATCH v2] ShellPkg: pci -i -_e to print next capability Thread-Index: AQHSCZrjF3c8wZlhoUOttI7/CSakjKBvySDg Date: Thu, 8 Sep 2016 16:29:35 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzQxMTFhZWUtNDY2ZS00NmRlLWI3MjQtNWQ2OTMzNDFhZjFiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjJaaHVLZk9vV3dEanpMQUhaMGdRVWdvVXE5K2FySVBieHBKeTBGSGJ5RXc9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [PATCH v2] ShellPkg: pci -i -_e to print next capability X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 16:31:10 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Commited. > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Abdul Lateef Attar > Sent: Friday, September 09, 2016 11:32 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [PATCH v2] ShellPkg: pci -i -_e to print next capability > Importance: High >=20 > According to PCI spec the next AER capability is relative to > the beginning of PCI configuration space. Hence substract the > base offset to get the next capability. >=20 > "-_e" option is changed from TypeFlag to TypeValue, so that > user can specify individual AER capability to print. > e.g. pci 00 00 01 -i -_e >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Abdul Lateef Attar > Reviewed-by: Jaben Carsey > --- > ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > index 337495e..664c22b 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > @@ -2370,7 +2370,7 @@ PCI_CONFIG_SPACE *mConfigSpace =3D NULL; > STATIC CONST SHELL_PARAM_ITEM ParamList[] =3D { > {L"-s", TypeValue}, > {L"-i", TypeFlag}, > - {L"-_e", TypeFlag}, > + {L"-_e", TypeValue}, > {NULL, TypeMax} > }; >=20 > @@ -5914,7 +5914,7 @@ PciExplainPciExpress ( > // Advance to the next item if it exists > // > if (ExtHdr->NextCapabilityOffset !=3D 0) { > - ExtHdr =3D (PCI_EXP_EXT_HDR*)((UINT8*)ExRegBuffer + ExtHdr- > >NextCapabilityOffset); > + ExtHdr =3D (PCI_EXP_EXT_HDR*)((UINT8*)ExRegBuffer + ExtHdr- > >NextCapabilityOffset - EFI_PCIE_CAPABILITY_BASE_OFFSET); > } else { > break; > } > -- > 2.7.4 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel