From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 902A7211B1112 for ; Sun, 6 Jan 2019 16:32:57 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jan 2019 16:32:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,448,1539673200"; d="scan'208";a="132099998" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 06 Jan 2019 16:32:56 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 6 Jan 2019 16:32:55 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 6 Jan 2019 16:32:54 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.44]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.160]) with mapi id 14.03.0415.000; Mon, 7 Jan 2019 08:32:53 +0800 From: "Gao, Liming" To: Ashish Singhal , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH v2 3/4] MdePkg/UefiLib: Simplify protocol un/installation abstraction Thread-Index: AQHUpIIxPLdqwsXsykSSC2J3A08KAqWi9pyg Date: Mon, 7 Jan 2019 00:32:52 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3ACA33@SHSMSX152.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 3/4] 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, 07 Jan 2019 00:32:57 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ashish: UefiLib implementation simplification doesn't require to change library A= PIs. UninstallApi() interfaces are not required to be updated. Below Instal= l API can still be kept. I don't think we need to keep the same interfaces = for Install and Uninstall APIs.=20 EfiLibUninstallAllDriverProtocols2 ( IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTION= AL IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTION= AL IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTION= AL IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2, OPTION= AL IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTION= AL IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTION= AL ); Thanks Liming >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >Ashish Singhal >Sent: Saturday, January 05, 2019 7:07 AM >To: edk2-devel@lists.01.org >Cc: Ashish Singhal >Subject: [edk2] [PATCH v2 3/4] MdePkg/UefiLib: Simplify protocol >un/installation abstraction > >Add a helper function to operate upon protocol installation and >uninstallation instead of every function doing it by itself. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Ashish Singhal >--- > MdePkg/Include/Library/UefiLib.h | 26 +- > MdePkg/Library/UefiLib/UefiDriverModel.c | 1980 ++++---------------------= ----- > 2 files changed, 270 insertions(+), 1736 deletions(-) > >diff --git a/MdePkg/Include/Library/UefiLib.h >b/MdePkg/Include/Library/UefiLib.h >index 08222d4..fbc9739 100644 >--- a/MdePkg/Include/Library/UefiLib.h >+++ b/MdePkg/Include/Library/UefiLib.h >@@ -1323,7 +1323,10 @@ EfiLibInstallDriverBinding ( > If DriverBinding is NULL, then ASSERT(). > If DriverBinding can not be uninstalled, then ASSERT(). > >+ @param ImageHandle The image handle of the driver. >+ @param SystemTable The EFI System Table that was passed to th= e >driver's entry point. > @param DriverBinding A Driver Binding Protocol instance that th= is driver >produced. >+ @param DriverBindingHandle The handle that DriverBinding is to be >installed onto. > > @retval EFI_SUCCESS The protocol uninstallation successfully >completed. > @retval Others Status from gBS- >>UninstallMultipleProtocolInterfaces(). >@@ -1332,7 +1335,10 @@ EfiLibInstallDriverBinding ( > EFI_STATUS > EFIAPI > EfiLibUninstallDriverBinding ( >- IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding >+ IN CONST EFI_HANDLE ImageHandle, >+ IN CONST EFI_SYSTEM_TABLE *SystemTable, >+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, >+ IN EFI_HANDLE DriverBindingHandle > ); > > >@@ -1382,7 +1388,10 @@ EfiLibInstallAllDriverProtocols ( > If DriverBinding is NULL, then ASSERT(). > If the uninstallation fails, then ASSERT(). > >+ @param ImageHandle The image handle of the driver. >+ @param SystemTable The EFI System Table that was passed to th= e >driver's entry point. > @param DriverBinding A Driver Binding Protocol instance that th= is driver >produced. >+ @param DriverBindingHandle The handle that DriverBinding is to be >installed onto. > @param ComponentName A Component Name Protocol instance that >this driver produced. > @param DriverConfiguration A Driver Configuration Protocol instance t= hat >this driver produced. > @param DriverDiagnostics A Driver Diagnostics Protocol instance tha= t this >driver produced. >@@ -1394,7 +1403,10 @@ EfiLibInstallAllDriverProtocols ( > EFI_STATUS > EFIAPI > EfiLibUninstallAllDriverProtocols ( >+ IN CONST EFI_HANDLE ImageHandle, >+ IN CONST EFI_SYSTEM_TABLE *SystemTable, > IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, >+ IN EFI_HANDLE DriverBindingHandle, > IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, >OPTIONAL > IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, >OPTIONAL > IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics >OPTIONAL >@@ -1442,7 +1454,10 @@ EfiLibInstallDriverBindingComponentName2 ( > If DriverBinding is NULL, then ASSERT(). > If the uninstallation fails, then ASSERT(). > >+ @param ImageHandle The image handle of the driver. >+ @param SystemTable The EFI System Table that was passed to th= e >driver's entry point. > @param DriverBinding A Driver Binding Protocol instance that th= is driver >produced. >+ @param DriverBindingHandle The handle that DriverBinding is to be >installed onto. > @param ComponentName A Component Name Protocol instance that >this driver produced. > @param ComponentName2 A Component Name 2 Protocol instance that >this driver produced. > >@@ -1453,7 +1468,10 @@ EfiLibInstallDriverBindingComponentName2 ( > EFI_STATUS > EFIAPI > EfiLibUninstallDriverBindingComponentName2 ( >+ IN CONST EFI_HANDLE ImageHandle, >+ IN CONST EFI_SYSTEM_TABLE *SystemTable, > IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, >+ IN EFI_HANDLE DriverBindingHandle, > IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, >OPTIONAL > IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 >OPTIONAL > ); >@@ -1512,7 +1530,10 @@ EfiLibInstallAllDriverProtocols2 ( > If the installation fails, then ASSERT(). > > >+ @param ImageHandle The image handle of the driver. >+ @param SystemTable The EFI System Table that was passed to t= he >driver's entry point. > @param DriverBinding A Driver Binding Protocol instance that t= his driver >produced. >+ @param DriverBindingHandle The handle that DriverBinding is to be >installed onto. > @param ComponentName A Component Name Protocol instance that >this driver produced. > @param ComponentName2 A Component Name 2 Protocol instance >that this driver produced. > @param DriverConfiguration A Driver Configuration Protocol instance = that >this driver produced. >@@ -1527,7 +1548,10 @@ EfiLibInstallAllDriverProtocols2 ( > EFI_STATUS > EFIAPI > EfiLibUninstallAllDriverProtocols2 ( >+ IN CONST EFI_HANDLE ImageHandle, >+ IN CONST EFI_SYSTEM_TABLE *SystemTable, > IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, >+ IN EFI_HANDLE DriverBindingHandle, > IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, >OPTIONAL > IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, >OPTIONAL > IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, >OPTIONAL >diff --git a/MdePkg/Library/UefiLib/UefiDriverModel.c >b/MdePkg/Library/UefiLib/UefiDriverModel.c >index 262d8bc..600a2be 100644 >--- a/MdePkg/Library/UefiLib/UefiDriverModel.c >+++ b/MdePkg/Library/UefiLib/UefiDriverModel.c >@@ -17,6 +17,130 @@ > > #include "UefiLibInternal.h" > >+ >+#define MAX_SUPPORTED_PROTOCOLS 7 >+typedef struct { >+ EFI_GUID *Guid; >+ VOID *Interface; >+} EFI_PROCESS_PROTOCOL; >+ >+ >+static >+EFI_STATUS >+EFIAPI >+EfiLibProcessProtocol ( >+ 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 InstallMultipleProtocolInterfac= es >+ // 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 *)DriverConfiguratio= n; >+ ProtocolCount++; >+ } >+ >+ if (DriverConfiguration2 !=3D NULL) { >+ ProtocolArray[ProtocolCount].Guid =3D >&gEfiDriverConfiguration2ProtocolGuid; >+ ProtocolArray[ProtocolCount].Interface =3D (VOID *)DriverConfiguratio= n2; >+ ProtocolCount++; >+ } >+ >+ if (DriverDiagnostics !=3D NULL >&& !FeaturePcdGet(PcdDriverDiagnosticsDisable)) { >+ ProtocolArray[ProtocolCount].Guid =3D &gEfiDriverDiagnosticsProtocolG= uid; >+ ProtocolArray[ProtocolCount].Interface =3D (VOID *)DriverDiagnostics; >+ ProtocolCount++; >+ } >+ >+ if (DriverDiagnostics2 !=3D NULL >&& !FeaturePcdGet(PcdDriverDiagnostics2Disable)) { >+ ProtocolArray[ProtocolCount].Guid =3D &gEfiDriverDiagnostics2Protocol= Guid; >+ ProtocolArray[ProtocolCount].Interface =3D (VOID *)DriverDiagnostics2= ; >+ ProtocolCount++; >+ } >+ >+ if (Install) { >+ // >+ // Update the ImageHandle and DriverBindingHandle fields of the Drive= r >Binding Protocol >+ // >+ DriverBinding->ImageHandle =3D ImageHandle; >+ DriverBinding->DriverBindingHandle =3D DriverBindingHandle; >+ >+ Status =3D 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 { >+ Status =3D 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 >+ ); >+ } >+ >+ // >+ // 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. > >@@ -48,27 +172,18 @@ EfiLibInstallDriverBinding ( > IN EFI_HANDLE DriverBindingHandle > ) > { >- 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; >- >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBinding, >- NULL >- ); >- // >- // ASSERT if the call to InstallMultipleProtocolInterfaces() failed >- // >- ASSERT_EFI_ERROR (Status); >- >- return Status; >+ return EfiLibProcessProtocol ( >+ ImageHandle, >+ DriverBinding, >+ DriverBindingHandle, >+ TRUE, >+ NULL, >+ NULL, >+ NULL, >+ NULL, >+ NULL, >+ NULL >+ ); > } > > >@@ -79,7 +194,10 @@ EfiLibInstallDriverBinding ( > If DriverBinding is NULL, then ASSERT(). > If DriverBinding can not be uninstalled, then ASSERT(). > >+ @param ImageHandle The image handle of the driver. >+ @param SystemTable The EFI System Table that was passed to th= e >driver's entry point. > @param DriverBinding A Driver Binding Protocol instance that th= is driver >produced. >+ @param DriverBindingHandle The handle that DriverBinding is to be >installed onto. > > @retval EFI_SUCCESS The protocol uninstallation successfully >completed. > @retval Others Status from gBS- >>UninstallMultipleProtocolInterfaces(). >@@ -88,24 +206,24 @@ EfiLibInstallDriverBinding ( > EFI_STATUS > EFIAPI > EfiLibUninstallDriverBinding ( >- IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding >+ IN CONST EFI_HANDLE ImageHandle, >+ IN CONST EFI_SYSTEM_TABLE *SystemTable, >+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, >+ IN EFI_HANDLE DriverBindingHandle > ) > { >- EFI_STATUS Status; >- >- ASSERT (DriverBinding !=3D NULL); >- >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBinding, >- NULL >- ); >- // >- // ASSERT if the call to UninstallMultipleProtocolInterfaces() failed >- // >- ASSERT_EFI_ERROR (Status); >- >- return Status; >+ return EfiLibProcessProtocol ( >+ ImageHandle, >+ DriverBinding, >+ DriverBindingHandle, >+ FALSE, >+ NULL, >+ NULL, >+ NULL, >+ NULL, >+ NULL, >+ NULL >+ ); > } > > >@@ -148,96 +266,18 @@ 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, DriverConfi= guration, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, DriverConfi= guration, >- NULL >- ); >- } >- } >- } else { >- if (DriverConfiguration =3D=3D NULL) { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBinding= , >- &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnos= tics, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBinding= , >- &gEfiComponentNameProtocolGuid, ComponentName= , >- &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnos= tics, >- NULL >- ); >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, DriverConfi= guration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverDiagn= ostics, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, DriverConfi= guration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverDiagn= ostics, >- NULL >- ); >- } >- } >- } >- >- // >- // ASSERT if the call to InstallMultipleProtocolInterfaces() failed >- // >- ASSERT_EFI_ERROR (Status); >- >- return Status; >+ return EfiLibProcessProtocol ( >+ ImageHandle, >+ DriverBinding, >+ DriverBindingHandle, >+ TRUE, >+ ComponentName, >+ NULL, >+ DriverConfiguration, >+ NULL, >+ DriverDiagnostics, >+ NULL >+ ); > } > > >@@ -249,7 +289,10 @@ EfiLibInstallAllDriverProtocols ( > If DriverBinding is NULL, then ASSERT(). > If the uninstallation fails, then ASSERT(). > >+ @param ImageHandle The image handle of the driver. >+ @param SystemTable The EFI System Table that was passed to th= e >driver's entry point. > @param DriverBinding A Driver Binding Protocol instance that th= is driver >produced. >+ @param DriverBindingHandle The handle that DriverBinding is to be >installed onto. > @param ComponentName A Component Name Protocol instance that >this driver produced. > @param DriverConfiguration A Driver Configuration Protocol instance t= hat >this driver produced. > @param DriverDiagnostics A Driver Diagnostics Protocol instance tha= t this >driver produced. >@@ -261,96 +304,27 @@ EfiLibInstallAllDriverProtocols ( > EFI_STATUS > EFIAPI > EfiLibUninstallAllDriverProtocols ( >+ IN CONST EFI_HANDLE ImageHandle, >+ IN CONST EFI_SYSTEM_TABLE *SystemTable, > IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, >+ IN EFI_HANDLE DriverBindingHandle, > IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, >OPTIONAL > IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, >OPTIONAL > 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, DriverConfi= guration, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, DriverConfi= guration, >- NULL >- ); >- } >- } >- } else { >- if (DriverConfiguration =3D=3D NULL) { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBinding= , >- &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnos= tics, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBinding= , >- &gEfiComponentNameProtocolGuid, ComponentName= , >- &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnos= tics, >- NULL >- ); >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, DriverConfi= guration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverDiagn= ostics, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, DriverConfi= guration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverDiagn= ostics, >- NULL >- ); >- } >- } >- } >- >- // >- // ASSERT if the call to UninstallMultipleProtocolInterfaces() failed >- // >- ASSERT_EFI_ERROR (Status); >- >- return Status; >+ return EfiLibProcessProtocol ( >+ ImageHandle, >+ DriverBinding, >+ DriverBindingHandle, >+ FALSE, >+ ComponentName, >+ NULL, >+ DriverConfiguration, >+ NULL, >+ DriverDiagnostics, >+ NULL >+ ); > } > > >@@ -389,56 +363,18 @@ 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 EfiLibProcessProtocol ( >+ ImageHandle, >+ DriverBinding, >+ DriverBindingHandle, >+ TRUE, >+ ComponentName, >+ ComponentName2, >+ NULL, >+ NULL, >+ NULL, >+ NULL >+ ); > } > > >@@ -449,7 +385,10 @@ EfiLibInstallDriverBindingComponentName2 ( > If DriverBinding is NULL, then ASSERT(). > If the uninstallation fails, then ASSERT(). > >+ @param ImageHandle The image handle of the driver. >+ @param SystemTable The EFI System Table that was passed to th= e >driver's entry point. > @param DriverBinding A Driver Binding Protocol instance that th= is driver >produced. >+ @param DriverBindingHandle The handle that DriverBinding is to be >installed onto. > @param ComponentName A Component Name Protocol instance that >this driver produced. > @param ComponentName2 A Component Name 2 Protocol instance that >this driver produced. > >@@ -460,55 +399,26 @@ EfiLibInstallDriverBindingComponentName2 ( > EFI_STATUS > EFIAPI > EfiLibUninstallDriverBindingComponentName2 ( >+ IN CONST EFI_HANDLE ImageHandle, >+ IN CONST EFI_SYSTEM_TABLE *SystemTable, > IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, >+ IN EFI_HANDLE DriverBindingHandle, > IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, >OPTIONAL > 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 EfiLibProcessProtocol ( >+ ImageHandle, >+ DriverBinding, >+ DriverBindingHandle, >+ FALSE, >+ ComponentName, >+ ComponentName2, >+ NULL, >+ NULL, >+ NULL, >+ NULL >+ ); > } > > >@@ -557,724 +467,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, DriverBindi= ng, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->InstallMultipleProtocolInterfaces ( >- &DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } >- } >- } >- } >- } >- >- // >- // ASSERT if the call to InstallMultipleProtocolInterfaces() failed >- // >- ASSERT_EFI_ERROR (Status); >- >- return Status; >+ return EfiLibProcessProtocol ( >+ ImageHandle, >+ DriverBinding, >+ DriverBindingHandle, >+ TRUE, >+ ComponentName, >+ ComponentName2, >+ DriverConfiguration, >+ DriverConfiguration2, >+ DriverDiagnostics, >+ DriverDiagnostics2 >+ ); > } > > >@@ -1287,7 +491,10 @@ EfiLibInstallAllDriverProtocols2 ( > If the installation fails, then ASSERT(). > > >+ @param ImageHandle The image handle of the driver. >+ @param SystemTable The EFI System Table that was passed to t= he >driver's entry point. > @param DriverBinding A Driver Binding Protocol instance that t= his driver >produced. >+ @param DriverBindingHandle The handle that DriverBinding is to be >installed onto. > @param ComponentName A Component Name Protocol instance that >this driver produced. > @param ComponentName2 A Component Name 2 Protocol instance >that this driver produced. > @param DriverConfiguration A Driver Configuration Protocol instance = that >this driver produced. >@@ -1302,7 +509,10 @@ EfiLibInstallAllDriverProtocols2 ( > EFI_STATUS > EFIAPI > EfiLibUninstallAllDriverProtocols2 ( >+ IN CONST EFI_HANDLE ImageHandle, >+ IN CONST EFI_SYSTEM_TABLE *SystemTable, > IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, >+ IN EFI_HANDLE DriverBindingHandle, > IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, >OPTIONAL > IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, >OPTIONAL > IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, >OPTIONAL >@@ -1311,716 +521,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, DriverBindi= ng, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- 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, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- NULL >- ); >- } >- } >- } else { >- if (ComponentName =3D=3D NULL || >FeaturePcdGet(PcdComponentNameDisable)) { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } else { >- if (ComponentName2 =3D=3D NULL || >FeaturePcdGet(PcdComponentName2Disable)) { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } else { >- Status =3D gBS->UninstallMultipleProtocolInterfaces ( >- DriverBinding->DriverBindingHandle, >- &gEfiDriverBindingProtocolGuid, DriverBindi= ng, >- &gEfiComponentNameProtocolGuid, ComponentNa= me, >- &gEfiComponentName2ProtocolGuid, ComponentN= ame2, >- &gEfiDriverConfigurationProtocolGuid, Drive= rConfiguration, >- &gEfiDriverConfiguration2ProtocolGuid, Driv= erConfiguration2, >- &gEfiDriverDiagnosticsProtocolGuid, DriverD= iagnostics, >- &gEfiDriverDiagnostics2ProtocolGuid, Driver= Diagnostics2, >- NULL >- ); >- } >- } >- } >- } >- } >- } >- >- // >- // ASSERT if the call to UninstallMultipleProtocolInterfaces() failed >- // >- ASSERT_EFI_ERROR (Status); >- >- return Status; >+ return EfiLibProcessProtocol ( >+ ImageHandle, >+ DriverBinding, >+ DriverBindingHandle, >+ FALSE, >+ ComponentName, >+ ComponentName2, >+ DriverConfiguration, >+ DriverConfiguration2, >+ DriverDiagnostics, >+ DriverDiagnostics2 >+ ); > } >-- >2.7.4 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel