]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Library functions that abstract driver model protocols\r | |
3 | installation.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
8 | **/\r | |
9 | \r | |
10 | \r | |
11 | #include "UefiLibInternal.h"\r | |
12 | \r | |
13 | /**\r | |
14 | Installs and completes the initialization of a Driver Binding Protocol instance.\r | |
15 | \r | |
16 | Installs the Driver Binding Protocol specified by DriverBinding onto the handle\r | |
17 | specified by DriverBindingHandle. If DriverBindingHandle is NULL, then DriverBinding\r | |
18 | is installed onto a newly created handle. DriverBindingHandle is typically the same\r | |
19 | as the driver's ImageHandle, but it can be different if the driver produces multiple\r | |
20 | Driver Binding Protocols.\r | |
21 | If DriverBinding is NULL, then ASSERT().\r | |
22 | If DriverBinding can not be installed onto a handle, then ASSERT().\r | |
23 | \r | |
24 | @param ImageHandle The image handle of the driver.\r | |
25 | @param SystemTable The EFI System Table that was passed to the driver's entry point.\r | |
26 | @param DriverBinding A Driver Binding Protocol instance that this driver is producing.\r | |
27 | @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this\r | |
28 | parameter is NULL, then a new handle is created.\r | |
29 | \r | |
30 | @retval EFI_SUCCESS The protocol installation is completed successfully.\r | |
31 | @retval EFI_OUT_OF_RESOURCES There was not enough system resources to install the protocol.\r | |
32 | @retval Others Status from gBS->InstallMultipleProtocolInterfaces().\r | |
33 | \r | |
34 | **/\r | |
35 | EFI_STATUS\r | |
36 | EFIAPI\r | |
37 | EfiLibInstallDriverBinding (\r | |
38 | IN CONST EFI_HANDLE ImageHandle,\r | |
39 | IN CONST EFI_SYSTEM_TABLE *SystemTable,\r | |
40 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r | |
41 | IN EFI_HANDLE DriverBindingHandle\r | |
42 | )\r | |
43 | {\r | |
44 | EFI_STATUS Status;\r | |
45 | \r | |
46 | ASSERT (DriverBinding != NULL);\r | |
47 | \r | |
48 | //\r | |
49 | // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r | |
50 | //\r | |
51 | DriverBinding->ImageHandle = ImageHandle;\r | |
52 | DriverBinding->DriverBindingHandle = DriverBindingHandle;\r | |
53 | \r | |
54 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
55 | &DriverBinding->DriverBindingHandle,\r | |
56 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
57 | NULL\r | |
58 | );\r | |
59 | //\r | |
60 | // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r | |
61 | //\r | |
62 | ASSERT_EFI_ERROR (Status);\r | |
63 | \r | |
64 | return Status;\r | |
65 | }\r | |
66 | \r | |
67 | \r | |
68 | /**\r | |
69 | Installs and completes the initialization of a Driver Binding Protocol instance and\r | |
70 | optionally installs the Component Name, Driver Configuration and Driver Diagnostics Protocols.\r | |
71 | \r | |
72 | Initializes a driver by installing the Driver Binding Protocol together with the\r | |
73 | optional Component Name, optional Driver Configure and optional Driver Diagnostic\r | |
74 | Protocols onto the driver's DriverBindingHandle. If DriverBindingHandle is NULL,\r | |
75 | then the protocols are installed onto a newly created handle. DriverBindingHandle\r | |
76 | is typically the same as the driver's ImageHandle, but it can be different if the\r | |
77 | driver produces multiple Driver Binding Protocols.\r | |
78 | If DriverBinding is NULL, then ASSERT().\r | |
79 | If the installation fails, then ASSERT().\r | |
80 | \r | |
81 | @param ImageHandle The image handle of the driver.\r | |
82 | @param SystemTable The EFI System Table that was passed to the driver's entry point.\r | |
83 | @param DriverBinding A Driver Binding Protocol instance that this driver is producing.\r | |
84 | @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this\r | |
85 | parameter is NULL, then a new handle is created.\r | |
86 | @param ComponentName A Component Name Protocol instance that this driver is producing.\r | |
87 | @param DriverConfiguration A Driver Configuration Protocol instance that this driver is producing.\r | |
88 | @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing.\r | |
89 | \r | |
90 | @retval EFI_SUCCESS The protocol installation is completed successfully.\r | |
91 | @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.\r | |
92 | \r | |
93 | **/\r | |
94 | EFI_STATUS\r | |
95 | EFIAPI\r | |
96 | EfiLibInstallAllDriverProtocols (\r | |
97 | IN CONST EFI_HANDLE ImageHandle,\r | |
98 | IN CONST EFI_SYSTEM_TABLE *SystemTable,\r | |
99 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r | |
100 | IN EFI_HANDLE DriverBindingHandle,\r | |
101 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r | |
102 | IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r | |
103 | IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL\r | |
104 | )\r | |
105 | {\r | |
106 | EFI_STATUS Status;\r | |
107 | \r | |
108 | ASSERT (DriverBinding != NULL);\r | |
109 | \r | |
110 | //\r | |
111 | // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r | |
112 | //\r | |
113 | DriverBinding->ImageHandle = ImageHandle;\r | |
114 | DriverBinding->DriverBindingHandle = DriverBindingHandle;\r | |
115 | \r | |
116 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
117 | if (DriverConfiguration == NULL) {\r | |
118 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
119 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
120 | &DriverBinding->DriverBindingHandle,\r | |
121 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
122 | NULL\r | |
123 | );\r | |
124 | } else {\r | |
125 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
126 | &DriverBinding->DriverBindingHandle,\r | |
127 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
128 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
129 | NULL\r | |
130 | );\r | |
131 | }\r | |
132 | } else {\r | |
133 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
134 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
135 | &DriverBinding->DriverBindingHandle,\r | |
136 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
137 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
138 | NULL\r | |
139 | );\r | |
140 | } else {\r | |
141 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
142 | &DriverBinding->DriverBindingHandle,\r | |
143 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
144 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
145 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
146 | NULL\r | |
147 | );\r | |
148 | }\r | |
149 | }\r | |
150 | } else {\r | |
151 | if (DriverConfiguration == NULL) {\r | |
152 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
153 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
154 | &DriverBinding->DriverBindingHandle,\r | |
155 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
156 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
157 | NULL\r | |
158 | );\r | |
159 | } else {\r | |
160 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
161 | &DriverBinding->DriverBindingHandle,\r | |
162 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
163 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
164 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
165 | NULL\r | |
166 | );\r | |
167 | }\r | |
168 | } else {\r | |
169 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
170 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
171 | &DriverBinding->DriverBindingHandle,\r | |
172 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
173 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
174 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
175 | NULL\r | |
176 | );\r | |
177 | } else {\r | |
178 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
179 | &DriverBinding->DriverBindingHandle,\r | |
180 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
181 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
182 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
183 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
184 | NULL\r | |
185 | );\r | |
186 | }\r | |
187 | }\r | |
188 | }\r | |
189 | \r | |
190 | //\r | |
191 | // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r | |
192 | //\r | |
193 | ASSERT_EFI_ERROR (Status);\r | |
194 | \r | |
195 | return Status;\r | |
196 | }\r | |
197 | \r | |
198 | \r | |
199 | \r | |
200 | /**\r | |
201 | Installs Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.\r | |
202 | \r | |
203 | Initializes a driver by installing the Driver Binding Protocol together with the\r | |
204 | optional Component Name and optional Component Name 2 protocols onto the driver's\r | |
205 | DriverBindingHandle. If DriverBindingHandle is NULL, then the protocols are installed\r | |
206 | onto a newly created handle. DriverBindingHandle is typically the same as the driver's\r | |
207 | ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols.\r | |
208 | If DriverBinding is NULL, then ASSERT().\r | |
209 | If the installation fails, then ASSERT().\r | |
210 | \r | |
211 | @param ImageHandle The image handle of the driver.\r | |
212 | @param SystemTable The EFI System Table that was passed to the driver's entry point.\r | |
213 | @param DriverBinding A Driver Binding Protocol instance that this driver is producing.\r | |
214 | @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this\r | |
215 | parameter is NULL, then a new handle is created.\r | |
216 | @param ComponentName A Component Name Protocol instance that this driver is producing.\r | |
217 | @param ComponentName2 A Component Name 2 Protocol instance that this driver is producing.\r | |
218 | \r | |
219 | @retval EFI_SUCCESS The protocol installation is completed successfully.\r | |
220 | @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.\r | |
221 | \r | |
222 | **/\r | |
223 | EFI_STATUS\r | |
224 | EFIAPI\r | |
225 | EfiLibInstallDriverBindingComponentName2 (\r | |
226 | IN CONST EFI_HANDLE ImageHandle,\r | |
227 | IN CONST EFI_SYSTEM_TABLE *SystemTable,\r | |
228 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r | |
229 | IN EFI_HANDLE DriverBindingHandle,\r | |
230 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r | |
231 | IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL\r | |
232 | )\r | |
233 | {\r | |
234 | EFI_STATUS Status;\r | |
235 | \r | |
236 | ASSERT (DriverBinding != NULL);\r | |
237 | \r | |
238 | //\r | |
239 | // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r | |
240 | //\r | |
241 | DriverBinding->ImageHandle = ImageHandle;\r | |
242 | DriverBinding->DriverBindingHandle = DriverBindingHandle;\r | |
243 | \r | |
244 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
245 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
246 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
247 | &DriverBinding->DriverBindingHandle,\r | |
248 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
249 | NULL\r | |
250 | );\r | |
251 | } else {\r | |
252 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
253 | &DriverBinding->DriverBindingHandle,\r | |
254 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
255 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
256 | NULL\r | |
257 | );\r | |
258 | }\r | |
259 | } else {\r | |
260 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
261 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
262 | &DriverBinding->DriverBindingHandle,\r | |
263 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
264 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
265 | NULL\r | |
266 | );\r | |
267 | } else {\r | |
268 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
269 | &DriverBinding->DriverBindingHandle,\r | |
270 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
271 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
272 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
273 | NULL\r | |
274 | );\r | |
275 | }\r | |
276 | }\r | |
277 | \r | |
278 | //\r | |
279 | // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r | |
280 | //\r | |
281 | ASSERT_EFI_ERROR (Status);\r | |
282 | \r | |
283 | return Status;\r | |
284 | }\r | |
285 | \r | |
286 | \r | |
287 | \r | |
288 | /**\r | |
289 | Installs Driver Binding Protocol with optional Component Name, Component Name 2, Driver\r | |
290 | Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.\r | |
291 | \r | |
292 | Initializes a driver by installing the Driver Binding Protocol together with the optional\r | |
293 | Component Name, optional Component Name 2, optional Driver Configuration, optional Driver Configuration 2,\r | |
294 | optional Driver Diagnostic, and optional Driver Diagnostic 2 Protocols onto the driver's DriverBindingHandle.\r | |
295 | DriverBindingHandle is typically the same as the driver's ImageHandle, but it can be different if the driver\r | |
296 | produces multiple Driver Binding Protocols.\r | |
297 | If DriverBinding is NULL, then ASSERT().\r | |
298 | If the installation fails, then ASSERT().\r | |
299 | \r | |
300 | \r | |
301 | @param ImageHandle The image handle of the driver.\r | |
302 | @param SystemTable The EFI System Table that was passed to the driver's entry point.\r | |
303 | @param DriverBinding A Driver Binding Protocol instance that this driver is producing.\r | |
304 | @param DriverBindingHandle The handle that DriverBinding is to be installed onto. If this\r | |
305 | parameter is NULL, then a new handle is created.\r | |
306 | @param ComponentName A Component Name Protocol instance that this driver is producing.\r | |
307 | @param ComponentName2 A Component Name 2 Protocol instance that this driver is producing.\r | |
308 | @param DriverConfiguration A Driver Configuration Protocol instance that this driver is producing.\r | |
309 | @param DriverConfiguration2 A Driver Configuration Protocol 2 instance that this driver is producing.\r | |
310 | @param DriverDiagnostics A Driver Diagnostics Protocol instance that this driver is producing.\r | |
311 | @param DriverDiagnostics2 A Driver Diagnostics Protocol 2 instance that this driver is producing.\r | |
312 | \r | |
313 | @retval EFI_SUCCESS The protocol installation is completed successfully.\r | |
314 | @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.\r | |
315 | \r | |
316 | **/\r | |
317 | EFI_STATUS\r | |
318 | EFIAPI\r | |
319 | EfiLibInstallAllDriverProtocols2 (\r | |
320 | IN CONST EFI_HANDLE ImageHandle,\r | |
321 | IN CONST EFI_SYSTEM_TABLE *SystemTable,\r | |
322 | IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,\r | |
323 | IN EFI_HANDLE DriverBindingHandle,\r | |
324 | IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL\r | |
325 | IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2, OPTIONAL\r | |
326 | IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration, OPTIONAL\r | |
327 | IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2, OPTIONAL\r | |
328 | IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics, OPTIONAL\r | |
329 | IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL\r | |
330 | )\r | |
331 | {\r | |
332 | EFI_STATUS Status;\r | |
333 | \r | |
334 | ASSERT (DriverBinding != NULL);\r | |
335 | \r | |
336 | //\r | |
337 | // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r | |
338 | //\r | |
339 | DriverBinding->ImageHandle = ImageHandle;\r | |
340 | DriverBinding->DriverBindingHandle = DriverBindingHandle;\r | |
341 | \r | |
342 | if (DriverConfiguration2 == NULL) {\r | |
343 | if (DriverConfiguration == NULL) {\r | |
344 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
345 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
346 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
347 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
348 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
349 | &DriverBinding->DriverBindingHandle,\r | |
350 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
351 | NULL\r | |
352 | );\r | |
353 | } else {\r | |
354 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
355 | &DriverBinding->DriverBindingHandle,\r | |
356 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
357 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
358 | NULL\r | |
359 | );\r | |
360 | }\r | |
361 | } else {\r | |
362 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
363 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
364 | &DriverBinding->DriverBindingHandle,\r | |
365 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
366 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
367 | NULL\r | |
368 | );\r | |
369 | } else {\r | |
370 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
371 | &DriverBinding->DriverBindingHandle,\r | |
372 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
373 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
374 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
375 | NULL\r | |
376 | );\r | |
377 | }\r | |
378 | }\r | |
379 | } else {\r | |
380 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
381 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
382 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
383 | &DriverBinding->DriverBindingHandle,\r | |
384 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
385 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
386 | NULL\r | |
387 | );\r | |
388 | } else {\r | |
389 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
390 | &DriverBinding->DriverBindingHandle,\r | |
391 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
392 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
393 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
394 | NULL\r | |
395 | );\r | |
396 | }\r | |
397 | } else {\r | |
398 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
399 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
400 | &DriverBinding->DriverBindingHandle,\r | |
401 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
402 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
403 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
404 | NULL\r | |
405 | );\r | |
406 | } else {\r | |
407 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
408 | &DriverBinding->DriverBindingHandle,\r | |
409 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
410 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
411 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
412 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
413 | NULL\r | |
414 | );\r | |
415 | }\r | |
416 | }\r | |
417 | }\r | |
418 | } else {\r | |
419 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
420 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
421 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
422 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
423 | &DriverBinding->DriverBindingHandle,\r | |
424 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
425 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
426 | NULL\r | |
427 | );\r | |
428 | } else {\r | |
429 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
430 | &DriverBinding->DriverBindingHandle,\r | |
431 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
432 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
433 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
434 | NULL\r | |
435 | );\r | |
436 | }\r | |
437 | } else {\r | |
438 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
439 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
440 | &DriverBinding->DriverBindingHandle,\r | |
441 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
442 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
443 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
444 | NULL\r | |
445 | );\r | |
446 | } else {\r | |
447 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
448 | &DriverBinding->DriverBindingHandle,\r | |
449 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
450 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
451 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
452 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
453 | NULL\r | |
454 | );\r | |
455 | }\r | |
456 | }\r | |
457 | } else {\r | |
458 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
459 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
460 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
461 | &DriverBinding->DriverBindingHandle,\r | |
462 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
463 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
464 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
465 | NULL\r | |
466 | );\r | |
467 | } else {\r | |
468 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
469 | &DriverBinding->DriverBindingHandle,\r | |
470 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
471 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
472 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
473 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
474 | NULL\r | |
475 | );\r | |
476 | }\r | |
477 | } else {\r | |
478 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
479 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
480 | &DriverBinding->DriverBindingHandle,\r | |
481 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
482 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
483 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
484 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
485 | NULL\r | |
486 | );\r | |
487 | } else {\r | |
488 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
489 | &DriverBinding->DriverBindingHandle,\r | |
490 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
491 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
492 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
493 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
494 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
495 | NULL\r | |
496 | );\r | |
497 | }\r | |
498 | }\r | |
499 | }\r | |
500 | }\r | |
501 | } else {\r | |
502 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
503 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
504 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
505 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
506 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
507 | &DriverBinding->DriverBindingHandle,\r | |
508 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
509 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
510 | NULL\r | |
511 | );\r | |
512 | } else {\r | |
513 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
514 | &DriverBinding->DriverBindingHandle,\r | |
515 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
516 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
517 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
518 | NULL\r | |
519 | );\r | |
520 | }\r | |
521 | } else {\r | |
522 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
523 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
524 | &DriverBinding->DriverBindingHandle,\r | |
525 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
526 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
527 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
528 | NULL\r | |
529 | );\r | |
530 | } else {\r | |
531 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
532 | &DriverBinding->DriverBindingHandle,\r | |
533 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
534 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
535 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
536 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
537 | NULL\r | |
538 | );\r | |
539 | }\r | |
540 | }\r | |
541 | } else {\r | |
542 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
543 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
544 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
545 | &DriverBinding->DriverBindingHandle,\r | |
546 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
547 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
548 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
549 | NULL\r | |
550 | );\r | |
551 | } else {\r | |
552 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
553 | &DriverBinding->DriverBindingHandle,\r | |
554 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
555 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
556 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
557 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
558 | NULL\r | |
559 | );\r | |
560 | }\r | |
561 | } else {\r | |
562 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
563 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
564 | &DriverBinding->DriverBindingHandle,\r | |
565 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
566 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
567 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
568 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
569 | NULL\r | |
570 | );\r | |
571 | } else {\r | |
572 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
573 | &DriverBinding->DriverBindingHandle,\r | |
574 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
575 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
576 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
577 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
578 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
579 | NULL\r | |
580 | );\r | |
581 | }\r | |
582 | }\r | |
583 | }\r | |
584 | } else {\r | |
585 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
586 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
587 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
588 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
589 | &DriverBinding->DriverBindingHandle,\r | |
590 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
591 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
592 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
593 | NULL\r | |
594 | );\r | |
595 | } else {\r | |
596 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
597 | &DriverBinding->DriverBindingHandle,\r | |
598 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
599 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
600 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
601 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
602 | NULL\r | |
603 | );\r | |
604 | }\r | |
605 | } else {\r | |
606 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
607 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
608 | &DriverBinding->DriverBindingHandle,\r | |
609 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
610 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
611 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
612 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
613 | NULL\r | |
614 | );\r | |
615 | } else {\r | |
616 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
617 | &DriverBinding->DriverBindingHandle,\r | |
618 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
619 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
620 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
621 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
622 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
623 | NULL\r | |
624 | );\r | |
625 | }\r | |
626 | }\r | |
627 | } else {\r | |
628 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
629 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
630 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
631 | &DriverBinding->DriverBindingHandle,\r | |
632 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
633 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
634 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
635 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
636 | NULL\r | |
637 | );\r | |
638 | } else {\r | |
639 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
640 | &DriverBinding->DriverBindingHandle,\r | |
641 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
642 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
643 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
644 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
645 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
646 | NULL\r | |
647 | );\r | |
648 | }\r | |
649 | } else {\r | |
650 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
651 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
652 | &DriverBinding->DriverBindingHandle,\r | |
653 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
654 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
655 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
656 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
657 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
658 | NULL\r | |
659 | );\r | |
660 | } else {\r | |
661 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
662 | &DriverBinding->DriverBindingHandle,\r | |
663 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
664 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
665 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
666 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
667 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
668 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
669 | NULL\r | |
670 | );\r | |
671 | }\r | |
672 | }\r | |
673 | }\r | |
674 | }\r | |
675 | }\r | |
676 | } else {\r | |
677 | if (DriverConfiguration == NULL) {\r | |
678 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
679 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
680 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
681 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
682 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
683 | &DriverBinding->DriverBindingHandle,\r | |
684 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
685 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
686 | NULL\r | |
687 | );\r | |
688 | } else {\r | |
689 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
690 | &DriverBinding->DriverBindingHandle,\r | |
691 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
692 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
693 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
694 | NULL\r | |
695 | );\r | |
696 | }\r | |
697 | } else {\r | |
698 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
699 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
700 | &DriverBinding->DriverBindingHandle,\r | |
701 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
702 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
703 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
704 | NULL\r | |
705 | );\r | |
706 | } else {\r | |
707 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
708 | &DriverBinding->DriverBindingHandle,\r | |
709 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
710 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
711 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
712 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
713 | NULL\r | |
714 | );\r | |
715 | }\r | |
716 | }\r | |
717 | } else {\r | |
718 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
719 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
720 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
721 | &DriverBinding->DriverBindingHandle,\r | |
722 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
723 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
724 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
725 | NULL\r | |
726 | );\r | |
727 | } else {\r | |
728 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
729 | &DriverBinding->DriverBindingHandle,\r | |
730 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
731 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
732 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
733 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
734 | NULL\r | |
735 | );\r | |
736 | }\r | |
737 | } else {\r | |
738 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
739 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
740 | &DriverBinding->DriverBindingHandle,\r | |
741 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
742 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
743 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
744 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
745 | NULL\r | |
746 | );\r | |
747 | } else {\r | |
748 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
749 | &DriverBinding->DriverBindingHandle,\r | |
750 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
751 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
752 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
753 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
754 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
755 | NULL\r | |
756 | );\r | |
757 | }\r | |
758 | }\r | |
759 | }\r | |
760 | } else {\r | |
761 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
762 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
763 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
764 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
765 | &DriverBinding->DriverBindingHandle,\r | |
766 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
767 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
768 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
769 | NULL\r | |
770 | );\r | |
771 | } else {\r | |
772 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
773 | &DriverBinding->DriverBindingHandle,\r | |
774 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
775 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
776 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
777 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
778 | NULL\r | |
779 | );\r | |
780 | }\r | |
781 | } else {\r | |
782 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
783 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
784 | &DriverBinding->DriverBindingHandle,\r | |
785 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
786 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
787 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
788 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
789 | NULL\r | |
790 | );\r | |
791 | } else {\r | |
792 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
793 | &DriverBinding->DriverBindingHandle,\r | |
794 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
795 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
796 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
797 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
798 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
799 | NULL\r | |
800 | );\r | |
801 | }\r | |
802 | }\r | |
803 | } else {\r | |
804 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
805 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
806 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
807 | &DriverBinding->DriverBindingHandle,\r | |
808 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
809 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
810 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
811 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
812 | NULL\r | |
813 | );\r | |
814 | } else {\r | |
815 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
816 | &DriverBinding->DriverBindingHandle,\r | |
817 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
818 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
819 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
820 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
821 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
822 | NULL\r | |
823 | );\r | |
824 | }\r | |
825 | } else {\r | |
826 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
827 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
828 | &DriverBinding->DriverBindingHandle,\r | |
829 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
830 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
831 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
832 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
833 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
834 | NULL\r | |
835 | );\r | |
836 | } else {\r | |
837 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
838 | &DriverBinding->DriverBindingHandle,\r | |
839 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
840 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
841 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
842 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
843 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
844 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
845 | NULL\r | |
846 | );\r | |
847 | }\r | |
848 | }\r | |
849 | }\r | |
850 | }\r | |
851 | } else {\r | |
852 | if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {\r | |
853 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
854 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
855 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
856 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
857 | &DriverBinding->DriverBindingHandle,\r | |
858 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
859 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
860 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
861 | NULL\r | |
862 | );\r | |
863 | } else {\r | |
864 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
865 | &DriverBinding->DriverBindingHandle,\r | |
866 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
867 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
868 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
869 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
870 | NULL\r | |
871 | );\r | |
872 | }\r | |
873 | } else {\r | |
874 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
875 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
876 | &DriverBinding->DriverBindingHandle,\r | |
877 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
878 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
879 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
880 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
881 | NULL\r | |
882 | );\r | |
883 | } else {\r | |
884 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
885 | &DriverBinding->DriverBindingHandle,\r | |
886 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
887 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
888 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
889 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
890 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
891 | NULL\r | |
892 | );\r | |
893 | }\r | |
894 | }\r | |
895 | } else {\r | |
896 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
897 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
898 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
899 | &DriverBinding->DriverBindingHandle,\r | |
900 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
901 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
902 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
903 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
904 | NULL\r | |
905 | );\r | |
906 | } else {\r | |
907 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
908 | &DriverBinding->DriverBindingHandle,\r | |
909 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
910 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
911 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
912 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
913 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
914 | NULL\r | |
915 | );\r | |
916 | }\r | |
917 | } else {\r | |
918 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
919 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
920 | &DriverBinding->DriverBindingHandle,\r | |
921 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
922 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
923 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
924 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
925 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
926 | NULL\r | |
927 | );\r | |
928 | } else {\r | |
929 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
930 | &DriverBinding->DriverBindingHandle,\r | |
931 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
932 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
933 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
934 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
935 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
936 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
937 | NULL\r | |
938 | );\r | |
939 | }\r | |
940 | }\r | |
941 | }\r | |
942 | } else {\r | |
943 | if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) {\r | |
944 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
945 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
946 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
947 | &DriverBinding->DriverBindingHandle,\r | |
948 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
949 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
950 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
951 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
952 | NULL\r | |
953 | );\r | |
954 | } else {\r | |
955 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
956 | &DriverBinding->DriverBindingHandle,\r | |
957 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
958 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
959 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
960 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
961 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
962 | NULL\r | |
963 | );\r | |
964 | }\r | |
965 | } else {\r | |
966 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
967 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
968 | &DriverBinding->DriverBindingHandle,\r | |
969 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
970 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
971 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
972 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
973 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
974 | NULL\r | |
975 | );\r | |
976 | } else {\r | |
977 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
978 | &DriverBinding->DriverBindingHandle,\r | |
979 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
980 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
981 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
982 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
983 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
984 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
985 | NULL\r | |
986 | );\r | |
987 | }\r | |
988 | }\r | |
989 | } else {\r | |
990 | if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r | |
991 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
992 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
993 | &DriverBinding->DriverBindingHandle,\r | |
994 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
995 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
996 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
997 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
998 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
999 | NULL\r | |
1000 | );\r | |
1001 | } else {\r | |
1002 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
1003 | &DriverBinding->DriverBindingHandle,\r | |
1004 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1005 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1006 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1007 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1008 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1009 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1010 | NULL\r | |
1011 | );\r | |
1012 | }\r | |
1013 | } else {\r | |
1014 | if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r | |
1015 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
1016 | &DriverBinding->DriverBindingHandle,\r | |
1017 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1018 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1019 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1020 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1021 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1022 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1023 | NULL\r | |
1024 | );\r | |
1025 | } else {\r | |
1026 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
1027 | &DriverBinding->DriverBindingHandle,\r | |
1028 | &gEfiDriverBindingProtocolGuid, DriverBinding,\r | |
1029 | &gEfiComponentNameProtocolGuid, ComponentName,\r | |
1030 | &gEfiComponentName2ProtocolGuid, ComponentName2,\r | |
1031 | &gEfiDriverConfigurationProtocolGuid, DriverConfiguration,\r | |
1032 | &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2,\r | |
1033 | &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics,\r | |
1034 | &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2,\r | |
1035 | NULL\r | |
1036 | );\r | |
1037 | }\r | |
1038 | }\r | |
1039 | }\r | |
1040 | }\r | |
1041 | }\r | |
1042 | }\r | |
1043 | \r | |
1044 | //\r | |
1045 | // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r | |
1046 | //\r | |
1047 | ASSERT_EFI_ERROR (Status);\r | |
1048 | \r | |
1049 | return Status;\r | |
1050 | }\r |