From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.85]) by mx.groups.io with SMTP id smtpd.web11.18441.1590345126592084011 for ; Sun, 24 May 2020 11:32:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=UQ6fL3WH; spf=pass (domain: oss.nxp.com, ip: 40.107.8.85, mailfrom: wasim.khan@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xa+KqshfXfRr0XkFvTVohob8od4NnkA3JAajG1tH/Hm9bbarHwyBg+6YnHPUwPJFTJQoGlHA0OEyXp8HxhCWtSybiAB8IAaUTyJy1n2iC3li3ZJ6e0QR2DAvd/GIMmDr0tr/13v1FTrQo5qYbL7QA2BilqgkR3kSA2iEPt+R9MYB1rwRQ6J6pv7AQ/DURw5462DbB+K9zNPx8uOF3x4lEG+QJK3s+z9JiKKJrrX1giP92ktgqd+dpjc4ALuqqjnf/Ms1YElw/KrLeJ2/XZS4nsCX4BRPIPeq+ZJ5d7ePEprXCQJoXrxXZrC/UQWrZ2pX8nMMTHZDm4MKmI31BnDD0g== 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=4UQFSc3iD83Ye6ssO35aiez8prbdk1VD+EJZchceIvk=; b=VGLOLG/88hqQftJs2oAKKWSXFWKl2uQbPwtvgua7CWv+TL7qOWWwQLQavx5wlxndrhRts+waBS26Kz7UvNieGqd8Le/PPWxBxTauTGgQNhhrDDHrY88v2dKG/Dd3pgUuA/hRoTrF1Nph1fpUMHVsViPEYSmLgZPd7n/fHXfUsnX66M9J+i9sXRjo9rGSYW5+VjPl4tK1H6GDyG/G+p3Bycn9nvo5VB2maK9CBBVUIcWxlnmF9Ppyp/RduRrwPy8ris2Sk5J5pE3zZ4zU7qGqwdRyf5HLzsizlpe+bDwpmoY+W+pLf6frubOZUfAhNLdvF/9lW6twTwr8x/tRWLTmPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4UQFSc3iD83Ye6ssO35aiez8prbdk1VD+EJZchceIvk=; b=UQ6fL3WHJF03X0l9R9cinAFiG4ZBfxgXeGhdD+HDQG/SiojHb2hGIaq8krWdpdjGOiSGmCdrGx//eGrqkWlIYE6cF7Tp+VTAu2bo3bEl1i/++FsY81GUKr+9eercoBJ6cnewoQxMGb3glrBmBDgq8/lZsTSinxiQRyIeVXwn3mk= Received: from VE1PR04MB6702.eurprd04.prod.outlook.com (2603:10a6:803:123::13) by VE1PR04MB6591.eurprd04.prod.outlook.com (2603:10a6:803:123::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Sun, 24 May 2020 18:32:02 +0000 Received: from VE1PR04MB6702.eurprd04.prod.outlook.com ([fe80::81c4:97a6:7592:f225]) by VE1PR04MB6702.eurprd04.prod.outlook.com ([fe80::81c4:97a6:7592:f225%7]) with mapi id 15.20.3021.029; Sun, 24 May 2020 18:32:02 +0000 From: "Wasim Khan (OSS)" To: Ard Biesheuvel CC: "devel@edk2.groups.io" , Meenakshi Aggarwal , Vabhav Sharma , Varun Sethi , "leif@nuviainc.com" , "jon@solid-run.com" Subject: Re: [PATCH edk2-platforms 09/16] Silicon/NXP: Implement PciSegmentLib for PCIe Layerscape Controller Thread-Topic: [PATCH edk2-platforms 09/16] Silicon/NXP: Implement PciSegmentLib for PCIe Layerscape Controller Thread-Index: AQHWL8QN3faHB3czjkeLalTon4hXtqiz14SAgAO2LfA= Date: Sun, 24 May 2020 18:32:02 +0000 Message-ID: References: <1590102139-16588-1-git-send-email-wasim.khan@oss.nxp.com> <1590102139-16588-10-git-send-email-wasim.khan@oss.nxp.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=oss.nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [157.47.197.3] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d15b5c6c-b2f0-4668-6f3e-08d80010c095 x-ms-traffictypediagnostic: VE1PR04MB6591: x-ms-exchange-sharedmailbox-routingagent-processed: True x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3276; x-forefront-prvs: 0413C9F1ED x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xld8dwt9AWpb4M1a0W+curbCTICNJs+bOg1dKlfDJMiAPYZbi2r44ruJF5wFfDz40gv4LYrIML43fFe7F9LxMkz7MH56i638Sh6tTnntfupj7wnzqKO4PL8Tcftd6N1WZtIfTNxTIwV72Rg+Li/wHeE+OZpRrFsDP2bkyeQLjUqWFbrpJzBanseWyFpSpf57L/0OZ6JPLou29xtYZE7xz/Vsw2yqWIlZGah5TO+uMGPRja+m7/TvIv7McYzKfcqNHjZGVe5NiNLnkPwT26CFPyUvsOay5IWWghtQ8LrFeWD961SuV+8/9li4hjKKl7hxrxpFcC5Widi5wUM+gh1/oQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6702.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(346002)(39860400002)(136003)(396003)(366004)(26005)(316002)(2906002)(186003)(71200400001)(6916009)(7696005)(8676002)(8936002)(4326008)(54906003)(55016002)(9686003)(6506007)(53546011)(30864003)(5660300002)(86362001)(478600001)(33656002)(66476007)(64756008)(66556008)(66446008)(52536014)(76116006)(66946007)(19627235002)(579004);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: wuWcmHhmARBSI8ASfrxh3uFa/x+rE49Cz30cEqCR4+7JNLwxCsxcX7GbL0AMGR7/she26B31jFbyJsEijqbNji4OaS3qCkXoXlqUdFKVQGyLgvA3/2Nr+9PMi7z33vQt9MYRNj8y+fq8f1tDT1zclCin/PlcyZZqTdyH7JOnw2XBuQ4agOrfHvV3AmWGSXn06fyUVlOWQka5uIm+GD996ubQPDwkNxkFydKX6Ci0ftGuVfJSPSlJRVmgRF6/M4g8syVWrE4FwPpKLtbv1GHkkZcVndKVDqiliHHKo1cbdgioPc/n4WTiESTRnEq7EUKTKC46wU2ueiXgHq4rz7hS334LHVTC9BatFFA8rGbovx60QwlePLGKsklGgw/QyNRmHKPISPzOxIxvWwevTEXyRD0iswW6sOlO/aNsl9+XY4JM5nlWfQa1GB6QTSQ5qB1p+yuhpo17QFY40wP7QtOjZtcJCC8l4Cnxbvwoeye+ABg= MIME-Version: 1.0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d15b5c6c-b2f0-4668-6f3e-08d80010c095 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2020 18:32:02.2201 (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: kA1CYOw6WVfpnkjnxrXQOKDHK8g0W9FSHtjvb+k/NqQ65uP1joykveI7BE2S6bfooF71hAviC0x9pWK1khueCg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6591 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogQXJkIEJpZXNoZXV2ZWwg PGFyZC5iaWVzaGV1dmVsQGFybS5jb20+DQo+IFNlbnQ6IEZyaWRheSwgTWF5IDIyLCAyMDIwIDM6 MDAgUE0NCj4gVG86IFdhc2ltIEtoYW4gKE9TUykgPHdhc2ltLmtoYW5Ab3NzLm54cC5jb20+OyBk ZXZlbEBlZGsyLmdyb3Vwcy5pbzsNCj4gTWVlbmFrc2hpIEFnZ2Fyd2FsIDxtZWVuYWtzaGkuYWdn YXJ3YWxAbnhwLmNvbT47IFZhYmhhdiBTaGFybWENCj4gPHZhYmhhdi5zaGFybWFAbnhwLmNvbT47 IFZhcnVuIFNldGhpIDxWLlNldGhpQG54cC5jb20+Ow0KPiBsZWlmQG51dmlhaW5jLmNvbTsgam9u QHNvbGlkLXJ1bi5jb20NCj4gQ2M6IFdhc2ltIEtoYW4gPHdhc2ltLmtoYW5AbnhwLmNvbT4NCj4g U3ViamVjdDogUmU6IFtQQVRDSCBlZGsyLXBsYXRmb3JtcyAwOS8xNl0gU2lsaWNvbi9OWFA6IElt cGxlbWVudA0KPiBQY2lTZWdtZW50TGliIGZvciBQQ0llIExheWVyc2NhcGUgQ29udHJvbGxlcg0K PiANCj4gT24gNS8yMi8yMCAxOjAyIEFNLCBXYXNpbSBLaGFuIHdyb3RlOg0KPiA+IEZyb206IFdh c2ltIEtoYW4gPHdhc2ltLmtoYW5AbnhwLmNvbT4NCj4gPg0KPiA+IFdlIGhhdmUgZGlmZmVyZW50 IFBDSSBjb25maWcgc3BhY2UgcmVnaW9uIGZvciBidXMgMCAoQ29udHJvbGxlciBzcGFjZSkNCj4g PiBhbmQgYnVzWzB4MS0weGZmXSBvbiBOWFAgU29DcyB3aXRoIFBDSWUgTFMgY29udHJvbGxlci4N C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