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 BE84B21B02822 for ; Tue, 8 Jan 2019 19:02:32 -0800 (PST) Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.77]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 09 Jan 2019 11:02:30 +0800 Received: from HKMAIL101.nvidia.com ([10.18.16.10]) by hkpgpgate101.nvidia.com (PGP Universal service); Tue, 08 Jan 2019 19:02:30 -0800 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Tue, 08 Jan 2019 19:02:30 -0800 Received: from DRBGMAIL103.nvidia.com (10.18.16.22) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 9 Jan 2019 03:02:28 +0000 Received: from HKMAIL101.nvidia.com (10.18.16.10) by DRBGMAIL103.nvidia.com (10.18.16.22) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 9 Jan 2019 03:02:27 +0000 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.57) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 9 Jan 2019 03:02:27 +0000 Received: from BYAPR12MB2743.namprd12.prod.outlook.com (20.177.125.220) by BYAPR12MB2997.namprd12.prod.outlook.com (20.178.53.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Wed, 9 Jan 2019 03:02:23 +0000 Received: from BYAPR12MB2743.namprd12.prod.outlook.com ([fe80::d51a:3dbb:3b90:178b]) by BYAPR12MB2743.namprd12.prod.outlook.com ([fe80::d51a:3dbb:3b90:178b%5]) with mapi id 15.20.1495.011; Wed, 9 Jan 2019 03:02:23 +0000 From: Ashish Singhal To: "Kinney, Michael D" , "edk2-devel@lists.01.org" , "Gao, Liming" , "Fu, Siyuan" , "Wu, Jiaxin" Thread-Topic: [PATCH v3 0/2] Provide UEFILib functions for protocol uninstallation. Thread-Index: AQHUpkKMUsqRLfZf6EqMNFFJsf+EAKWj1iqQgACMXICAAAbioIABJ72AgAAP78CAAKCUAIAAANpQ Date: Wed, 9 Jan 2019 03:02:23 +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: [8.46.90.104] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR12MB2997; 6:v+feiGwCofDGK3dn+T3kSaZAHkbWw0MadyAutIwDoXcaFavG0CEa1RNymaKvQnD8T4zZ4rAS27z9n2G9xw5OAul70VOEsvh6xqu4HoN2KdRnDJNNhMDKNYOjxU5KiIMfiY4ert7OUVCy23+UI+XBh3CbnbC2jwH/Xmg8Gl8xtM+2a9iszDl8VNvZw23Og5RlvCb5As07PatMMVg3/E7BSwQRypPb6rDw4NxdtaD7BlAQ1M++9cSRqwatyFJL8qSS5jU7u1i7jEmOwrVdxzirq+LXUHgYkUATUCdymlC/xGztWdspiJw1asNN4O7meF4moeAS374wkRuQupaJRI0Q4hVrKIRvu8kw2UT6GSJ893bE05XtMOKGTPNpnzEz2fQDGGRbzCUmv8FVyijSQFqDS4ppZftEsnGUWXuC/UWZ6rs1e7U1M5zjA+ZXDjK3AGY73yXAMpytJVqE/H+CnZJRuw==; 5:fkviAO6ZWusz3zp72gypDrRpKHNNBPGeS+AA3Z88uryf6SioUl1vYBIgQjNaL4kjzIAEFeRAp2dx1h66ztSGzxpCttJekDChNKLZ7B3KFwb7T5l4yHFGsXEJqd+25uaxVlfZtcOzPo+6afV28e1vVzn13/kvaW8FkHz4WLWY2gxRSzSS1UOy3q623nH6kW+ec1vBL4L1TLBY5ZM1yM+MOw==; 7:EkjLIinxzE0kvLMxRMXfK1BXCVzHRYnJwc3MBCw6HG8UNpUA3U4fREl4vt1mGCIiiASdRkhdY8U2UM4VpJJZCQriTkndOC6HuRPNK+SLZXbFdGq2mb7eKXji+V2zaa3ArJQfLKwA34l6iG6wgwhpSg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 394ef8cc-a691-463d-d4c1-08d675dee118 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR12MB2997; x-ms-traffictypediagnostic: BYAPR12MB2997: x-microsoft-antispam-prvs: x-forefront-prvs: 0912297777 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(396003)(136003)(366004)(39860400002)(376002)(43544003)(189003)(199004)(13464003)(51914003)(8676002)(6506007)(2501003)(8936002)(53546011)(3846002)(81156014)(81166006)(6116002)(102836004)(486006)(7736002)(229853002)(76176011)(25786009)(26005)(256004)(33656002)(305945005)(14444005)(186003)(2906002)(68736007)(7696005)(53936002)(86362001)(478600001)(316002)(71200400001)(71190400001)(110136005)(97736004)(446003)(6436002)(14454004)(106356001)(105586002)(6246003)(74316002)(476003)(66066001)(55016002)(5660300001)(93886005)(99286004)(11346002)(9686003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB2997; H:BYAPR12MB2743.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: GwKRT3QUty0VYyVXLk15GrXwjqBgAkyaQiQ/mi2zN5bXv5aPBLfUuFTdkV0+O3KnakJrGk8lgpJdkVhbuxp1rqGKSpJauEvxtJbxIXhnXdMQLeu95Bnaay7+OItHbD7im0VgC4gd4FcFQilwxYhiT7vArZuRHtpwiFOuc+3vSKAxMTZnonabOQYlZ4a5zQD/MURSBF+hX0DL729noBsbYuXy/l75ZZGZ/yqKVZ8eg8NulFI85lUooAqVtL4eOx69bxFWL7G2DxTWo5J6mz/l1iYYfahcVdMvbs10k59lQALMisehz/5WUxxcjcjUzEpS spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 394ef8cc-a691-463d-d4c1-08d675dee118 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2019 03:02:23.7042 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2997 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1547002950; bh=Qv79J/Ok6BqudcrXjYAJfRO1L1TRjgGnfvRk7yjMS+k=; 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-exchange-antispam-srfa-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: spamdiagnosticoutput:spamdiagnosticmetadata: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-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type:Content-Transfer-Encoding; b=eZom8I+5fpysGL0kHW0PXW55V0pKJ9KZj8wPKnFnFDh0kwbvBWQYRQmWWAXgN0AqK LLOHmMiet2H50y7gk1tuC6zD8LZEUe6THFvNfTzSJYx5OgIsIKTa++Sb1+pyzPhyvM iAmTE8WaAuu3WUUkaEyQfirekiyAOojwCCcHmW+I34Hm+KCxYpHFhEox+/8Hz5zOsL vcBtX8BUaUW9jM+3R3nU37WgHHyMHRlTrwuXzY9cFKPTnpntU0cK2uGMrC30g2PeOZ 2fcZz+A+uaLjVGEwo0vgUWOp9JLnu7TbvLr4pot4BFvu3+HyLgWIeO5KlWPGfB6ep9 +SCDWwKq2qoIg== 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: Wed, 09 Jan 2019 03:02:33 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 =20 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. > > > --------------------------------------------------- > -- > > -- > > > ----------------------------