From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.6082.1581929115456960575 for ; Mon, 17 Feb 2020 00:45:15 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 00:45:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,451,1574150400"; d="scan'208";a="407706651" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 17 Feb 2020 00:45:14 -0800 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 00:45:14 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 17 Feb 2020 16:45:11 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Mon, 17 Feb 2020 16:45:11 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "gaurav.jain@nxp.com" , "Gao, Liming" CC: "Wang, Jian J" , "Wu, Hao A" , "Ni, Ray" , Pankaj Bansal Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT PCIIO Protocol Test. Thread-Topic: [edk2-devel] [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT PCIIO Protocol Test. Thread-Index: AQHV10XR5XjIzUYbAkmv942vGaqAFKgfFgBggAAYJHA= Date: Mon, 17 Feb 2020 08:45:11 +0000 Message-ID: <29132e3964bf4675a31517d230687c22@intel.com> References: <20200130133804.32261-1-gaurav.jain@nxp.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Gaurav: Does this patch catch to edk2 stable tag 202002?=20 Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Gaurav Ja= in > Sent: Monday, February 17, 2020 3:18 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A = ; Ni, Ray ; Pankaj Bansal > > Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in= SCT PCIIO Protocol Test. >=20 > Gentle Reminder!! > Please review.. >=20 > > -----Original Message----- > > From: Gaurav Jain > > Sent: Thursday, January 30, 2020 1:48 PM > > To: devel@edk2.groups.io > > Cc: Jian J Wang ; Hao A Wu = ; > > Ray Ni ; Pankaj Bansal ; Gaur= av > > Jain > > Subject: [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT PCIIO Prot= ocol > > Test. > > > > ASSERT in CopyMem_Conf, PollMem_Conf, SetBarAttributes_Conf > > Conformance Test. > > SCT Test expect return as Invalid Parameter. > > So removed ASSERT(). > > > > Signed-off-by: Gaurav Jain > > --- > > .../NonDiscoverablePciDeviceIo.c | 20 ++++++++++++++++--= - > > 1 file changed, 17 insertions(+), 3 deletions(-) > > > > diff --git > > a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD > > eviceIo.c > > b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD > > eviceIo.c > > index 2d55c9699322..76cb000602fc 100644 > > --- > > a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciD > > eviceIo.c > > +++ > > b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePc > > +++ iDeviceIo.c > > @@ -93,7 +93,15 @@ PciIoPollMem ( > > OUT UINT64 *Result > > ) > > { > > - ASSERT (FALSE); > > + if ((UINT32)Width >=3D EfiPciIoWidthMaximum || > > + Width > EfiPciIoWidthUint64) { > > + return EFI_INVALID_PARAMETER; > > + } > > + > > + if (Result =3D=3D NULL) { > > + return EFI_INVALID_PARAMETER; > > + } > > + > > return EFI_UNSUPPORTED; > > } > > > > @@ -556,7 +564,10 @@ PciIoCopyMem ( > > IN UINTN Count > > ) > > { > > - ASSERT (FALSE); > > + if ((UINT32)Width >=3D EfiPciIoWidthMaximum || > > + Width > EfiPciIoWidthUint64) { > > + return EFI_INVALID_PARAMETER; > > + } > > return EFI_UNSUPPORTED; > > } > > > > @@ -1414,7 +1425,10 @@ PciIoSetBarAttributes ( > > IN OUT UINT64 *Length > > ) > > { > > - ASSERT (FALSE); > > + if (Offset =3D=3D NULL || Length =3D=3D NULL) { > > + return EFI_INVALID_PARAMETER; > > + } > > + > > return EFI_UNSUPPORTED; > > } > > > > -- > > 2.17.1 >=20 >=20 >=20