From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.49]) by mx.groups.io with SMTP id smtpd.web11.5605.1581923899499158705 for ; Sun, 16 Feb 2020 23:18:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CUHwGGOw; spf=pass (domain: nxp.com, ip: 40.107.21.49, mailfrom: gaurav.jain@nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n3khCOSbO0dXb5/4j8ntBfFZlLezSK5NenGsTqY8unUOtt/kdMYYiQJ7hJmoZ5qIAA5iF1ci3oULIGCU2JxdtyZ024uBcGtfcxIal/6ZsN0RzXwM2zxefBuYgFajyn2kAv8WUyGBpI8e3nIqX8jlBNqcS29+FIWgr0fvY+qBw9Mt6yaF0ZV6+6jg6e+BIid31IdcZahFnaM7ic64CP3spSoNoQcopw0jy3Vz4VhyxAE2uAH9BVrs9IU5g+TQWLJYEY84jF3XBaF/0/gH8MNvy/mKkpRT8rFZCymU7pilHSeHI/ncF43o7ZPuBW0JdzIIyX1VEq9FicUwwi0+91vDcw== 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:X-MS-Exchange-SenderADCheck; bh=X7qzsEIO6NKQpENqfel+CXfnc/p5SxIcsXQ3vOnIGdk=; b=ENa8R9aYexcl1X/H8VRiuc45yZ1h9kWQ1K8aLT3yp7qs+pb3IoL8U2ngwTKFzwUkzfftXE1y/L3AaTT/fsqrK8EHjD68AuGddTIRiKh0dr4l0QiLbeJOlkbtEDnlYOrlwXFHkA4+taTbsOlx/P6RgXKy7IeAj4EOrrsyH2Om6HNfyEpagFwMnbk6YGTC7dQpHLQuuDImI69YmCP5BklbkJnHcYj/vMbvPkzFSra5HV6aVz/PWzSDcu39vgCnPhCiHmtBJubG9STxcDS6O89Mea0YtowD8TDPNEn2Wyo6kiRmMd9XvoPeDc2kZg5IBCcuCZUAj9A4WHV6gJP010lQAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X7qzsEIO6NKQpENqfel+CXfnc/p5SxIcsXQ3vOnIGdk=; b=CUHwGGOwRIS/jJ+AaMeWLlDCcDMOqH2hvY4ix0cEBz0DM0ydXmPJun/ZsZ5dRbCTn7gU/kL1wE/9NcdiiyA4BieTZStNthkfTcaMzDQkQ5kdGNTWZKsgHgjlVRlkqDL3V9y2PEMWwyZ6jqMgFQMCwbhhpHpZoS8ANnRgIr5AEos= Received: from AM6PR04MB4087.eurprd04.prod.outlook.com (52.135.167.157) by AM6PR04MB5032.eurprd04.prod.outlook.com (20.177.34.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.29; Mon, 17 Feb 2020 07:18:17 +0000 Received: from AM6PR04MB4087.eurprd04.prod.outlook.com ([fe80::ba:58fb:7ae:6af1]) by AM6PR04MB4087.eurprd04.prod.outlook.com ([fe80::ba:58fb:7ae:6af1%4]) with mapi id 15.20.2729.031; Mon, 17 Feb 2020 07:18:17 +0000 From: "Gaurav Jain" To: "devel@edk2.groups.io" CC: Jian J Wang , Hao A Wu , Ray Ni , Pankaj Bansal Subject: Re: [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT PCIIO Protocol Test. Thread-Topic: [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT PCIIO Protocol Test. Thread-Index: AQHV10XR5XjIzUYbAkmv942vGaqAFKgfFgBg Date: Mon, 17 Feb 2020 07:18:17 +0000 Message-ID: References: <20200130133804.32261-1-gaurav.jain@nxp.com> In-Reply-To: <20200130133804.32261-1-gaurav.jain@nxp.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=gaurav.jain@nxp.com; x-originating-ip: [92.120.1.65] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: eb2be435-7ecb-4466-97c7-08d7b3798f50 x-ms-traffictypediagnostic: AM6PR04MB5032:|AM6PR04MB5032: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1201; x-forefront-prvs: 0316567485 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(199004)(189003)(478600001)(8936002)(26005)(2906002)(52536014)(316002)(5660300002)(71200400001)(7696005)(186003)(44832011)(66476007)(64756008)(86362001)(55016002)(81166006)(9686003)(81156014)(6916009)(76116006)(8676002)(6506007)(66556008)(66446008)(4326008)(53546011)(33656002)(66946007)(54906003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB5032;H:AM6PR04MB4087.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Yhgq+qWpBSQtxIlNJvfE0RzSKhpI6lQltJLJwF7DOC6a8fy0qGSBBUMh0VhoOklONDkN5eij1FgwUEMXeKTEUzxk8UG0exAIir0IOodnN4i8LulHOBVSWetHo3TZzgCX9N4uYiTrPVnE0E8LrDoRK7CJ+vwzAjb+V8t9HhKYCaQFzNZ2j91e0z+d3Bl9+GEd/NM4HPbVsHLcGCxxfu7o373os2JKOmdiSECyf5QubINDbogd/IPszS5f4ikzF4o2UgkbikzRav66wqb18Kpbd+A0h0spW4scxuxK0yuRAOvoXPrQLLtG4rrZnc4G7RG0iQM+PcKT16iyffIoMIovp0Ii5kWyZdlyFK/2Zu5AvZPIvNfdx+W94VKWLNDOHpr3k6s144aJEO1fjB5eNtCdB/7lzokVx9T6qpCotBeRyDsOba1RSaxYkSBnLRpZN88T x-ms-exchange-antispam-messagedata: YaSrlL+xBakGeCcolzzKw7y38u2RB5bXAysl632vcqMldEC7U2jIlFmua17ZD9/miANk11FVvhncWynNjmoqwMkS98Kz/PlSmpq8So9jDZwm4RijWnr8r82lwmHTK/g9tRDFPAqUwh++l+bSipCbPQ== MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb2be435-7ecb-4466-97c7-08d7b3798f50 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Feb 2020 07:18:17.2363 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JPx2lkaSwa9r0R8Nm+YIpQKNGcfxDaOiX6vQcGyfvCgtMaNFpAztQjM8VgXxEyudP0blNIvU81OuCgQ6zrdS6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5032 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Gentle Reminder!! Please review.. > -----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 ; Gaurav > Jain > Subject: [PATCH 1/1] MdeModulePkg/Pci: Fixed Asserts in SCT PCIIO Protoco= l > Test. >=20 > ASSERT in CopyMem_Conf, PollMem_Conf, SetBarAttributes_Conf > Conformance Test. > SCT Test expect return as Invalid Parameter. > So removed ASSERT(). >=20 > Signed-off-by: Gaurav Jain > --- > .../NonDiscoverablePciDeviceIo.c | 20 ++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) >=20 > 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; > } >=20 > @@ -556,7 +564,10 @@ PciIoCopyMem ( > IN UINTN Count > ) > { > - ASSERT (FALSE); > + if ((UINT32)Width >=3D EfiPciIoWidthMaximum || > + Width > EfiPciIoWidthUint64) { > + return EFI_INVALID_PARAMETER; > + } > return EFI_UNSUPPORTED; > } >=20 > @@ -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; > } >=20 > -- > 2.17.1