From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=216.228.121.143; helo=hqemgate14.nvidia.com; envelope-from=ashishsingha@nvidia.com; receiver=edk2-devel@lists.01.org Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com [216.228.121.143]) (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 D675E211CF377 for ; Mon, 25 Feb 2019 11:15:13 -0800 (PST) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 25 Feb 2019 11:10:01 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 25 Feb 2019 11:09:52 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 25 Feb 2019 11:09:52 -0800 Received: from HQMAIL110.nvidia.com (172.18.146.15) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 25 Feb 2019 19:09:52 +0000 Received: from HQMAIL107.nvidia.com (172.20.187.13) by hqmail110.nvidia.com (172.18.146.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 25 Feb 2019 19:09:51 +0000 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.51) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 25 Feb 2019 19:09:51 +0000 Received: from DM6PR12MB3324.namprd12.prod.outlook.com (20.178.31.154) by DM6PR12MB3451.namprd12.prod.outlook.com (20.178.198.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.16; Mon, 25 Feb 2019 19:09:30 +0000 Received: from DM6PR12MB3324.namprd12.prod.outlook.com ([fe80::f8d4:91e2:b81b:3b81]) by DM6PR12MB3324.namprd12.prod.outlook.com ([fe80::f8d4:91e2:b81b:3b81%4]) with mapi id 15.20.1643.019; Mon, 25 Feb 2019 19:09:30 +0000 From: Ashish Singhal To: "Kinney, Michael D" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [PATCH] MdePkg/UefiLib: Simplify protocol un/installation abstraction Thread-Index: AQHUvMUdlWJixMqlykee1TFuocd2D6XnZABAgAA8zgCACWDOwA== Date: Mon, 25 Feb 2019 19:09:30 +0000 Message-ID: References: <9c850690f22cc52a348211f28b6c1c8d0b9c47c2.1549310714.git.ashishsingha@nvidia.com> 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-02-25T19:09:27.6460459Z; 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-ms-office365-filtering-correlation-id: 4e414a75-8135-47f4-0ba7-08d69b54c501 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DM6PR12MB3451; x-ms-traffictypediagnostic: DM6PR12MB3451: x-microsoft-exchange-diagnostics: =?us-ascii?Q?1; DM6PR12MB3451; 23:ig84rWGNPNgQ3BPJ6a7Kn0Qhjb8EVj6xMiOanPeph?= =?us-ascii?Q?yBHHA3kGVWIPfsBm4qkYzLwOn+T4sOPmg3QP7vATo9e+WODTUzU7oaCB/5Al?= =?us-ascii?Q?eNV21mqUYcJkwva1L3OBNOmZgIyDvGAkPt7zEtQ9xTIlkjyiOyx66vpNsW6m?= =?us-ascii?Q?NxkXS92g3y278BfjZajuj0EqB2rRBynK2D5HSW9GPoPGsJrZl3XpAK5MxXs3?= =?us-ascii?Q?sArszjGI5Y1YG8pfNAdsb4qqPe/NZ1TmSHuVEvqZyWyhfnz3S6XNynINcK18?= =?us-ascii?Q?EzACz4Py9CkpQA7QmnVAO/D3KsGrg7uSVVaGNVUTi6MwK6bs1sa+8oeEdHhO?= =?us-ascii?Q?mqEOXlX5ev2EuDivm9qY4RCT06UOArzgkXgDq6mjHUaRP5yA2s0Buf9FXyw6?= =?us-ascii?Q?uDMI7prvvxtxDih4cUmQnHMyJYwN9M3ilSQqj27RkgqxMQIjHJeBIPTN92S5?= =?us-ascii?Q?kMJenbMkMnBojO7xDnKqReY/ErP4pp3xOXrtTl0iOUwn4MtYqsWxktDDA0tD?= =?us-ascii?Q?e3ZZBpFdXuW9xSox3CO2q+Op2Nsd2r/D/N9WZEFurwiFh1Ssr9/Kjirwpccr?= =?us-ascii?Q?FmRPIIK7FBlkzvgMQFYuiTDE2ODR/pD1/x82WafSj7xVZaZ0a13gSz0BFYSE?= =?us-ascii?Q?LkBvxEqSzFeV6xyZVtlQyTwj7LpcQJhBSnuR27/h5TFRUutN4vHuQlOMGowJ?= =?us-ascii?Q?53KFCpJBoRh83wygVD9sB5zmyDByDsdj/FdaXsCegdKY8rueg3AiZtFo3spO?= =?us-ascii?Q?lxyGUsEOq+5YPzotLaWDfdBoMI+RI/cOwKlE3NDKlNbc3t4ZX8PRly20nqDq?= =?us-ascii?Q?xCwiXbBaAHQMUBjxx7tPtu/nBkIGWGxTFHn5KZJFC8NXS+ue9NhJbiNyL0qy?= =?us-ascii?Q?UNSjTPyysGjVy3CcEfRpaRnPYwn1PkxkwIIAfTGFu8vTG90XNOchc76a8rdp?= =?us-ascii?Q?aAKzMb8NDselMb1ecH5z7QSlks9Jy4w4Iaso/MA2qFl0GPhSoWrHWrFiB3vA?= =?us-ascii?Q?jVsuX56TMS2Botacdi3ne2Lwoa5cTCRJ0Sd/X20Dy1P/FklPFiPcIAbdRJxa?= =?us-ascii?Q?vQbqUVTBMun7dgi5zM7G0ey/5SiRyIuEpdQoYIiFStxcRiUQ2GSaa2K15lpv?= =?us-ascii?Q?agghoBLhWJNonfjGNSEPP8K8qImNtoDuTbEJqPb7gzfEliI9syaa3JYugayx?= =?us-ascii?Q?xC7e4DJH+Vij02N62b//Qt64SA50ht6kSAAnugzo+AaK2X6TzTGB0BkL32o8?= =?us-ascii?Q?PKKJ0VFcf+163znRg5CEBhf7TTy05TGs9JtZgLcJyYl+hYjgxEGc5rU3rS/y?= =?us-ascii?Q?40Q58p0dhj/1n39y008TEmEwG+YC4DeOLOFEBk4+gI97aIxo4laB4AmAOJPl?= =?us-ascii?Q?O30rH4fftjgiMxcS2glR46nS7g=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 095972DF2F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(396003)(346002)(39860400002)(366004)(189003)(199004)(13464003)(256004)(14444005)(2906002)(316002)(2501003)(19627235002)(74316002)(6116002)(8936002)(110136005)(8676002)(81166006)(81156014)(3846002)(305945005)(7736002)(186003)(53936002)(476003)(11346002)(446003)(71200400001)(71190400001)(26005)(53546011)(6506007)(102836004)(52536013)(66066001)(99286004)(25786009)(97736004)(5660300002)(33656002)(229853002)(486006)(7696005)(9686003)(76176011)(53946003)(6436002)(55016002)(478600001)(14454004)(106356001)(105586002)(6246003)(4326008)(86362001)(30864003)(68736007)(567094002)(569006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR12MB3451; H:DM6PR12MB3324.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: g2v3ZtkU9tK8Z+YTCUSAMWQIZZq4SN19+9ipr4AzC/WWFsE9AQik+VYbf9nJl5c7S0yCYpugNNzh+opAvPwiSNxy7YEh0pLsiYehqBqmWGoobA3BaozT0LJWyVc+NU39vaBZ2ZgMzpafL7fWzYZeBSo5EvjMowfJCGx6nHaryiiu48+ZXVoQiJi0Gg3cUfxCRcmiajqybLOdaVupbqHcpg4dW3HKUeu6bOfzFL4NWmDWWTGZD1uVth/QrAEgVDUywalM5cR+yQNNzMEfRiqia13UuBXNwBHsyt6WDY5UdjQXI829FgbOKISXj2cpFuaw8aybqiNNuFykbI7/GYc/aKTVc6Zt79UgPcLID/hFA0GfxUaDLIjCYZv1FxW+S8nV15/fVo6J9pVYZOmIW//6SHONV9D/xcAg6rvJ6+px2hs= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4e414a75-8135-47f4-0ba7-08d69b54c501 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Feb 2019 19:09:30.2340 (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: DM6PR12MB3451 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1551121801; bh=RX1DoV3TJvcERFXrLcyg3qdCQBO2uMT8d9O2ftdNifk=; h=X-PGP-Universal:From:To:CC: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-ms-office365-filtering-correlation-id:x-microsoft-antispam: x-ms-traffictypediagnostic:x-microsoft-exchange-diagnostics: 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=MOg4zdektlkvk9bxC6XG2mEYz+KqIk63a1Yp1m6d+6NLcQxqbovHqyuhQEOjvPvTD MgQedx1oWAtjVrm5vKiVqeotYLOAxitNnPQxknROXNZc4GfQ6fAoe7u48EezFiq0dC +yNpOZrKAm5c84G1IbU9sEbsQzXDmyXNvkhOqR0hGsrpo0xgX58EnJZtOgt2paF7dm +FBsMhDfzzXNhzDKrOhItvfPR0/q8xbLJyIPeLh6gWZByEQh3QiBYK+xHoiOqrpaq6 Z5kJ9+RaiSKMYg7m4bJjCDAMBcYLsn6NHBbAIy+YtnaFM6DV+YoVvt2XwPoNovi8k9 ddrujbApwLcdQ== Subject: Re: [PATCH] MdePkg/UefiLib: Simplify protocol un/installation abstraction 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, 25 Feb 2019 19:15:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Mike, Do you have any update on this change yet? Thanks Ashish -----Original Message----- From: Kinney, Michael D =20 Sent: Tuesday, February 19, 2019 12:56 PM To: Ashish Singhal ; edk2-devel@lists.01.org; Kinn= ey, Michael D Cc: Gao, Liming Subject: RE: [PATCH] MdePkg/UefiLib: Simplify protocol un/installation abst= raction Ashish, Thanks for looking at simplifying this logic again. I have not had a chance to run the size analysis yet. I will get back to you in a couple of days. Thanks, Mike > -----Original Message----- > From: Ashish Singhal [mailto:ashishsingha@nvidia.com] > Sent: Tuesday, February 19, 2019 8:19 AM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; > Gao, Liming > Subject: RE: [PATCH] MdePkg/UefiLib: Simplify protocol > un/installation abstraction >=20 > Hello Mike/Lao, >=20 > Were you able to have a look at this? >=20 > Thanks > Ashish >=20 > -----Original Message----- > From: Ashish Singhal > Sent: Monday, February 4, 2019 1:16 PM > To: edk2-devel@lists.01.org > Cc: michael.d.kinney@intel.com; liming.gao@intel.com; > Ashish Singhal > Subject: [PATCH] MdePkg/UefiLib: Simplify protocol > un/installation abstraction >=20 > Add helper functions to operate upon protocol > installation and > uninstallation instead of every function doing it by > itself. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ashish Singhal > --- > MdePkg/Library/UefiLib/UefiDriverModel.c | 2040 +++++- > ------------------------ > 1 file changed, 342 insertions(+), 1698 deletions(-) >=20 > diff --git a/MdePkg/Library/UefiLib/UefiDriverModel.c > b/MdePkg/Library/UefiLib/UefiDriverModel.c > index 262d8bc..268edf7 100644 > --- a/MdePkg/Library/UefiLib/UefiDriverModel.c > +++ b/MdePkg/Library/UefiLib/UefiDriverModel.c > @@ -17,6 +17,290 @@ >=20 > #include "UefiLibInternal.h" >=20 > + > +#define MAX_SUPPORTED_PROTOCOLS 7 > +typedef struct { > + EFI_GUID *Guid; > + VOID *Interface; > +} EFI_PROCESS_PROTOCOL; > + > + > +static > +EFI_STATUS > +EFIAPI > +EfiLibProcessProtocols ( > + IN CONST EFI_HANDLE > ImageHandle, > + IN EFI_DRIVER_BINDING_PROTOCOL > *DriverBinding, > + IN EFI_HANDLE > DriverBindingHandle, > + IN BOOLEAN Install, > + IN CONST EFI_PROCESS_PROTOCOL > *ProtocolArray > + ) > +{ > + ASSERT (DriverBinding !=3D NULL); > + ASSERT (ProtocolArray !=3D NULL); > + > + if (Install) { > + // > + // Update the ImageHandle and DriverBindingHandle > fields of the Driver Binding Protocol > + // > + DriverBinding->ImageHandle =3D ImageHandle; > + DriverBinding->DriverBindingHandle =3D > DriverBindingHandle; > + > + return gBS->InstallMultipleProtocolInterfaces ( > + &DriverBinding->DriverBindingHandle, > + ProtocolArray[0].Guid, > ProtocolArray[0].Interface, > + ProtocolArray[1].Guid, > ProtocolArray[1].Interface, > + ProtocolArray[2].Guid, > ProtocolArray[2].Interface, > + ProtocolArray[3].Guid, > ProtocolArray[3].Interface, > + ProtocolArray[4].Guid, > ProtocolArray[4].Interface, > + ProtocolArray[5].Guid, > ProtocolArray[5].Interface, > + ProtocolArray[6].Guid, > ProtocolArray[6].Interface, > + NULL > + ); > + } else { > + return gBS->UninstallMultipleProtocolInterfaces ( > + DriverBinding->DriverBindingHandle, > + ProtocolArray[0].Guid, > ProtocolArray[0].Interface, > + ProtocolArray[1].Guid, > ProtocolArray[1].Interface, > + ProtocolArray[2].Guid, > ProtocolArray[2].Interface, > + ProtocolArray[3].Guid, > ProtocolArray[3].Interface, > + ProtocolArray[4].Guid, > ProtocolArray[4].Interface, > + ProtocolArray[5].Guid, > ProtocolArray[5].Interface, > + ProtocolArray[6].Guid, > ProtocolArray[6].Interface, > + NULL > + ); > + } > +} > + > + > + > +static > +EFI_STATUS > +EFIAPI > +EfiLibProcessAllDriverProtocols ( > + IN CONST EFI_HANDLE > ImageHandle, > + IN EFI_DRIVER_BINDING_PROTOCOL > *DriverBinding, > + IN EFI_HANDLE > DriverBindingHandle, > + IN BOOLEAN Install, > + IN CONST EFI_COMPONENT_NAME_PROTOCOL > *ComponentName, > + IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL > *DriverConfiguration, > + IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL > *DriverDiagnostics > + ) > +{ > + EFI_STATUS Status; > + EFI_PROCESS_PROTOCOL > ProtocolArray[MAX_SUPPORTED_PROTOCOLS]; > + UINT8 ProtocolCount; > + > + ASSERT (DriverBinding !=3D NULL); > + > + // > + // ZI the ProtocolArray structure. Both > InstallMultipleProtocolInterfaces > + // and UninstallMultipleProtocolInterfaces would > stop processing ProtocolArray > + // elements as soon as they encounter a NULL. > + // > + ZeroMem(ProtocolArray, sizeof(ProtocolArray)); > + ProtocolCount =3D 0; > + > + // > + // Populate ProtocolArray with valid protocol > interfaces. > + // > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverBindingProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D > DriverBinding; > + ProtocolCount++; > + > + if (ComponentName !=3D NULL && > !FeaturePcdGet(PcdComponentNameDisable)) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiComponentNameProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)ComponentName; > + ProtocolCount++; > + } > + > + if (DriverConfiguration !=3D NULL) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverConfigurationProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)DriverConfiguration; > + ProtocolCount++; > + } > + > + if (DriverDiagnostics !=3D NULL && > !FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverDiagnosticsProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)DriverDiagnostics; > + ProtocolCount++; > + } > + > + Status =3D EfiLibProcessProtocols ( > + ImageHandle, > + DriverBinding, > + DriverBindingHandle, > + Install, > + ProtocolArray > + ); > + > + // > + // ASSERT if the call to > InstallMultipleProtocolInterfaces() or > + // UninstallMultipleProtocolInterfaces() failed > + // > + ASSERT_EFI_ERROR (Status); > + > + return Status; > +} > + > + > + > +static > +EFI_STATUS > +EFIAPI > +EfiLibProcessDriverBindingComponentName2 ( > + IN CONST EFI_HANDLE > ImageHandle, > + IN EFI_DRIVER_BINDING_PROTOCOL > *DriverBinding, > + IN EFI_HANDLE > DriverBindingHandle, > + IN BOOLEAN Install, > + IN CONST EFI_COMPONENT_NAME_PROTOCOL > *ComponentName, > + IN CONST EFI_COMPONENT_NAME2_PROTOCOL > *ComponentName2 > + ) > +{ > + EFI_STATUS Status; > + EFI_PROCESS_PROTOCOL > ProtocolArray[MAX_SUPPORTED_PROTOCOLS]; > + UINT8 ProtocolCount; > + > + ASSERT (DriverBinding !=3D NULL); > + > + // > + // ZI the ProtocolArray structure. Both > InstallMultipleProtocolInterfaces > + // and UninstallMultipleProtocolInterfaces would > stop processing ProtocolArray > + // elements as soon as they encounter a NULL. > + // > + ZeroMem(ProtocolArray, sizeof(ProtocolArray)); > + ProtocolCount =3D 0; > + > + // > + // Populate ProtocolArray with valid protocol > interfaces. > + // > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverBindingProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D > DriverBinding; > + ProtocolCount++; > + > + if (ComponentName !=3D NULL && > !FeaturePcdGet(PcdComponentNameDisable)) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiComponentNameProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)ComponentName; > + ProtocolCount++; > + } > + > + if (ComponentName2 !=3D NULL && > !FeaturePcdGet(PcdComponentName2Disable)) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiComponentName2ProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)ComponentName2; > + ProtocolCount++; > + } > + > + Status =3D EfiLibProcessProtocols ( > + ImageHandle, > + DriverBinding, > + DriverBindingHandle, > + Install, > + ProtocolArray > + ); > + > + // > + // ASSERT if the call to > InstallMultipleProtocolInterfaces() or > + // UninstallMultipleProtocolInterfaces() failed > + // > + ASSERT_EFI_ERROR (Status); > + > + return Status; > +} > + > + > + > +static > +EFI_STATUS > +EFIAPI > +EfiLibProcessAllDriverProtocols2 ( > + IN CONST EFI_HANDLE > ImageHandle, > + IN EFI_DRIVER_BINDING_PROTOCOL > *DriverBinding, > + IN EFI_HANDLE > DriverBindingHandle, > + IN BOOLEAN Install, > + IN CONST EFI_COMPONENT_NAME_PROTOCOL > *ComponentName, > + IN CONST EFI_COMPONENT_NAME2_PROTOCOL > *ComponentName2, > + IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL > *DriverConfiguration, > + IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL > *DriverConfiguration2, > + IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL > *DriverDiagnostics, > + IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL > *DriverDiagnostics2 > + ) > +{ > + EFI_STATUS Status; > + EFI_PROCESS_PROTOCOL > ProtocolArray[MAX_SUPPORTED_PROTOCOLS]; > + UINT8 ProtocolCount; > + > + ASSERT (DriverBinding !=3D NULL); > + > + // > + // ZI the ProtocolArray structure. Both > InstallMultipleProtocolInterfaces > + // and UninstallMultipleProtocolInterfaces would > stop processing ProtocolArray > + // elements as soon as they encounter a NULL. > + // > + ZeroMem(ProtocolArray, sizeof(ProtocolArray)); > + ProtocolCount =3D 0; > + > + // > + // Populate ProtocolArray with valid protocol > interfaces. > + // > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverBindingProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D > DriverBinding; > + ProtocolCount++; > + > + if (ComponentName !=3D NULL && > !FeaturePcdGet(PcdComponentNameDisable)) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiComponentNameProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)ComponentName; > + ProtocolCount++; > + } > + > + if (ComponentName2 !=3D NULL && > !FeaturePcdGet(PcdComponentName2Disable)) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiComponentName2ProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)ComponentName2; > + ProtocolCount++; > + } > + > + if (DriverConfiguration !=3D NULL) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverConfigurationProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)DriverConfiguration; > + ProtocolCount++; > + } > + > + if (DriverConfiguration2 !=3D NULL) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverConfiguration2ProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)DriverConfiguration2; > + ProtocolCount++; > + } > + > + if (DriverDiagnostics !=3D NULL && > !FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverDiagnosticsProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)DriverDiagnostics; > + ProtocolCount++; > + } > + > + if (DriverDiagnostics2 !=3D NULL && > !FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > + ProtocolArray[ProtocolCount].Guid =3D > &gEfiDriverDiagnostics2ProtocolGuid; > + ProtocolArray[ProtocolCount].Interface =3D (VOID > *)DriverDiagnostics2; > + ProtocolCount++; > + } > + > + Status =3D EfiLibProcessProtocols ( > + ImageHandle, > + DriverBinding, > + DriverBindingHandle, > + Install, > + ProtocolArray > + ); > + > + // > + // ASSERT if the call to > InstallMultipleProtocolInterfaces() or > + // UninstallMultipleProtocolInterfaces() failed > + // > + ASSERT_EFI_ERROR (Status); > + > + return Status; > +} > + > + > + > /** > Installs and completes the initialization of a > Driver Binding Protocol instance. >=20 > @@ -148,96 +432,15 @@ EfiLibInstallAllDriverProtocols ( > IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL > *DriverDiagnostics OPTIONAL > ) > { > - EFI_STATUS Status; > - > - ASSERT (DriverBinding !=3D NULL); > - > - // > - // Update the ImageHandle and DriverBindingHandle > fields of the Driver Binding Protocol > - // > - DriverBinding->ImageHandle =3D ImageHandle; > - DriverBinding->DriverBindingHandle =3D > DriverBindingHandle; > - > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverConfiguration =3D=3D NULL) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - NULL > - ); > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } > - } > - } else { > - if (DriverConfiguration =3D=3D NULL) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - Status =3D gBS->InstallMultipleProtocolInterfaces > ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, > DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, > DriverDiagnostics, > - NULL > - ); > - } > - } > - } > - > - // > - // ASSERT if the call to > InstallMultipleProtocolInterfaces() failed > - // > - ASSERT_EFI_ERROR (Status); > - > - return Status; > + return EfiLibProcessAllDriverProtocols ( > + ImageHandle, > + DriverBinding, > + DriverBindingHandle, > + TRUE, > + ComponentName, > + DriverConfiguration, > + DriverDiagnostics > + ); > } >=20 >=20 > @@ -267,90 +470,15 @@ EfiLibUninstallAllDriverProtocols > ( > IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL > *DriverDiagnostics OPTIONAL > ) > { > - EFI_STATUS Status; > - > - ASSERT (DriverBinding !=3D NULL); > - > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverConfiguration =3D=3D NULL) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - NULL > - ); > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } > - } > - } else { > - if (DriverConfiguration =3D=3D NULL) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, > DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, > DriverDiagnostics, > - NULL > - ); > - } > - } > - } > - > - // > - // ASSERT if the call to > UninstallMultipleProtocolInterfaces() failed > - // > - ASSERT_EFI_ERROR (Status); > - > - return Status; > + return EfiLibProcessAllDriverProtocols ( > + NULL, > + DriverBinding, > + NULL, > + FALSE, > + ComponentName, > + DriverConfiguration, > + DriverDiagnostics > + ); > } >=20 >=20 > @@ -389,56 +517,14 @@ > EfiLibInstallDriverBindingComponentName2 ( > IN CONST EFI_COMPONENT_NAME2_PROTOCOL > *ComponentName2 OPTIONAL > ) > { > - EFI_STATUS Status; > - > - ASSERT (DriverBinding !=3D NULL); > - > - // > - // Update the ImageHandle and DriverBindingHandle > fields of the Driver Binding Protocol > - // > - DriverBinding->ImageHandle =3D ImageHandle; > - DriverBinding->DriverBindingHandle =3D > DriverBindingHandle; > - > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS->InstallMultipleProtocolInterfaces > ( > - &DriverBinding- > >DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > DriverBinding, > - NULL > - ); > - } else { > - Status =3D gBS->InstallMultipleProtocolInterfaces > ( > - &DriverBinding- > >DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > DriverBinding, > - &gEfiComponentName2ProtocolGuid, > ComponentName2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS->InstallMultipleProtocolInterfaces > ( > - &DriverBinding- > >DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > DriverBinding, > - &gEfiComponentNameProtocolGuid, > ComponentName, > - NULL > - ); > - } else { > - Status =3D gBS->InstallMultipleProtocolInterfaces > ( > - &DriverBinding- > >DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > DriverBinding, > - &gEfiComponentNameProtocolGuid, > ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - NULL > - ); > - } > - } > - > - // > - // ASSERT if the call to > InstallMultipleProtocolInterfaces() failed > - // > - ASSERT_EFI_ERROR (Status); > - > - return Status; > + return EfiLibProcessDriverBindingComponentName2 ( > + ImageHandle, > + DriverBinding, > + DriverBindingHandle, > + TRUE, > + ComponentName, > + ComponentName2 > + ); > } >=20 >=20 > @@ -465,50 +551,14 @@ > EfiLibUninstallDriverBindingComponentName2 ( > IN CONST EFI_COMPONENT_NAME2_PROTOCOL > *ComponentName2 OPTIONAL > ) > { > - EFI_STATUS Status; > - > - ASSERT (DriverBinding !=3D NULL); > - > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > DriverBinding, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > DriverBinding, > - &gEfiComponentName2ProtocolGuid, > ComponentName2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > DriverBinding, > - &gEfiComponentNameProtocolGuid, > ComponentName, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > DriverBinding, > - &gEfiComponentNameProtocolGuid, > ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - NULL > - ); > - } > - } > - > - // > - // ASSERT if the call to > UninstallMultipleProtocolInterfaces() failed > - // > - ASSERT_EFI_ERROR (Status); > - > - return Status; > + return EfiLibProcessDriverBindingComponentName2 ( > + NULL, > + DriverBinding, > + NULL, > + FALSE, > + ComponentName, > + ComponentName2 > + ); > } >=20 >=20 > @@ -557,724 +607,18 @@ EfiLibInstallAllDriverProtocols2 > ( > IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL > *DriverDiagnostics2 OPTIONAL > ) > { > - EFI_STATUS Status; > - > - ASSERT (DriverBinding !=3D NULL); > - > - // > - // Update the ImageHandle and DriverBindingHandle > fields of the Driver Binding Protocol > - // > - DriverBinding->ImageHandle =3D ImageHandle; > - DriverBinding->DriverBindingHandle =3D > DriverBindingHandle; > - > - if (DriverConfiguration2 =3D=3D NULL) { > - if (DriverConfiguration =3D=3D NULL) { > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } else { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } > - } else { > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } else { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } > - } > - } else { > - if (DriverConfiguration =3D=3D NULL) { > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } else { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } > - } else { > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } else { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >InstallMultipleProtocolInterfaces ( > - &DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } > - } > - } > - > - // > - // ASSERT if the call to > InstallMultipleProtocolInterfaces() failed > - // > - ASSERT_EFI_ERROR (Status); > - > - return Status; > + return EfiLibProcessAllDriverProtocols2 ( > + ImageHandle, > + DriverBinding, > + DriverBindingHandle, > + TRUE, > + ComponentName, > + ComponentName2, > + DriverConfiguration, > + DriverConfiguration2, > + DriverDiagnostics, > + DriverDiagnostics2 > + ); > } >=20 >=20 > @@ -1311,716 +655,16 @@ > EfiLibUninstallAllDriverProtocols2 ( > IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL > *DriverDiagnostics2 OPTIONAL > ) > { > - EFI_STATUS Status; > - > - ASSERT (DriverBinding !=3D NULL); > - > - if (DriverConfiguration2 =3D=3D NULL) { > - if (DriverConfiguration =3D=3D NULL) { > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } else { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } > - } else { > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } else { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } > - } > - } else { > - if (DriverConfiguration =3D=3D NULL) { > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } else { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } > - } else { > - if (DriverDiagnostics =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnosticsDisable)) { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } else { > - if (DriverDiagnostics2 =3D=3D NULL || > FeaturePcdGet(PcdDriverDiagnostics2Disable)) { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - NULL > - ); > - } > - } > - } else { > - if (ComponentName =3D=3D NULL || > FeaturePcdGet(PcdComponentNameDisable)) { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } else { > - if (ComponentName2 =3D=3D NULL || > FeaturePcdGet(PcdComponentName2Disable)) { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } else { > - Status =3D gBS- > >UninstallMultipleProtocolInterfaces ( > - DriverBinding- > >DriverBindingHandle, > - > &gEfiDriverBindingProtocolGuid, DriverBinding, > - > &gEfiComponentNameProtocolGuid, ComponentName, > - > &gEfiComponentName2ProtocolGuid, ComponentName2, > - > &gEfiDriverConfigurationProtocolGuid, > DriverConfiguration, > - > &gEfiDriverConfiguration2ProtocolGuid, > DriverConfiguration2, > - > &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, > - > &gEfiDriverDiagnostics2ProtocolGuid, > DriverDiagnostics2, > - NULL > - ); > - } > - } > - } > - } > - } > - } > - > - // > - // ASSERT if the call to > UninstallMultipleProtocolInterfaces() failed > - // > - ASSERT_EFI_ERROR (Status); > - > - return Status; > + return EfiLibProcessAllDriverProtocols2 ( > + NULL, > + DriverBinding, > + NULL, > + FALSE, > + ComponentName, > + ComponentName2, > + DriverConfiguration, > + DriverConfiguration2, > + DriverDiagnostics, > + DriverDiagnostics2 > + ); > } > -- > 2.7.4 >=20 > ------------------------------------------------------- > ---------------------------- > 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. > ------------------------------------------------------- > ----------------------------