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