]>
Commit | Line | Data |
---|---|---|
e811b22f | 1 | /** @file\r |
2 | Library functions that abstract driver model protocols\r | |
0290fca2 | 3 | installation and uninstallation.\r |
e811b22f | 4 | \r |
0290fca2 | 5 | Copyright (c) 2019, NVIDIA Corporation. All rights reserved.\r |
9095d37b | 6 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
19388d29 | 7 | This program and the accompanying materials are\r |
e811b22f | 8 | licensed and made available under the terms and conditions of the BSD License\r |
9 | which accompanies this distribution. The full text of the license may be found at\r | |
2fc59a00 | 10 | http://opensource.org/licenses/bsd-license.php.\r |
9095d37b | 11 | \r |
e811b22f | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
9095d37b | 15 | **/\r |
e811b22f | 16 | \r |
1efcc4ae | 17 | \r |
f734a10a | 18 | #include "UefiLibInternal.h"\r |
e811b22f | 19 | \r |
20 | /**\r | |
cf8ae2f6 | 21 | Installs and completes the initialization of a Driver Binding Protocol instance.\r |
9095d37b | 22 | \r |
cf8ae2f6 | 23 | Installs the Driver Binding Protocol specified by DriverBinding onto the handle\r |
24 | specified by DriverBindingHandle. If DriverBindingHandle is NULL, then DriverBinding\r | |
25 | is installed onto a newly created handle. DriverBindingHandle is typically the same\r | |
26 | as the driver's ImageHandle, but it can be different if the driver produces multiple\r | |
9095d37b LG |
27 | Driver Binding Protocols.\r |
28 | If DriverBinding is NULL, then ASSERT().\r | |
cf8ae2f6 | 29 | If DriverBinding can not be installed onto a handle, then ASSERT().\r |
30 | \r | |
31 | @param ImageHandle The image handle of the driver.\r | |
32 | @param SystemTable The EFI System Table that was passed to the driver's entry point.\r | |
33 | @param DriverBinding A Driver Binding Protocol instance that this driver is producing.\r | |
34 | @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this\r | |
35 | parameter is NULL, then a new handle is created.\r | |
36 | \r | |
58380e9c | 37 | @retval EFI_SUCCESS The protocol installation successfully completed.\r |
cf8ae2f6 | 38 | @retval EFI_OUT_OF_RESOURCES There was not enough system resources to install the protocol.\r |
39 | @retval Others Status from gBS->InstallMultipleProtocolInterfaces().\r | |
e811b22f | 40 | \r |
41 | **/\r | |
42 | EFI_STATUS\r | |
43 | EFIAPI\r | |
44 | EfiLibInstallDriverBinding (\r | |
f662c194 | 45 | IN CONST EFI_HANDLE ImageHandle,\r |
46 | IN CONST EFI_SYSTEM_TABLE *SystemTable,\r | |
e811b22f | 47 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r |
48 | IN EFI_HANDLE DriverBindingHandle\r | |
49 | )\r | |
50 | {\r | |
51 | EFI_STATUS Status;\r | |
52 | \r | |
3a6779fa | 53 | ASSERT (DriverBinding != NULL);\r |
e811b22f | 54 | \r |
de27b8f0 RN |
55 | //\r |
56 | // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r | |
57 | //\r | |
58 | DriverBinding->ImageHandle = ImageHandle;\r | |
59 | DriverBinding->DriverBindingHandle = DriverBindingHandle;\r | |
60 | \r | |
e811b22f | 61 | Status = gBS->InstallMultipleProtocolInterfaces (\r |
de27b8f0 | 62 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 63 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
64 | NULL\r | |
65 | );\r | |
66 | //\r | |
67 | // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r | |
68 | //\r | |
69 | ASSERT_EFI_ERROR (Status);\r | |
70 | \r | |
e811b22f | 71 | return Status;\r |
72 | }\r | |
73 | \r | |
f662c194 | 74 | \r |
0290fca2 AS |
75 | \r |
76 | /**\r | |
77 | Uninstalls a Driver Binding Protocol instance.\r | |
78 | \r | |
79 | If DriverBinding is NULL, then ASSERT().\r | |
80 | If DriverBinding can not be uninstalled, then ASSERT().\r | |
81 | \r | |
82 | @param DriverBinding A Driver Binding Protocol instance that this driver produced.\r | |
83 | \r | |
84 | @retval EFI_SUCCESS The protocol uninstallation successfully completed.\r | |
85 | @retval Others Status from gBS->UninstallMultipleProtocolInterfaces().\r | |
86 | \r | |
87 | **/\r | |
88 | EFI_STATUS\r | |
89 | EFIAPI\r | |
90 | EfiLibUninstallDriverBinding (\r | |
91 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding\r | |
92 | )\r | |
93 | {\r | |
94 | EFI_STATUS Status;\r | |
95 | \r | |
96 | ASSERT (DriverBinding != NULL);\r | |
97 | \r | |
98 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
99 | DriverBinding->DriverBindingHandle,\r | |
100 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
101 | NULL\r | |
102 | );\r | |
103 | //\r | |
104 | // ASSERT if the call to UninstallMultipleProtocolInterfaces() failed\r | |
105 | //\r | |
106 | ASSERT_EFI_ERROR (Status);\r | |
107 | \r | |
108 | return Status;\r | |
109 | }\r | |
110 | \r | |
111 | \r | |
112 | \r | |
e811b22f | 113 | /**\r |
cf8ae2f6 | 114 | Installs and completes the initialization of a Driver Binding Protocol instance and\r |
115 | optionally installs the Component Name, Driver Configuration and Driver Diagnostics Protocols.\r | |
116 | \r | |
117 | Initializes a driver by installing the Driver Binding Protocol together with the\r | |
118 | optional Component Name, optional Driver Configure and optional Driver Diagnostic\r | |
119 | Protocols onto the driver's DriverBindingHandle. If DriverBindingHandle is NULL,\r | |
120 | then the protocols are installed onto a newly created handle. DriverBindingHandle\r | |
121 | is typically the same as the driver's ImageHandle, but it can be different if the\r | |
9095d37b LG |
122 | driver produces multiple Driver Binding Protocols.\r |
123 | If DriverBinding is NULL, then ASSERT().\r | |
cf8ae2f6 | 124 | If the installation fails, then ASSERT().\r |
9095d37b | 125 | \r |
cf8ae2f6 | 126 | @param ImageHandle The image handle of the driver.\r |
127 | @param SystemTable The EFI System Table that was passed to the driver's entry point.\r | |
128 | @param DriverBinding A Driver Binding Protocol instance that this driver is producing.\r | |
129 | @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this\r | |
130 | parameter is NULL, then a new handle is created.\r | |
131 | @param ComponentName A Component Name Protocol instance that this driver is producing.\r | |
132 | @param DriverConfiguration A Driver Configuration Protocol instance that this driver is producing.\r | |
133 | @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing.\r | |
134 | \r | |
58380e9c | 135 | @retval EFI_SUCCESS The protocol installation successfully completed.\r |
cf8ae2f6 | 136 | @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.\r |
e811b22f | 137 | \r |
138 | **/\r | |
139 | EFI_STATUS\r | |
140 | EFIAPI\r | |
141 | EfiLibInstallAllDriverProtocols (\r | |
f662c194 | 142 | IN CONST EFI_HANDLE ImageHandle,\r |
143 | IN CONST EFI_SYSTEM_TABLE *SystemTable,\r | |
e811b22f | 144 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r |
145 | IN EFI_HANDLE DriverBindingHandle,\r | |
f662c194 | 146 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r |
147 | IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r | |
148 | IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL\r | |
e811b22f | 149 | )\r |
150 | {\r | |
151 | EFI_STATUS Status;\r | |
152 | \r | |
3a6779fa | 153 | ASSERT (DriverBinding != NULL);\r |
e811b22f | 154 | \r |
de27b8f0 RN |
155 | //\r |
156 | // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r | |
157 | //\r | |
158 | DriverBinding->ImageHandle = ImageHandle;\r | |
159 | DriverBinding->DriverBindingHandle = DriverBindingHandle;\r | |
9095d37b | 160 | \r |
e811b22f | 161 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r |
162 | if (DriverConfiguration == NULL) {\r | |
163 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
164 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 165 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 166 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
167 | NULL\r | |
168 | );\r | |
169 | } else {\r | |
170 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 171 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 172 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
173 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
174 | NULL\r | |
175 | );\r | |
176 | }\r | |
177 | } else {\r | |
178 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
179 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 180 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 181 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
182 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
183 | NULL\r | |
184 | );\r | |
185 | } else {\r | |
186 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 187 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 188 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
189 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
190 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
191 | NULL\r | |
192 | );\r | |
193 | }\r | |
194 | }\r | |
195 | } else {\r | |
196 | if (DriverConfiguration == NULL) {\r | |
197 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
198 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 199 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 200 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
201 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
202 | NULL\r | |
203 | );\r | |
204 | } else {\r | |
205 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 206 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 207 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
208 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
209 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
210 | NULL\r | |
211 | );\r | |
212 | }\r | |
213 | } else {\r | |
214 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
215 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 216 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 217 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
218 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
219 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
220 | NULL\r | |
221 | );\r | |
222 | } else {\r | |
223 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 224 | &DriverBinding->DriverBindingHandle,\r |
e811b22f | 225 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
226 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
227 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
228 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
229 | NULL\r | |
230 | );\r | |
231 | }\r | |
232 | }\r | |
233 | }\r | |
234 | \r | |
235 | //\r | |
236 | // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r | |
237 | //\r | |
238 | ASSERT_EFI_ERROR (Status);\r | |
239 | \r | |
e811b22f | 240 | return Status;\r |
241 | }\r | |
242 | \r | |
243 | \r | |
f662c194 | 244 | \r |
0290fca2 AS |
245 | /**\r |
246 | Uninstalls a Driver Binding Protocol instance and optionally uninstalls the\r | |
247 | Component Name, Driver Configuration and Driver Diagnostics Protocols.\r | |
248 | \r | |
249 | If DriverBinding is NULL, then ASSERT().\r | |
250 | If the uninstallation fails, then ASSERT().\r | |
251 | \r | |
252 | @param DriverBinding A Driver Binding Protocol instance that this driver produced.\r | |
253 | @param ComponentName A Component Name Protocol instance that this driver produced.\r | |
254 | @param DriverConfiguration A Driver Configuration Protocol instance that this driver produced.\r | |
255 | @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver produced.\r | |
256 | \r | |
257 | @retval EFI_SUCCESS The protocol uninstallation successfully completed.\r | |
258 | @retval Others Status from gBS->UninstallMultipleProtocolInterfaces().\r | |
259 | \r | |
260 | **/\r | |
261 | EFI_STATUS\r | |
262 | EFIAPI\r | |
263 | EfiLibUninstallAllDriverProtocols (\r | |
264 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r | |
265 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r | |
266 | IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r | |
267 | IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL\r | |
268 | )\r | |
269 | {\r | |
270 | EFI_STATUS Status;\r | |
271 | \r | |
272 | ASSERT (DriverBinding != NULL);\r | |
273 | \r | |
274 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
275 | if (DriverConfiguration == NULL) {\r | |
276 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
277 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
278 | DriverBinding->DriverBindingHandle,\r | |
279 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
280 | NULL\r | |
281 | );\r | |
282 | } else {\r | |
283 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
284 | DriverBinding->DriverBindingHandle,\r | |
285 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
286 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
287 | NULL\r | |
288 | );\r | |
289 | }\r | |
290 | } else {\r | |
291 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
292 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
293 | DriverBinding->DriverBindingHandle,\r | |
294 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
295 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
296 | NULL\r | |
297 | );\r | |
298 | } else {\r | |
299 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
300 | DriverBinding->DriverBindingHandle,\r | |
301 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
302 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
303 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
304 | NULL\r | |
305 | );\r | |
306 | }\r | |
307 | }\r | |
308 | } else {\r | |
309 | if (DriverConfiguration == NULL) {\r | |
310 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
311 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
312 | DriverBinding->DriverBindingHandle,\r | |
313 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
314 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
315 | NULL\r | |
316 | );\r | |
317 | } else {\r | |
318 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
319 | DriverBinding->DriverBindingHandle,\r | |
320 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
321 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
322 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
323 | NULL\r | |
324 | );\r | |
325 | }\r | |
326 | } else {\r | |
327 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
328 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
329 | DriverBinding->DriverBindingHandle,\r | |
330 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
331 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
332 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
333 | NULL\r | |
334 | );\r | |
335 | } else {\r | |
336 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
337 | DriverBinding->DriverBindingHandle,\r | |
338 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
339 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
340 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
341 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
342 | NULL\r | |
343 | );\r | |
344 | }\r | |
345 | }\r | |
346 | }\r | |
347 | \r | |
348 | //\r | |
349 | // ASSERT if the call to UninstallMultipleProtocolInterfaces() failed\r | |
350 | //\r | |
351 | ASSERT_EFI_ERROR (Status);\r | |
352 | \r | |
353 | return Status;\r | |
354 | }\r | |
355 | \r | |
356 | \r | |
357 | \r | |
e811b22f | 358 | /**\r |
cf8ae2f6 | 359 | Installs Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.\r |
360 | \r | |
361 | Initializes a driver by installing the Driver Binding Protocol together with the\r | |
362 | optional Component Name and optional Component Name 2 protocols onto the driver's\r | |
363 | DriverBindingHandle. If DriverBindingHandle is NULL, then the protocols are installed\r | |
364 | onto a newly created handle. DriverBindingHandle is typically the same as the driver's\r | |
9095d37b LG |
365 | ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols.\r |
366 | If DriverBinding is NULL, then ASSERT().\r | |
cf8ae2f6 | 367 | If the installation fails, then ASSERT().\r |
368 | \r | |
369 | @param ImageHandle The image handle of the driver.\r | |
370 | @param SystemTable The EFI System Table that was passed to the driver's entry point.\r | |
371 | @param DriverBinding A Driver Binding Protocol instance that this driver is producing.\r | |
372 | @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this\r | |
373 | parameter is NULL, then a new handle is created.\r | |
374 | @param ComponentName A Component Name Protocol instance that this driver is producing.\r | |
375 | @param ComponentName2 A Component Name 2 Protocol instance that this driver is producing.\r | |
376 | \r | |
58380e9c | 377 | @retval EFI_SUCCESS The protocol installation successfully completed.\r |
cf8ae2f6 | 378 | @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.\r |
f662c194 | 379 | \r |
380 | **/\r | |
381 | EFI_STATUS\r | |
382 | EFIAPI\r | |
383 | EfiLibInstallDriverBindingComponentName2 (\r | |
384 | IN CONST EFI_HANDLE ImageHandle,\r | |
385 | IN CONST EFI_SYSTEM_TABLE *SystemTable,\r | |
386 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r | |
387 | IN EFI_HANDLE DriverBindingHandle,\r | |
388 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r | |
389 | IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL\r | |
390 | )\r | |
391 | {\r | |
392 | EFI_STATUS Status;\r | |
393 | \r | |
3a6779fa | 394 | ASSERT (DriverBinding != NULL);\r |
f662c194 | 395 | \r |
de27b8f0 RN |
396 | //\r |
397 | // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r | |
398 | //\r | |
399 | DriverBinding->ImageHandle = ImageHandle;\r | |
400 | DriverBinding->DriverBindingHandle = DriverBindingHandle;\r | |
401 | \r | |
f662c194 | 402 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
403 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
404 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 405 | &DriverBinding->DriverBindingHandle,\r |
f662c194 | 406 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
407 | NULL\r | |
408 | );\r | |
409 | } else {\r | |
410 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 411 | &DriverBinding->DriverBindingHandle,\r |
f662c194 | 412 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
413 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
414 | NULL\r | |
415 | );\r | |
416 | }\r | |
417 | } else {\r | |
418 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
419 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 420 | &DriverBinding->DriverBindingHandle,\r |
f662c194 | 421 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
422 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
423 | NULL\r | |
424 | );\r | |
425 | } else {\r | |
426 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 427 | &DriverBinding->DriverBindingHandle,\r |
f662c194 | 428 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
429 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
430 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
431 | NULL\r | |
432 | );\r | |
433 | }\r | |
434 | }\r | |
de27b8f0 | 435 | \r |
f662c194 | 436 | //\r |
437 | // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r | |
438 | //\r | |
439 | ASSERT_EFI_ERROR (Status);\r | |
440 | \r | |
f662c194 | 441 | return Status;\r |
442 | }\r | |
443 | \r | |
444 | \r | |
445 | \r | |
0290fca2 AS |
446 | /**\r |
447 | Uninstalls Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.\r | |
448 | \r | |
449 | If DriverBinding is NULL, then ASSERT().\r | |
450 | If the uninstallation fails, then ASSERT().\r | |
451 | \r | |
452 | @param DriverBinding A Driver Binding Protocol instance that this driver produced.\r | |
453 | @param ComponentName A Component Name Protocol instance that this driver produced.\r | |
454 | @param ComponentName2 A Component Name 2 Protocol instance that this driver produced.\r | |
455 | \r | |
456 | @retval EFI_SUCCESS The protocol installation successfully completed.\r | |
457 | @retval Others Status from gBS->UninstallMultipleProtocolInterfaces().\r | |
458 | \r | |
459 | **/\r | |
460 | EFI_STATUS\r | |
461 | EFIAPI\r | |
462 | EfiLibUninstallDriverBindingComponentName2 (\r | |
463 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r | |
464 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r | |
465 | IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL\r | |
466 | )\r | |
467 | {\r | |
468 | EFI_STATUS Status;\r | |
469 | \r | |
470 | ASSERT (DriverBinding != NULL);\r | |
471 | \r | |
472 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
473 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
474 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
475 | DriverBinding->DriverBindingHandle,\r | |
476 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
477 | NULL\r | |
478 | );\r | |
479 | } else {\r | |
480 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
481 | DriverBinding->DriverBindingHandle,\r | |
482 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
483 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
484 | NULL\r | |
485 | );\r | |
486 | }\r | |
487 | } else {\r | |
488 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
489 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
490 | DriverBinding->DriverBindingHandle,\r | |
491 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
492 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
493 | NULL\r | |
494 | );\r | |
495 | } else {\r | |
496 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
497 | DriverBinding->DriverBindingHandle,\r | |
498 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
499 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
500 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
501 | NULL\r | |
502 | );\r | |
503 | }\r | |
504 | }\r | |
505 | \r | |
506 | //\r | |
507 | // ASSERT if the call to UninstallMultipleProtocolInterfaces() failed\r | |
508 | //\r | |
509 | ASSERT_EFI_ERROR (Status);\r | |
510 | \r | |
511 | return Status;\r | |
512 | }\r | |
513 | \r | |
514 | \r | |
515 | \r | |
f662c194 | 516 | /**\r |
cf8ae2f6 | 517 | Installs Driver Binding Protocol with optional Component Name, Component Name 2, Driver\r |
518 | Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.\r | |
519 | \r | |
520 | Initializes a driver by installing the Driver Binding Protocol together with the optional\r | |
63ba999c | 521 | Component Name, optional Component Name 2, optional Driver Configuration, optional Driver Configuration 2,\r |
522 | optional Driver Diagnostic, and optional Driver Diagnostic 2 Protocols onto the driver's DriverBindingHandle.\r | |
523 | DriverBindingHandle is typically the same as the driver's ImageHandle, but it can be different if the driver\r | |
9095d37b LG |
524 | produces multiple Driver Binding Protocols.\r |
525 | If DriverBinding is NULL, then ASSERT().\r | |
63ba999c | 526 | If the installation fails, then ASSERT().\r |
527 | \r | |
cf8ae2f6 | 528 | \r |
529 | @param ImageHandle The image handle of the driver.\r | |
530 | @param SystemTable The EFI System Table that was passed to the driver's entry point.\r | |
531 | @param DriverBinding A Driver Binding Protocol instance that this driver is producing.\r | |
28d3e14f | 532 | @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this\r |
cf8ae2f6 | 533 | parameter is NULL, then a new handle is created.\r |
534 | @param ComponentName A Component Name Protocol instance that this driver is producing.\r | |
535 | @param ComponentName2 A Component Name 2 Protocol instance that this driver is producing.\r | |
536 | @param DriverConfiguration A Driver Configuration Protocol instance that this driver is producing.\r | |
537 | @param DriverConfiguration2 A Driver Configuration Protocol 2 instance that this driver is producing.\r | |
538 | @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing.\r | |
539 | @param DriverDiagnostics2 A Driver Diagnostics Protocol 2 instance that this driver is producing.\r | |
540 | \r | |
58380e9c | 541 | @retval EFI_SUCCESS The protocol installation successfully completed.\r |
cf8ae2f6 | 542 | @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.\r |
e811b22f | 543 | \r |
544 | **/\r | |
545 | EFI_STATUS\r | |
546 | EFIAPI\r | |
547 | EfiLibInstallAllDriverProtocols2 (\r | |
f662c194 | 548 | IN CONST EFI_HANDLE ImageHandle,\r |
549 | IN CONST EFI_SYSTEM_TABLE *SystemTable,\r | |
e811b22f | 550 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r |
551 | IN EFI_HANDLE DriverBindingHandle,\r | |
3a6779fa | 552 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r |
553 | IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL\r | |
554 | IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r | |
8408411a | 555 | IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2, OPTIONAL\r |
3a6779fa | 556 | IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL\r |
557 | IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL\r | |
e811b22f | 558 | )\r |
559 | {\r | |
560 | EFI_STATUS Status;\r | |
561 | \r | |
9095d37b | 562 | ASSERT (DriverBinding != NULL);\r |
3a6779fa | 563 | \r |
de27b8f0 RN |
564 | //\r |
565 | // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r | |
566 | //\r | |
567 | DriverBinding->ImageHandle = ImageHandle;\r | |
568 | DriverBinding->DriverBindingHandle = DriverBindingHandle;\r | |
9095d37b | 569 | \r |
3a6779fa | 570 | if (DriverConfiguration2 == NULL) {\r |
571 | if (DriverConfiguration == NULL) {\r | |
572 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
573 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
574 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
575 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
576 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 577 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 578 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
579 | NULL\r | |
580 | );\r | |
581 | } else {\r | |
582 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 583 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 584 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
585 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
586 | NULL\r | |
587 | );\r | |
588 | }\r | |
e811b22f | 589 | } else {\r |
3a6779fa | 590 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
591 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 592 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 593 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
594 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
595 | NULL\r | |
596 | );\r | |
597 | } else {\r | |
598 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 599 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 600 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
601 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
602 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
603 | NULL\r | |
604 | );\r | |
605 | }\r | |
e811b22f | 606 | }\r |
607 | } else {\r | |
3a6779fa | 608 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
609 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
610 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 611 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 612 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
613 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
614 | NULL\r | |
615 | );\r | |
616 | } else {\r | |
617 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 618 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 619 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
620 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
621 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
622 | NULL\r | |
623 | );\r | |
624 | }\r | |
e811b22f | 625 | } else {\r |
3a6779fa | 626 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
627 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 628 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 629 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
630 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
631 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
632 | NULL\r | |
633 | );\r | |
634 | } else {\r | |
635 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 636 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 637 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
638 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
639 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
640 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
641 | NULL\r | |
642 | );\r | |
643 | }\r | |
e811b22f | 644 | }\r |
645 | }\r | |
646 | } else {\r | |
3a6779fa | 647 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r |
648 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
649 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
650 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 651 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 652 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
653 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
654 | NULL\r | |
655 | );\r | |
656 | } else {\r | |
657 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 658 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 659 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
660 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
661 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
662 | NULL\r | |
663 | );\r | |
664 | }\r | |
e811b22f | 665 | } else {\r |
3a6779fa | 666 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
667 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 668 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 669 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
670 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
671 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
672 | NULL\r | |
673 | );\r | |
674 | } else {\r | |
675 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 676 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 677 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
678 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
679 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
680 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
681 | NULL\r | |
682 | );\r | |
683 | }\r | |
e811b22f | 684 | }\r |
685 | } else {\r | |
3a6779fa | 686 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
687 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
688 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 689 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 690 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
691 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
692 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
693 | NULL\r | |
694 | );\r | |
695 | } else {\r | |
696 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 697 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 698 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
699 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
700 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
701 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
702 | NULL\r | |
703 | );\r | |
704 | }\r | |
e811b22f | 705 | } else {\r |
3a6779fa | 706 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
707 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 708 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 709 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
710 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
711 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
712 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
713 | NULL\r | |
714 | );\r | |
715 | } else {\r | |
716 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 717 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 718 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
719 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
720 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
721 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
722 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
723 | NULL\r | |
724 | );\r | |
725 | }\r | |
e811b22f | 726 | }\r |
727 | }\r | |
728 | }\r | |
729 | } else {\r | |
3a6779fa | 730 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r |
731 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
732 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
733 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
734 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 735 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 736 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
737 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
738 | NULL\r | |
739 | );\r | |
740 | } else {\r | |
741 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 742 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 743 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
744 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
745 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
746 | NULL\r | |
747 | );\r | |
748 | }\r | |
e811b22f | 749 | } else {\r |
3a6779fa | 750 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
751 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 752 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 753 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
754 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
755 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
756 | NULL\r | |
757 | );\r | |
758 | } else {\r | |
759 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 760 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 761 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
762 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
763 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
764 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
765 | NULL\r | |
766 | );\r | |
767 | }\r | |
e811b22f | 768 | }\r |
769 | } else {\r | |
3a6779fa | 770 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
771 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
772 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 773 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 774 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
775 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
776 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
777 | NULL\r | |
778 | );\r | |
779 | } else {\r | |
780 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 781 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 782 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
783 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
784 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
785 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
786 | NULL\r | |
787 | );\r | |
788 | }\r | |
e811b22f | 789 | } else {\r |
3a6779fa | 790 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
791 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 792 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 793 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
794 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
795 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
796 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
797 | NULL\r | |
798 | );\r | |
799 | } else {\r | |
800 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 801 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 802 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
803 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
804 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
805 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
806 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
807 | NULL\r | |
808 | );\r | |
809 | }\r | |
e811b22f | 810 | }\r |
811 | }\r | |
812 | } else {\r | |
3a6779fa | 813 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r |
814 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
815 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
816 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 817 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 818 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
819 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
820 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
821 | NULL\r | |
822 | );\r | |
823 | } else {\r | |
824 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 825 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 826 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
827 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
828 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
829 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
830 | NULL\r | |
831 | );\r | |
832 | }\r | |
e811b22f | 833 | } else {\r |
3a6779fa | 834 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
835 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 836 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 837 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
838 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
839 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
840 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
841 | NULL\r | |
842 | );\r | |
843 | } else {\r | |
844 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 845 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 846 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
847 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
848 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
849 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
850 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
851 | NULL\r | |
852 | );\r | |
853 | }\r | |
e811b22f | 854 | }\r |
855 | } else {\r | |
3a6779fa | 856 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
857 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
858 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 859 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 860 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
861 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
862 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
863 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
864 | NULL\r | |
865 | );\r | |
866 | } else {\r | |
867 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 868 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 869 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
870 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
871 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
872 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
873 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
874 | NULL\r | |
875 | );\r | |
876 | }\r | |
e811b22f | 877 | } else {\r |
3a6779fa | 878 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
879 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 880 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 881 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
882 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
883 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
884 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
885 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
886 | NULL\r | |
887 | );\r | |
888 | } else {\r | |
889 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 890 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 891 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
892 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
893 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
894 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
895 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
896 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
897 | NULL\r | |
898 | );\r | |
899 | }\r | |
e811b22f | 900 | }\r |
901 | }\r | |
902 | }\r | |
903 | }\r | |
904 | } else {\r | |
3a6779fa | 905 | if (DriverConfiguration == NULL) {\r |
906 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
907 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
908 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
909 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
910 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 911 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 912 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
913 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
914 | NULL\r | |
915 | );\r | |
916 | } else {\r | |
917 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 918 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 919 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
920 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
921 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
922 | NULL\r | |
923 | );\r | |
924 | }\r | |
e811b22f | 925 | } else {\r |
3a6779fa | 926 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
927 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 928 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 929 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
930 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
931 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
932 | NULL\r | |
933 | );\r | |
934 | } else {\r | |
935 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 936 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 937 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
938 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
939 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
940 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
941 | NULL\r | |
942 | );\r | |
943 | }\r | |
e811b22f | 944 | }\r |
945 | } else {\r | |
3a6779fa | 946 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
947 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
948 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 949 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 950 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
951 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
952 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
953 | NULL\r | |
954 | );\r | |
955 | } else {\r | |
956 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 957 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 958 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
959 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
960 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
961 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
962 | NULL\r | |
963 | );\r | |
964 | }\r | |
e811b22f | 965 | } else {\r |
3a6779fa | 966 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
967 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 968 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 969 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
970 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
971 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
972 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
973 | NULL\r | |
974 | );\r | |
975 | } else {\r | |
976 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 977 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 978 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
979 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
980 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
981 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
982 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
983 | NULL\r | |
984 | );\r | |
985 | }\r | |
e811b22f | 986 | }\r |
987 | }\r | |
988 | } else {\r | |
3a6779fa | 989 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r |
990 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
991 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
992 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 993 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 994 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
995 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
996 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
997 | NULL\r | |
998 | );\r | |
999 | } else {\r | |
1000 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1001 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1002 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1003 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1004 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1005 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1006 | NULL\r | |
1007 | );\r | |
1008 | }\r | |
e811b22f | 1009 | } else {\r |
3a6779fa | 1010 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
1011 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1012 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1013 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1014 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1015 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1016 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1017 | NULL\r | |
1018 | );\r | |
1019 | } else {\r | |
1020 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1021 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1022 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1023 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1024 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1025 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1026 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1027 | NULL\r | |
1028 | );\r | |
1029 | }\r | |
e811b22f | 1030 | }\r |
1031 | } else {\r | |
3a6779fa | 1032 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
1033 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1034 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1035 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1036 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1037 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1038 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1039 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1040 | NULL\r | |
1041 | );\r | |
1042 | } else {\r | |
1043 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1044 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1045 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1046 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1047 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1048 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1049 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1050 | NULL\r | |
1051 | );\r | |
1052 | }\r | |
e811b22f | 1053 | } else {\r |
3a6779fa | 1054 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
1055 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1056 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1057 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1058 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1059 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1060 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1061 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1062 | NULL\r | |
1063 | );\r | |
1064 | } else {\r | |
1065 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1066 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1067 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1068 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1069 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1070 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1071 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1072 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1073 | NULL\r | |
1074 | );\r | |
1075 | }\r | |
e811b22f | 1076 | }\r |
1077 | }\r | |
1078 | }\r | |
1079 | } else {\r | |
3a6779fa | 1080 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r |
1081 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1082 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1083 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1084 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1085 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1086 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1087 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1088 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1089 | NULL\r | |
1090 | );\r | |
1091 | } else {\r | |
1092 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1093 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1094 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1095 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1096 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1097 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1098 | NULL\r | |
1099 | );\r | |
1100 | }\r | |
e811b22f | 1101 | } else {\r |
3a6779fa | 1102 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
1103 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1104 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1105 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1106 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1107 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1108 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1109 | NULL\r | |
1110 | );\r | |
1111 | } else {\r | |
1112 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1113 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1114 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1115 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1116 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1117 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1118 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1119 | NULL\r | |
1120 | );\r | |
1121 | }\r | |
e811b22f | 1122 | }\r |
1123 | } else {\r | |
3a6779fa | 1124 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
1125 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1126 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1127 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1128 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1129 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1130 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1131 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1132 | NULL\r | |
1133 | );\r | |
1134 | } else {\r | |
1135 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1136 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1137 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1138 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1139 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1140 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1141 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1142 | NULL\r | |
1143 | );\r | |
1144 | }\r | |
e811b22f | 1145 | } else {\r |
3a6779fa | 1146 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
1147 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1148 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1149 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1150 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1151 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1152 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1153 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1154 | NULL\r | |
1155 | );\r | |
1156 | } else {\r | |
1157 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1158 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1159 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1160 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1161 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1162 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1163 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1164 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1165 | NULL\r | |
1166 | );\r | |
1167 | }\r | |
e811b22f | 1168 | }\r |
1169 | }\r | |
1170 | } else {\r | |
3a6779fa | 1171 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r |
1172 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1173 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1174 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1175 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1176 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1177 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1178 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1179 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1180 | NULL\r | |
1181 | );\r | |
1182 | } else {\r | |
1183 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1184 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1185 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1186 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1187 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1188 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1189 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1190 | NULL\r | |
1191 | );\r | |
1192 | }\r | |
e811b22f | 1193 | } else {\r |
3a6779fa | 1194 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
1195 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1196 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1197 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1198 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1199 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1200 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1201 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1202 | NULL\r | |
1203 | );\r | |
1204 | } else {\r | |
1205 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1206 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1207 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1208 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1209 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1210 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1211 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1212 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1213 | NULL\r | |
1214 | );\r | |
1215 | }\r | |
e811b22f | 1216 | }\r |
1217 | } else {\r | |
3a6779fa | 1218 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r |
1219 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1220 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1221 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1222 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1223 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1224 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1225 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1226 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1227 | NULL\r | |
1228 | );\r | |
1229 | } else {\r | |
1230 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1231 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1232 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1233 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1234 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1235 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1236 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1237 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1238 | NULL\r | |
1239 | );\r | |
1240 | }\r | |
e811b22f | 1241 | } else {\r |
3a6779fa | 1242 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r |
1243 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1244 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1245 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1246 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1247 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1248 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1249 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1250 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1251 | NULL\r | |
1252 | );\r | |
1253 | } else {\r | |
1254 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
de27b8f0 | 1255 | &DriverBinding->DriverBindingHandle,\r |
3a6779fa | 1256 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r |
1257 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1258 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1259 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1260 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1261 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1262 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1263 | NULL\r | |
1264 | );\r | |
1265 | }\r | |
e811b22f | 1266 | }\r |
1267 | }\r | |
1268 | }\r | |
1269 | }\r | |
1270 | }\r | |
1271 | \r | |
1272 | //\r | |
1273 | // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r | |
1274 | //\r | |
1275 | ASSERT_EFI_ERROR (Status);\r | |
1276 | \r | |
e811b22f | 1277 | return Status;\r |
1278 | }\r | |
0290fca2 AS |
1279 | \r |
1280 | \r | |
1281 | \r | |
1282 | /**\r | |
1283 | Uninstalls Driver Binding Protocol with optional Component Name, Component Name 2, Driver\r | |
1284 | Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.\r | |
1285 | \r | |
1286 | If DriverBinding is NULL, then ASSERT().\r | |
1287 | If the installation fails, then ASSERT().\r | |
1288 | \r | |
1289 | \r | |
1290 | @param DriverBinding A Driver Binding Protocol instance that this driver produced.\r | |
1291 | @param ComponentName A Component Name Protocol instance that this driver produced.\r | |
1292 | @param ComponentName2 A Component Name 2 Protocol instance that this driver produced.\r | |
1293 | @param DriverConfiguration A Driver Configuration Protocol instance that this driver produced.\r | |
1294 | @param DriverConfiguration2 A Driver Configuration Protocol 2 instance that this driver produced.\r | |
1295 | @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver produced.\r | |
1296 | @param DriverDiagnostics2 A Driver Diagnostics Protocol 2 instance that this driver produced.\r | |
1297 | \r | |
1298 | @retval EFI_SUCCESS The protocol uninstallation successfully completed.\r | |
1299 | @retval Others Status from gBS->UninstallMultipleProtocolInterfaces().\r | |
1300 | \r | |
1301 | **/\r | |
1302 | EFI_STATUS\r | |
1303 | EFIAPI\r | |
1304 | EfiLibUninstallAllDriverProtocols2 (\r | |
1305 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r | |
1306 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r | |
1307 | IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL\r | |
1308 | IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r | |
1309 | IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2, OPTIONAL\r | |
1310 | IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL\r | |
1311 | IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL\r | |
1312 | )\r | |
1313 | {\r | |
1314 | EFI_STATUS Status;\r | |
1315 | \r | |
1316 | ASSERT (DriverBinding != NULL);\r | |
1317 | \r | |
1318 | if (DriverConfiguration2 == NULL) {\r | |
1319 | if (DriverConfiguration == NULL) {\r | |
1320 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
1321 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1322 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1323 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1324 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1325 | DriverBinding->DriverBindingHandle,\r | |
1326 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1327 | NULL\r | |
1328 | );\r | |
1329 | } else {\r | |
1330 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1331 | DriverBinding->DriverBindingHandle,\r | |
1332 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1333 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1334 | NULL\r | |
1335 | );\r | |
1336 | }\r | |
1337 | } else {\r | |
1338 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1339 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1340 | DriverBinding->DriverBindingHandle,\r | |
1341 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1342 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1343 | NULL\r | |
1344 | );\r | |
1345 | } else {\r | |
1346 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1347 | DriverBinding->DriverBindingHandle,\r | |
1348 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1349 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1350 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1351 | NULL\r | |
1352 | );\r | |
1353 | }\r | |
1354 | }\r | |
1355 | } else {\r | |
1356 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1357 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1358 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1359 | DriverBinding->DriverBindingHandle,\r | |
1360 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1361 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1362 | NULL\r | |
1363 | );\r | |
1364 | } else {\r | |
1365 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1366 | DriverBinding->DriverBindingHandle,\r | |
1367 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1368 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1369 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1370 | NULL\r | |
1371 | );\r | |
1372 | }\r | |
1373 | } else {\r | |
1374 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1375 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1376 | DriverBinding->DriverBindingHandle,\r | |
1377 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1378 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1379 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1380 | NULL\r | |
1381 | );\r | |
1382 | } else {\r | |
1383 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1384 | DriverBinding->DriverBindingHandle,\r | |
1385 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1386 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1387 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1388 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1389 | NULL\r | |
1390 | );\r | |
1391 | }\r | |
1392 | }\r | |
1393 | }\r | |
1394 | } else {\r | |
1395 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1396 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1397 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1398 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1399 | DriverBinding->DriverBindingHandle,\r | |
1400 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1401 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1402 | NULL\r | |
1403 | );\r | |
1404 | } else {\r | |
1405 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1406 | DriverBinding->DriverBindingHandle,\r | |
1407 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1408 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1409 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1410 | NULL\r | |
1411 | );\r | |
1412 | }\r | |
1413 | } else {\r | |
1414 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1415 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1416 | DriverBinding->DriverBindingHandle,\r | |
1417 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1418 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1419 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1420 | NULL\r | |
1421 | );\r | |
1422 | } else {\r | |
1423 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1424 | DriverBinding->DriverBindingHandle,\r | |
1425 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1426 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1427 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1428 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1429 | NULL\r | |
1430 | );\r | |
1431 | }\r | |
1432 | }\r | |
1433 | } else {\r | |
1434 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1435 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1436 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1437 | DriverBinding->DriverBindingHandle,\r | |
1438 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1439 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1440 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1441 | NULL\r | |
1442 | );\r | |
1443 | } else {\r | |
1444 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1445 | DriverBinding->DriverBindingHandle,\r | |
1446 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1447 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1448 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1449 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1450 | NULL\r | |
1451 | );\r | |
1452 | }\r | |
1453 | } else {\r | |
1454 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1455 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1456 | DriverBinding->DriverBindingHandle,\r | |
1457 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1458 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1459 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1460 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1461 | NULL\r | |
1462 | );\r | |
1463 | } else {\r | |
1464 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1465 | DriverBinding->DriverBindingHandle,\r | |
1466 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1467 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1468 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1469 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1470 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1471 | NULL\r | |
1472 | );\r | |
1473 | }\r | |
1474 | }\r | |
1475 | }\r | |
1476 | }\r | |
1477 | } else {\r | |
1478 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
1479 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1480 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1481 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1482 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1483 | DriverBinding->DriverBindingHandle,\r | |
1484 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1485 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1486 | NULL\r | |
1487 | );\r | |
1488 | } else {\r | |
1489 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1490 | DriverBinding->DriverBindingHandle,\r | |
1491 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1492 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1493 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1494 | NULL\r | |
1495 | );\r | |
1496 | }\r | |
1497 | } else {\r | |
1498 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1499 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1500 | DriverBinding->DriverBindingHandle,\r | |
1501 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1502 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1503 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1504 | NULL\r | |
1505 | );\r | |
1506 | } else {\r | |
1507 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1508 | DriverBinding->DriverBindingHandle,\r | |
1509 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1510 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1511 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1512 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1513 | NULL\r | |
1514 | );\r | |
1515 | }\r | |
1516 | }\r | |
1517 | } else {\r | |
1518 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1519 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1520 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1521 | DriverBinding->DriverBindingHandle,\r | |
1522 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1523 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1524 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1525 | NULL\r | |
1526 | );\r | |
1527 | } else {\r | |
1528 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1529 | DriverBinding->DriverBindingHandle,\r | |
1530 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1531 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1532 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1533 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1534 | NULL\r | |
1535 | );\r | |
1536 | }\r | |
1537 | } else {\r | |
1538 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1539 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1540 | DriverBinding->DriverBindingHandle,\r | |
1541 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1542 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1543 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1544 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1545 | NULL\r | |
1546 | );\r | |
1547 | } else {\r | |
1548 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1549 | DriverBinding->DriverBindingHandle,\r | |
1550 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1551 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1552 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1553 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1554 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1555 | NULL\r | |
1556 | );\r | |
1557 | }\r | |
1558 | }\r | |
1559 | }\r | |
1560 | } else {\r | |
1561 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1562 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1563 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1564 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1565 | DriverBinding->DriverBindingHandle,\r | |
1566 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1567 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1568 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1569 | NULL\r | |
1570 | );\r | |
1571 | } else {\r | |
1572 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1573 | DriverBinding->DriverBindingHandle,\r | |
1574 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1575 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1576 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1577 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1578 | NULL\r | |
1579 | );\r | |
1580 | }\r | |
1581 | } else {\r | |
1582 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1583 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1584 | DriverBinding->DriverBindingHandle,\r | |
1585 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1586 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1587 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1588 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1589 | NULL\r | |
1590 | );\r | |
1591 | } else {\r | |
1592 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1593 | DriverBinding->DriverBindingHandle,\r | |
1594 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1595 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1596 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1597 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1598 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1599 | NULL\r | |
1600 | );\r | |
1601 | }\r | |
1602 | }\r | |
1603 | } else {\r | |
1604 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1605 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1606 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1607 | DriverBinding->DriverBindingHandle,\r | |
1608 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1609 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1610 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1611 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1612 | NULL\r | |
1613 | );\r | |
1614 | } else {\r | |
1615 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1616 | DriverBinding->DriverBindingHandle,\r | |
1617 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1618 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1619 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1620 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1621 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1622 | NULL\r | |
1623 | );\r | |
1624 | }\r | |
1625 | } else {\r | |
1626 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1627 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1628 | DriverBinding->DriverBindingHandle,\r | |
1629 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1630 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1631 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1632 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1633 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1634 | NULL\r | |
1635 | );\r | |
1636 | } else {\r | |
1637 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1638 | DriverBinding->DriverBindingHandle,\r | |
1639 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1640 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1641 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1642 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1643 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1644 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1645 | NULL\r | |
1646 | );\r | |
1647 | }\r | |
1648 | }\r | |
1649 | }\r | |
1650 | }\r | |
1651 | }\r | |
1652 | } else {\r | |
1653 | if (DriverConfiguration == NULL) {\r | |
1654 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
1655 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1656 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1657 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1658 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1659 | DriverBinding->DriverBindingHandle,\r | |
1660 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1661 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1662 | NULL\r | |
1663 | );\r | |
1664 | } else {\r | |
1665 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1666 | DriverBinding->DriverBindingHandle,\r | |
1667 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1668 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1669 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1670 | NULL\r | |
1671 | );\r | |
1672 | }\r | |
1673 | } else {\r | |
1674 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1675 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1676 | DriverBinding->DriverBindingHandle,\r | |
1677 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1678 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1679 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1680 | NULL\r | |
1681 | );\r | |
1682 | } else {\r | |
1683 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1684 | DriverBinding->DriverBindingHandle,\r | |
1685 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1686 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1687 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1688 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1689 | NULL\r | |
1690 | );\r | |
1691 | }\r | |
1692 | }\r | |
1693 | } else {\r | |
1694 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1695 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1696 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1697 | DriverBinding->DriverBindingHandle,\r | |
1698 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1699 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1700 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1701 | NULL\r | |
1702 | );\r | |
1703 | } else {\r | |
1704 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1705 | DriverBinding->DriverBindingHandle,\r | |
1706 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1707 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1708 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1709 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1710 | NULL\r | |
1711 | );\r | |
1712 | }\r | |
1713 | } else {\r | |
1714 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1715 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1716 | DriverBinding->DriverBindingHandle,\r | |
1717 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1718 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1719 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1720 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1721 | NULL\r | |
1722 | );\r | |
1723 | } else {\r | |
1724 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1725 | DriverBinding->DriverBindingHandle,\r | |
1726 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1727 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1728 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1729 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1730 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1731 | NULL\r | |
1732 | );\r | |
1733 | }\r | |
1734 | }\r | |
1735 | }\r | |
1736 | } else {\r | |
1737 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1738 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1739 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1740 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1741 | DriverBinding->DriverBindingHandle,\r | |
1742 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1743 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1744 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1745 | NULL\r | |
1746 | );\r | |
1747 | } else {\r | |
1748 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1749 | DriverBinding->DriverBindingHandle,\r | |
1750 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1751 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1752 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1753 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1754 | NULL\r | |
1755 | );\r | |
1756 | }\r | |
1757 | } else {\r | |
1758 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1759 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1760 | DriverBinding->DriverBindingHandle,\r | |
1761 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1762 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1763 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1764 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1765 | NULL\r | |
1766 | );\r | |
1767 | } else {\r | |
1768 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1769 | DriverBinding->DriverBindingHandle,\r | |
1770 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1771 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1772 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1773 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1774 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1775 | NULL\r | |
1776 | );\r | |
1777 | }\r | |
1778 | }\r | |
1779 | } else {\r | |
1780 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1781 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1782 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1783 | DriverBinding->DriverBindingHandle,\r | |
1784 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1785 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1786 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1787 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1788 | NULL\r | |
1789 | );\r | |
1790 | } else {\r | |
1791 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1792 | DriverBinding->DriverBindingHandle,\r | |
1793 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1794 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1795 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1796 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1797 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1798 | NULL\r | |
1799 | );\r | |
1800 | }\r | |
1801 | } else {\r | |
1802 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1803 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1804 | DriverBinding->DriverBindingHandle,\r | |
1805 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1806 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1807 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1808 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1809 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1810 | NULL\r | |
1811 | );\r | |
1812 | } else {\r | |
1813 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1814 | DriverBinding->DriverBindingHandle,\r | |
1815 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1816 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1817 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1818 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1819 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1820 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1821 | NULL\r | |
1822 | );\r | |
1823 | }\r | |
1824 | }\r | |
1825 | }\r | |
1826 | }\r | |
1827 | } else {\r | |
1828 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
1829 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1830 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1831 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1832 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1833 | DriverBinding->DriverBindingHandle,\r | |
1834 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1835 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1836 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1837 | NULL\r | |
1838 | );\r | |
1839 | } else {\r | |
1840 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1841 | DriverBinding->DriverBindingHandle,\r | |
1842 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1843 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1844 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1845 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1846 | NULL\r | |
1847 | );\r | |
1848 | }\r | |
1849 | } else {\r | |
1850 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1851 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1852 | DriverBinding->DriverBindingHandle,\r | |
1853 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1854 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1855 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1856 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1857 | NULL\r | |
1858 | );\r | |
1859 | } else {\r | |
1860 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1861 | DriverBinding->DriverBindingHandle,\r | |
1862 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1863 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1864 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1865 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1866 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1867 | NULL\r | |
1868 | );\r | |
1869 | }\r | |
1870 | }\r | |
1871 | } else {\r | |
1872 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1873 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1874 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1875 | DriverBinding->DriverBindingHandle,\r | |
1876 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1877 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1878 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1879 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1880 | NULL\r | |
1881 | );\r | |
1882 | } else {\r | |
1883 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1884 | DriverBinding->DriverBindingHandle,\r | |
1885 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1886 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1887 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1888 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1889 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1890 | NULL\r | |
1891 | );\r | |
1892 | }\r | |
1893 | } else {\r | |
1894 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1895 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1896 | DriverBinding->DriverBindingHandle,\r | |
1897 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1898 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1899 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1900 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1901 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1902 | NULL\r | |
1903 | );\r | |
1904 | } else {\r | |
1905 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1906 | DriverBinding->DriverBindingHandle,\r | |
1907 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1908 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1909 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1910 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1911 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1912 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1913 | NULL\r | |
1914 | );\r | |
1915 | }\r | |
1916 | }\r | |
1917 | }\r | |
1918 | } else {\r | |
1919 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
1920 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1921 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1922 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1923 | DriverBinding->DriverBindingHandle,\r | |
1924 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1925 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1926 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1927 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1928 | NULL\r | |
1929 | );\r | |
1930 | } else {\r | |
1931 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1932 | DriverBinding->DriverBindingHandle,\r | |
1933 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1934 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1935 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1936 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1937 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1938 | NULL\r | |
1939 | );\r | |
1940 | }\r | |
1941 | } else {\r | |
1942 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1943 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1944 | DriverBinding->DriverBindingHandle,\r | |
1945 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1946 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1947 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1948 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1949 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1950 | NULL\r | |
1951 | );\r | |
1952 | } else {\r | |
1953 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1954 | DriverBinding->DriverBindingHandle,\r | |
1955 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1956 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1957 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1958 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1959 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1960 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1961 | NULL\r | |
1962 | );\r | |
1963 | }\r | |
1964 | }\r | |
1965 | } else {\r | |
1966 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
1967 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1968 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1969 | DriverBinding->DriverBindingHandle,\r | |
1970 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1971 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1972 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1973 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1974 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1975 | NULL\r | |
1976 | );\r | |
1977 | } else {\r | |
1978 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1979 | DriverBinding->DriverBindingHandle,\r | |
1980 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1981 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1982 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1983 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1984 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1985 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1986 | NULL\r | |
1987 | );\r | |
1988 | }\r | |
1989 | } else {\r | |
1990 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1991 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
1992 | DriverBinding->DriverBindingHandle,\r | |
1993 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1994 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1995 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1996 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1997 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1998 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1999 | NULL\r | |
2000 | );\r | |
2001 | } else {\r | |
2002 | Status = gBS->UninstallMultipleProtocolInterfaces (\r | |
2003 | DriverBinding->DriverBindingHandle,\r | |
2004 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
2005 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
2006 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
2007 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
2008 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
2009 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
2010 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
2011 | NULL\r | |
2012 | );\r | |
2013 | }\r | |
2014 | }\r | |
2015 | }\r | |
2016 | }\r | |
2017 | }\r | |
2018 | }\r | |
2019 | \r | |
2020 | //\r | |
2021 | // ASSERT if the call to UninstallMultipleProtocolInterfaces() failed\r | |
2022 | //\r | |
2023 | ASSERT_EFI_ERROR (Status);\r | |
2024 | \r | |
2025 | return Status;\r | |
2026 | }\r |