Update the implementation of EfiLibInstallAllDriverBinding2().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6419 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
def220c4e5
commit
3a6779fa22
@ -2,7 +2,7 @@
|
|||||||
Library functions that abstract driver model protocols
|
Library functions that abstract driver model protocols
|
||||||
installation.
|
installation.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation<BR> All rights
|
Copyright (c) 2006 - 2008, Intel Corporation<BR> All rights
|
||||||
reserved. This program and the accompanying materials are
|
reserved. This program and the accompanying materials are
|
||||||
licensed and made available under the terms and conditions of the BSD License
|
licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -44,7 +44,7 @@ EfiLibInstallDriverBinding (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
ASSERT (NULL != DriverBinding);
|
ASSERT (DriverBinding != NULL);
|
||||||
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&DriverBindingHandle,
|
&DriverBindingHandle,
|
||||||
@ -101,7 +101,7 @@ EfiLibInstallAllDriverProtocols (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
ASSERT (NULL != DriverBinding);
|
ASSERT (DriverBinding != NULL);
|
||||||
|
|
||||||
if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {
|
if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {
|
||||||
if (DriverConfiguration == NULL) {
|
if (DriverConfiguration == NULL) {
|
||||||
@ -225,7 +225,7 @@ EfiLibInstallDriverBindingComponentName2 (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
ASSERT (NULL != DriverBinding);
|
ASSERT (DriverBinding != NULL);
|
||||||
|
|
||||||
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
@ -292,6 +292,7 @@ EfiLibInstallDriverBindingComponentName2 (
|
|||||||
@param ComponentName A Component Name Protocol instance that this driver is producing.
|
@param ComponentName A Component Name Protocol instance that this driver is producing.
|
||||||
@param ComponentName2 A Component Name 2 Protocol instance that this driver is producing.
|
@param ComponentName2 A Component Name 2 Protocol instance that this driver is producing.
|
||||||
@param DriverConfiguration A Driver Configuration Protocol instance that this driver is producing.
|
@param DriverConfiguration A Driver Configuration Protocol instance that this driver is producing.
|
||||||
|
@param DriverConfiguration2 A Driver Configuration Protocol 2 instance that this driver is producing.
|
||||||
@param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing.
|
@param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing.
|
||||||
@param DriverDiagnostics2 A Driver Diagnostics Protocol 2 instance that this driver is producing.
|
@param DriverDiagnostics2 A Driver Diagnostics Protocol 2 instance that this driver is producing.
|
||||||
|
|
||||||
@ -309,14 +310,16 @@ EfiLibInstallAllDriverProtocols2 (
|
|||||||
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL
|
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL
|
||||||
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL
|
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL
|
||||||
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL
|
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL
|
||||||
|
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration2, OPTIONAL
|
||||||
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL
|
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL
|
||||||
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
|
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
ASSERT (NULL != DriverBinding);
|
ASSERT (DriverBinding != NULL);
|
||||||
|
|
||||||
|
if (DriverConfiguration2 == NULL) {
|
||||||
if (DriverConfiguration == NULL) {
|
if (DriverConfiguration == NULL) {
|
||||||
if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {
|
if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {
|
||||||
if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {
|
if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {
|
||||||
@ -650,6 +653,374 @@ EfiLibInstallAllDriverProtocols2 (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (DriverConfiguration == NULL) {
|
||||||
|
if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {
|
||||||
|
if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {
|
||||||
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {
|
||||||
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {
|
||||||
|
if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {
|
||||||
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {
|
||||||
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
|
&DriverBindingHandle,
|
||||||
|
&gEfiDriverBindingProtocolGuid, DriverBinding,
|
||||||
|
&gEfiComponentNameProtocolGuid, ComponentName,
|
||||||
|
&gEfiComponentName2ProtocolGuid, ComponentName2,
|
||||||
|
&gEfiDriverConfigurationProtocolGuid, DriverConfiguration,
|
||||||
|
&gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,
|
||||||
|
&gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,
|
||||||
|
&gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ASSERT if the call to InstallMultipleProtocolInterfaces() failed
|
// ASSERT if the call to InstallMultipleProtocolInterfaces() failed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user