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