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