From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=203.18.50.4; helo=nat-hk.nvidia.com; envelope-from=ashishsingha@nvidia.com; receiver=edk2-devel@lists.01.org Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 92F8B21B02822 for ; Mon, 4 Feb 2019 12:18:32 -0800 (PST) Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.100]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 05 Feb 2019 04:18:30 +0800 Received: from HKMAIL101.nvidia.com ([10.18.16.10]) by hkpgpgate101.nvidia.com (PGP Universal service); Mon, 04 Feb 2019 12:18:30 -0800 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Mon, 04 Feb 2019 12:18:30 -0800 Received: from DRBGMAIL104.nvidia.com (10.18.16.23) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 4 Feb 2019 20:18:28 +0000 Received: from HKMAIL104.nvidia.com (10.18.16.13) by DRBGMAIL104.nvidia.com (10.18.16.23) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 4 Feb 2019 20:18:27 +0000 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (104.47.40.58) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 4 Feb 2019 20:18:27 +0000 Received: from DM6PR12MB3324.namprd12.prod.outlook.com (20.178.31.154) by DM6PR12MB3644.namprd12.prod.outlook.com (20.178.199.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1580.17; Mon, 4 Feb 2019 20:18:24 +0000 Received: from DM6PR12MB3324.namprd12.prod.outlook.com ([fe80::c0af:44da:41eb:7842]) by DM6PR12MB3324.namprd12.prod.outlook.com ([fe80::c0af:44da:41eb:7842%5]) with mapi id 15.20.1580.019; Mon, 4 Feb 2019 20:18:24 +0000 From: Ashish Singhal To: "Kinney, Michael D" , "edk2-devel@lists.01.org" , "Gao, Liming" Thread-Topic: [PATCH v3 0/2] Provide UEFILib functions for protocol uninstallation. Thread-Index: AQHUpkKMUsqRLfZf6EqMNFFJsf+EAKWj1iqQgACMXICAAAbioIABJ72AgAAP78CAAKCUAIAAANpQgCn+CKA= Date: Mon, 4 Feb 2019 20:18:24 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Enabled=True; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SiteId=43083d15-7273-40c1-b7db-39efd9ccc17a; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Owner=ashishsingha@nvidia.com; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SetDate=2019-01-09T03:02:21.5486414Z; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Name=Unrestricted; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Application=Microsoft Azure Information Protection; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Extended_MSFT_Method=Automatic; Sensitivity=Unrestricted authentication-results: spf=none (sender IP is ) smtp.mailfrom=ashishsingha@nvidia.com; x-originating-ip: [216.228.112.22] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM6PR12MB3644; 6:0+Hy9DXoW65Web2y1hpvLZcHrLirsvojZ5+PnJX61ulq00TER1x2UKzD2rLLXqLcpLp+Z5ZENNvLpXSDzkGGA1ydtKv8mMvgihtBIzAp4U26hLHisEBNsrJsWjdqqfx99F84rqtiAmFVuG7uF+AApgNro4vWyy9jAsR0r0GzUEtL1taViegBmU8gUTFTZ2iSdUQWB+N7ifJ2za0iuIt3Nu51wG/jmhWcqvmj7XZ7LcvBcKK58FP+0ysJt62AMBOOlJ06s9eO253Ui5pDWWXTEKTYg8qVpVl4+mMowpL4hwjxV6KJ3pnbTZ5uqNBx00zoGf4tDSf4BIjUQ/iC122IBSELuAeDuDpdH6jK52EEZKnx0yB5XUFwUwpbuGOj+RjEC4pmJm3dzrvgoo3jBjb2k8oebqahrApDn+bsJMA1uRowjWNR8Mwkm84rcKiwpO7WzlLOjZrMmEBRx0ibcpeUBA==; 5:7dvE8hLCeRWmgLrEsUs4DpXB3RMiqHMbd93aVTddB4nPJDwvlhJw7LC6JE7mApcHneNvwfwg3ls9as4ibZ0qJ4XUD8jSxF9grX8RoI72+8g22s2FkLW8YUSi2+Xy2e0QXa9VyT1TDI9sbvvF38WnK07S74Pd2Wbx7u1UkqcQEV7lqq6GV2dGQ4we9Tn3JqTWaaL1Wn9WyTsM+VS6Zz8kzQ==; 7:b0A+Aa3DiBxv0f1NRgi5N28wDdnAd3GsPp8Z4K1pZZoRAESw6Jbxx8NsA6ujDjU6JVo+o6ixMb6Gfa3IzHZIPPpp6e8ev3Yz4J9g0lenfNvaodASQodknXIexW55JzdEqNgJHoMk172k9ujVCRJzPg== x-ms-office365-filtering-correlation-id: e2314b3d-d772-47fd-285f-08d68addea84 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(2017052603328)(7153060)(7193020); SRVR:DM6PR12MB3644; x-ms-traffictypediagnostic: DM6PR12MB3644: x-microsoft-antispam-prvs: x-forefront-prvs: 0938781D02 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(366004)(396003)(39860400002)(13464003)(199004)(189003)(51914003)(43544003)(6116002)(26005)(3846002)(478600001)(305945005)(7736002)(68736007)(33656002)(186003)(6436002)(97736004)(81156014)(25786009)(81166006)(229853002)(93886005)(8676002)(66066001)(486006)(53936002)(76176011)(7696005)(74316002)(6246003)(2501003)(8936002)(9686003)(71190400001)(476003)(106356001)(2906002)(14454004)(105586002)(53546011)(6506007)(99286004)(446003)(11346002)(71200400001)(102836004)(86362001)(55016002)(256004)(316002)(14444005)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR12MB3644; H:DM6PR12MB3324.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: DcPQGVMbp1N6add3AGXuSX1gVHnkWh0/HLwe7QFFk6jhOL0JNhTnM5IeuNIeCbNX67SkTZP88ByxuKUl7S2HiMg/3Z9RCaZVvn8E8fru0v+AnTa5tkGoXINDhkUoV7Bym25PhqwIObq58VO4puCnZaxOaj+ZDTgPwr5BvgRH1Uq4IZR2xb0TUMfDGIVgzQ6iuAcjETT6R3DEY18ZS1gU9PCDqeWQhUsNsNKeqYlWKfBdZoayKtu9arnIcv+vc6+Bd95anhpvE8h7ttozRfehJqKaggr1BO2kq7F+ysPeAZOalM/eGtDowX+szSMt8Vixwj2E+YyqCF8Zvs3niKlFXqe/vlRgkkUE6xftQQVcQP+dtujCEco6FWn/YVBdDFv2xyrTl+OaurTKMsUotMzjxAY2PLEGpOI7oNcYVs9SBM0= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e2314b3d-d772-47fd-285f-08d68addea84 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2019 20:18:24.5067 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3644 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1549311511; bh=r+hzsN7T+p+jDRPi/0Uo3YaBjC0UrZn9EAUZQIeZVaU=; h=X-PGP-Universal:From:To:Subject:Thread-Topic:Thread-Index:Date: Message-ID:References:In-Reply-To:Accept-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:msip_labels:authentication-results: x-originating-ip:x-ms-publictraffictype: x-microsoft-exchange-diagnostics: x-ms-office365-filtering-correlation-id:x-microsoft-antispam: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs: x-forefront-prvs:x-forefront-antispam-report:received-spf: x-ms-exchange-senderadcheck:x-microsoft-antispam-message-info: MIME-Version:X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type:Content-Transfer-Encoding; b=auGhmyJI2fi2TUSqgy2UX55P276Usoo2atbR274aUow+DxFYMZrl9nk3v0iUFjz/L 6xjPccYldUx8LK/ttLirnm0agfva4/QA+sCwAtAXs3UWEi0lROOETWy8jQ6u1P8Jbs ofMwlOZ3ciYc7qLMAMozjD4y0Kwxv+a6FSB7FlpYgN+5TKlHVR1jojNCFynsF/v36q 3e8PkxAuSYGqN/qcYeKdBkJRDTSp865e0cBTdmfbzthFz609CJus8hKmxQV4qFkNmp WdlhQp9+vBIbOYX7K2/0+uwarFQ/Pl8BCQRav2EZFwR8PbQT93CSFa9TjwAWUKdiJI mhrH82yVAUvlg== Subject: Re: [PATCH v3 0/2] Provide UEFILib functions for protocol uninstallation. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 20:18:33 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Mike, I have refactored my change and with this I am not seeing any size bloating= in DEBUG or RELEASE images I am building for my platform. The new change h= as been submitted for consideration. Thanks Ashish -----Original Message----- From: Ashish Singhal=20 Sent: Tuesday, January 8, 2019 8:02 PM To: 'Kinney, Michael D' ; edk2-devel@lists.01.o= rg; Gao, Liming ; Fu, Siyuan ; W= u, Jiaxin Subject: RE: [PATCH v3 0/2] Provide UEFILib functions for protocol uninstal= lation. Hi Mike, Thanks for the analysis. I will investigate at my end what could be causing= this. Meanwhile, to fix the issue do you want to submit PATCH v2 1/4 and 2= /4 patches? These 2 patches are just what you suggested. Thanks Ashish -----Original Message----- From: Kinney, Michael D Sent: Tuesday, January 8, 2019 7:58 PM To: Ashish Singhal ; edk2-devel@lists.01.org; Gao,= Liming ; Fu, Siyuan ; Wu, Jiaxi= n ; Kinney, Michael D Subject: RE: [PATCH v3 0/2] Provide UEFILib functions for protocol uninstal= lation. Ashish, When I do full platform builds and individual driver builds, the result is = always a little bigger with the V3 version of the patch. DEBUG DEBUG+Patch Delta RELEASE RELEASE+Pat= ch Delta ***** *********** ***** ******* ***********= ** ***** Quark IA32 FVMAIN 2337360 2339408 2048 1181168 11= 82992 1824 Quark IA32 FVMAIN_COMPACT 814664 815272 608 516208 5= 16904 696 DiskIoDxe.efi 18752 18880 128 5824 = 5952 128 DiskIoDxe.ROM 10240 10240 0 3419 = 3569 150 OVMF X64 DXEFV 4447368 4456968 9600 2956808 29= 66312 9504 OVMF X64 FVMAIN_COMPACT 1164264 1164784 520 912528 9= 13048 520 I recommend the install APIs remain unchanged, and the uninstall APIs use t= he same logic as the install APIs. Best regards, Mike > -----Original Message----- > From: Ashish Singhal [mailto:ashishsingha@nvidia.com] > Sent: Tuesday, January 8, 2019 9:24 AM > To: Kinney, Michael D ;=20 > edk2-devel@lists.01.org; Gao, Liming ; Fu,=20 > Siyuan ; Wu, Jiaxin > Subject: RE: [PATCH v3 0/2] Provide UEFILib functions for protocol=20 > uninstallation. >=20 > Thanks Mike. Please let me know if you have any more questions and/or=20 > comments. >=20 > Thanks > Ashish >=20 > -----Original Message----- > From: Kinney, Michael D > Sent: Tuesday, January 8, 2019 9:26 AM > To: Ashish Singhal ; edk2-=20 > devel@lists.01.org; Gao, Liming ; Fu, Siyuan=20 > ; Wu, Jiaxin ; Kinney,=20 > Michael D > Subject: RE: [PATCH v3 0/2] Provide UEFILib functions for protocol=20 > uninstallation. >=20 > Ashish, >=20 > Good point. I was looking at the code size of a single uncompressed=20 > UEFI Driver (DiskIoDxe). I suspect that the patch provides a more=20 > consistent pattern across all drivers that use these UefiLib APIs, and=20 > then provides better compression on an FV that contains many UEFI=20 > Drivers. >=20 > I also suspect there may be a small size increase for the single=20 > compressed UEFI Driver use case for PCI Option ROMs. >=20 > I will run a few more experiments this morning. >=20 > Thanks, >=20 > Mike >=20 > > -----Original Message----- > > From: Ashish Singhal [mailto:ashishsingha@nvidia.com] > > Sent: Monday, January 7, 2019 2:51 PM > > To: Kinney, Michael D ;=20 > > edk2-devel@lists.01.org; Gao, Liming > ; Fu, > > Siyuan ; Wu, Jiaxin > > > Subject: RE: [PATCH v3 0/2] Provide UEFILib functions > for protocol > > uninstallation. > > > > Hi Mike, > > > > I build both DEBUG and RELEASE variant of the library > and they both > > built a few KB less in size compared to what is in > tip right now. Can > > you please help me with the optimization settings you > have enabled so > > that I can try the same at my end? Also, if you want, > we can look at > > the optimization part going forward and fix the issue > first by pushing > > in PATCH v2 1/4 and PATCH v2 2/4 which just adds > uninstallation APIs > > keeping the same code structure as for install. > > > > Thanks > > Ashish > > > > -----Original Message----- > > From: Kinney, Michael D > > Sent: Monday, January 7, 2019 3:23 PM > > To: Ashish Singhal ; edk2-=20 > > devel@lists.01.org; Gao, Liming > ; Fu, Siyuan > > ; Wu, Jiaxin > ; Kinney, > > Michael D > > Subject: RE: [PATCH v3 0/2] Provide UEFILib functions > for protocol > > uninstallation. > > > > Hi Ashish, > > > > My main concern with this patch is that the generated > code for > > optimized RELEASE builds is not as small. > > > > From a source maintenance perspective, the patch you > have provided is > > easier to maintain. However, the implementation of > the APIs that > > install protocols was done to make sure the optimizer > produces the > > smallest number of instructions to install the > protocols. > > > > I would prefer the APIs that install protocols remain > unchanged, and > > that only the new APIs to uninstall the protocols be > added. The same > > approach could be taken in the implementation to > produce the exact > > right form of the uninstall action that is guaranteed > to succeed if > > the uninstall API matches the API that was used to > install. > > > > Thanks, > > > > Mike > > > > > -----Original Message----- > > > From: Ashish Singhal > [mailto:ashishsingha@nvidia.com] > > > Sent: Monday, January 7, 2019 6:02 AM > > > To: edk2-devel@lists.01.org; Kinney, Michael D=20 > > > ; Gao, Liming > > ; Fu, > > > Siyuan ; Wu, Jiaxin > > > > > Subject: RE: [PATCH v3 0/2] Provide UEFILib > functions > > for protocol > > > uninstallation. > > > > > > + Maintainers > > > > > > -----Original Message----- > > > From: Ashish Singhal > > > Sent: Sunday, January 6, 2019 9:38 PM > > > To: edk2-devel@lists.01.org > > > Cc: Ashish Singhal > > > Subject: [PATCH v3 0/2] Provide UEFILib functions > for > > protocol > > > uninstallation. > > > > > > An issue was seen in IScsiDxe in NetworkPkg where > > driver cleanup after > > > initialization failure was not done right. Bug 1428 > > was filed in this > > > regard. > > > As per discussions with Mike, it was also discussed > > that having > > > UEFILib provide protocol uninstallation abstraction > > would help to > > > avoid these issues in the future. Bug 1429 was > found > > to track this. > > > The first 2 patches take care of this. > > > > > > Patch number 1 also simplifies the UEFILib protocol > > installation and > > > uninstallation abstraction by adding a helper > > function doing > > > operations instead of every public function. > > > > > > Ashish Singhal (2): > > > MdePkg/UefiLib: Abstract driver model protocol > > uninstallation > > > NetworkPkg/IScsiDxe: Use UEFILib APIs to > uninstall > > protocols. > > > > > > MdePkg/Include/Library/UefiLib.h | 103 > +++ > > > MdePkg/Library/UefiLib/UefiDriverModel.c | 1186 > > > ++++++++---------------------- > > > NetworkPkg/IScsiDxe/IScsiDriver.c | 31 +- > > > 3 files changed, 435 insertions(+), 885 > deletions(-) > > > > > > -- > > > 2.7.4 > > > > > > --------------------------------------------------- > -- > > -- > > > ---------------------------- > > > This email message is for the sole use of the > > intended > > > recipient(s) and may contain > > > confidential information. Any unauthorized review, > > use, disclosure or > > > distribution is prohibited. If you are not the > > intended recipient, > > > please contact the sender by reply email and > destroy > > all copies of the > > > original message. > > > --------------------------------------------------- > -- > > -- > > > ----------------------------