Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/Console.c
r48674 r58459 2 2 This module provide help function for displaying unicode string. 3 3 4 Copyright (c) 2006 - 20 09, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 22 22 UINT32 Width; 23 23 } UNICODE_WIDTH_ENTRY; 24 25 #define NARROW_CHAR 0xFFF0 26 #define WIDE_CHAR 0xFFF1 24 27 25 28 GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = { … … 290 293 291 294 /** 295 Count the storage space of a Unicode string. 296 297 This function handles the Unicode string with NARROW_CHAR 298 and WIDE_CHAR control characters. NARROW_HCAR and WIDE_CHAR 299 does not count in the resultant output. If a WIDE_CHAR is 300 hit, then 2 Unicode character will consume an output storage 301 space with size of CHAR16 till a NARROW_CHAR is hit. 302 303 @param String The input string to be counted. 304 @param LimitLen Whether need to limit the string length. 305 @param MaxWidth The max length this function supported. 306 @param Offset The max index of the string can be show out. 307 308 @return Storage space for the input string. 309 310 **/ 311 UINTN 312 UefiLibGetStringWidth ( 313 IN CHAR16 *String, 314 IN BOOLEAN LimitLen, 315 IN UINTN MaxWidth, 316 OUT UINTN *Offset 317 ) 318 { 319 UINTN Index; 320 UINTN Count; 321 UINTN IncrementValue; 322 323 if (String == NULL) { 324 return 0; 325 } 326 327 Index = 0; 328 Count = 0; 329 IncrementValue = 1; 330 331 do { 332 // 333 // Advance to the null-terminator or to the first width directive 334 // 335 for (;(String[Index] != NARROW_CHAR) && (String[Index] != WIDE_CHAR) && (String[Index] != 0); Index++) { 336 Count = Count + IncrementValue; 337 338 if (LimitLen && Count > MaxWidth) { 339 break; 340 } 341 } 342 343 // 344 // We hit the null-terminator, we now have a count 345 // 346 if (String[Index] == 0) { 347 break; 348 } 349 350 if (LimitLen && Count > MaxWidth) { 351 *Offset = Index; 352 break; 353 } 354 355 // 356 // We encountered a narrow directive - strip it from the size calculation since it doesn't get printed 357 // and also set the flag that determines what we increment by.(if narrow, increment by 1, if wide increment by 2) 358 // 359 if (String[Index] == NARROW_CHAR) { 360 // 361 // Skip to the next character 362 // 363 Index++; 364 IncrementValue = 1; 365 } else { 366 // 367 // Skip to the next character 368 // 369 Index++; 370 IncrementValue = 2; 371 } 372 } while (String[Index] != 0); 373 374 return Count * sizeof (CHAR16); 375 } 376 377 /** 292 378 Draws a dialog box to the console output device specified by 293 379 ConOut defined in the EFI_SYSTEM_TABLE and waits for a keystroke … … 315 401 ) 316 402 { 403 EFI_STATUS Status; 317 404 VA_LIST Args; 318 405 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut; … … 328 415 CHAR16 *Line; 329 416 UINTN EventIndex; 417 CHAR16 *TmpString; 330 418 331 419 // … … 337 425 NumberOfLines = 0; 338 426 while ((String = VA_ARG (Args, CHAR16 *)) != NULL) { 339 MaxLength = MAX (MaxLength, StrLen (String));427 MaxLength = MAX (MaxLength, UefiLibGetStringWidth (String, FALSE, 0, NULL) / 2); 340 428 NumberOfLines++; 341 429 } … … 410 498 VA_START (Args, Key); 411 499 while ((String = VA_ARG (Args, CHAR16 *)) != NULL && NumberOfLines > 0) { 412 Length = StrLen (String);413 500 SetMem16 (Line, (MaxLength + 2) * 2, L' '); 414 if (Length <= MaxLength) {415 //416 // Length <= MaxLength417 //418 CopyMem (Line + 1 + (MaxLength - Length) / 2, String , Length * sizeof (CHAR16));419 } else {420 //421 // Length > MaxLength422 //423 CopyMem (Line + 1, String + (Length - MaxLength) / 2 , MaxLength * sizeof (CHAR16));424 }425 501 Line[0] = BOXDRAW_VERTICAL; 426 502 Line[MaxLength + 1] = BOXDRAW_VERTICAL; 427 503 Line[MaxLength + 2] = L'\0'; 428 ConOut->SetCursorPosition (ConOut, Column, Row ++);504 ConOut->SetCursorPosition (ConOut, Column, Row); 429 505 ConOut->OutputString (ConOut, Line); 506 Length = UefiLibGetStringWidth (String, FALSE, 0, NULL) / 2; 507 if (Length <= MaxLength) { 508 // 509 // Length <= MaxLength 510 // 511 ConOut->SetCursorPosition (ConOut, Column + 1 + (MaxLength - Length) / 2, Row++); 512 ConOut->OutputString (ConOut, String); 513 } else { 514 // 515 // Length > MaxLength 516 // 517 UefiLibGetStringWidth (String, TRUE, MaxLength, &Length); 518 TmpString = AllocateZeroPool ((Length + 1) * sizeof (CHAR16)); 519 ASSERT (TmpString != NULL); 520 StrnCpy(TmpString, String, Length - 3); 521 StrCat (TmpString, L"..."); 522 523 ConOut->SetCursorPosition (ConOut, Column + 1, Row++); 524 ConOut->OutputString (ConOut, TmpString); 525 FreePool (TmpString); 526 } 430 527 NumberOfLines--; 431 528 } … … 458 555 // 459 556 if (Key != NULL) { 460 gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex); 461 gST->ConIn->ReadKeyStroke (gST->ConIn, Key); 557 while (TRUE) { 558 Status = gST->ConIn->ReadKeyStroke (gST->ConIn, Key); 559 if (!EFI_ERROR (Status)) { 560 break; 561 } 562 563 // 564 // If we encounter error, continue to read another key in. 565 // 566 if (Status != EFI_NOT_READY) { 567 continue; 568 } 569 gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex); 570 } 462 571 } 463 572 } -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiDriverModel.c
r48674 r58459 3 3 installation. 4 4 5 Copyright (c) 2006 - 20 08, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials are 7 7 licensed and made available under the terms and conditions of the BSD License … … 52 52 ASSERT (DriverBinding != NULL); 53 53 54 // 55 // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol 56 // 57 DriverBinding->ImageHandle = ImageHandle; 58 DriverBinding->DriverBindingHandle = DriverBindingHandle; 59 54 60 Status = gBS->InstallMultipleProtocolInterfaces ( 55 &DriverBinding Handle,61 &DriverBinding->DriverBindingHandle, 56 62 &gEfiDriverBindingProtocolGuid, DriverBinding, 57 63 NULL … … 61 67 // 62 68 ASSERT_EFI_ERROR (Status); 63 64 //65 // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol66 //67 DriverBinding->ImageHandle = ImageHandle;68 DriverBinding->DriverBindingHandle = DriverBindingHandle;69 69 70 70 return Status; … … 114 114 ASSERT (DriverBinding != NULL); 115 115 116 // 117 // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol 118 // 119 DriverBinding->ImageHandle = ImageHandle; 120 DriverBinding->DriverBindingHandle = DriverBindingHandle; 121 116 122 if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { 117 123 if (DriverConfiguration == NULL) { 118 124 if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { 119 125 Status = gBS->InstallMultipleProtocolInterfaces ( 120 &DriverBinding Handle,126 &DriverBinding->DriverBindingHandle, 121 127 &gEfiDriverBindingProtocolGuid, DriverBinding, 122 128 NULL … … 124 130 } else { 125 131 Status = gBS->InstallMultipleProtocolInterfaces ( 126 &DriverBinding Handle,132 &DriverBinding->DriverBindingHandle, 127 133 &gEfiDriverBindingProtocolGuid, DriverBinding, 128 134 &gEfiComponentNameProtocolGuid, ComponentName, … … 133 139 if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { 134 140 Status = gBS->InstallMultipleProtocolInterfaces ( 135 &DriverBinding Handle,141 &DriverBinding->DriverBindingHandle, 136 142 &gEfiDriverBindingProtocolGuid, DriverBinding, 137 143 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, … … 140 146 } else { 141 147 Status = gBS->InstallMultipleProtocolInterfaces ( 142 &DriverBinding Handle,148 &DriverBinding->DriverBindingHandle, 143 149 &gEfiDriverBindingProtocolGuid, DriverBinding, 144 150 &gEfiComponentNameProtocolGuid, ComponentName, … … 152 158 if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { 153 159 Status = gBS->InstallMultipleProtocolInterfaces ( 154 &DriverBinding Handle,160 &DriverBinding->DriverBindingHandle, 155 161 &gEfiDriverBindingProtocolGuid, DriverBinding, 156 162 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, … … 159 165 } else { 160 166 Status = gBS->InstallMultipleProtocolInterfaces ( 161 &DriverBinding Handle,167 &DriverBinding->DriverBindingHandle, 162 168 &gEfiDriverBindingProtocolGuid, DriverBinding, 163 169 &gEfiComponentNameProtocolGuid, ComponentName, … … 169 175 if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { 170 176 Status = gBS->InstallMultipleProtocolInterfaces ( 171 &DriverBinding Handle,177 &DriverBinding->DriverBindingHandle, 172 178 &gEfiDriverBindingProtocolGuid, DriverBinding, 173 179 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, … … 177 183 } else { 178 184 Status = gBS->InstallMultipleProtocolInterfaces ( 179 &DriverBinding Handle,185 &DriverBinding->DriverBindingHandle, 180 186 &gEfiDriverBindingProtocolGuid, DriverBinding, 181 187 &gEfiComponentNameProtocolGuid, ComponentName, … … 192 198 // 193 199 ASSERT_EFI_ERROR (Status); 194 195 //196 // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol197 //198 DriverBinding->ImageHandle = ImageHandle;199 DriverBinding->DriverBindingHandle = DriverBindingHandle;200 200 201 201 return Status; … … 242 242 ASSERT (DriverBinding != NULL); 243 243 244 // 245 // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol 246 // 247 DriverBinding->ImageHandle = ImageHandle; 248 DriverBinding->DriverBindingHandle = DriverBindingHandle; 249 244 250 if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { 245 251 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 246 252 Status = gBS->InstallMultipleProtocolInterfaces ( 247 &DriverBinding Handle,253 &DriverBinding->DriverBindingHandle, 248 254 &gEfiDriverBindingProtocolGuid, DriverBinding, 249 255 NULL … … 251 257 } else { 252 258 Status = gBS->InstallMultipleProtocolInterfaces ( 253 &DriverBinding Handle,259 &DriverBinding->DriverBindingHandle, 254 260 &gEfiDriverBindingProtocolGuid, DriverBinding, 255 261 &gEfiComponentName2ProtocolGuid, ComponentName2, … … 260 266 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 261 267 Status = gBS->InstallMultipleProtocolInterfaces ( 262 &DriverBinding Handle,268 &DriverBinding->DriverBindingHandle, 263 269 &gEfiDriverBindingProtocolGuid, DriverBinding, 264 270 &gEfiComponentNameProtocolGuid, ComponentName, … … 267 273 } else { 268 274 Status = gBS->InstallMultipleProtocolInterfaces ( 269 &DriverBinding Handle,275 &DriverBinding->DriverBindingHandle, 270 276 &gEfiDriverBindingProtocolGuid, DriverBinding, 271 277 &gEfiComponentNameProtocolGuid, ComponentName, … … 275 281 } 276 282 } 283 277 284 // 278 285 // ASSERT if the call to InstallMultipleProtocolInterfaces() failed 279 286 // 280 287 ASSERT_EFI_ERROR (Status); 281 282 //283 // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol284 //285 DriverBinding->ImageHandle = ImageHandle;286 DriverBinding->DriverBindingHandle = DriverBindingHandle;287 288 288 289 return Status; … … 339 340 ASSERT (DriverBinding != NULL); 340 341 342 // 343 // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol 344 // 345 DriverBinding->ImageHandle = ImageHandle; 346 DriverBinding->DriverBindingHandle = DriverBindingHandle; 347 341 348 if (DriverConfiguration2 == NULL) { 342 349 if (DriverConfiguration == NULL) { … … 346 353 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 347 354 Status = gBS->InstallMultipleProtocolInterfaces ( 348 &DriverBinding Handle,349 &gEfiDriverBindingProtocolGuid, DriverBinding, 350 NULL 351 ); 352 } else { 353 Status = gBS->InstallMultipleProtocolInterfaces ( 354 &DriverBinding Handle,355 &gEfiDriverBindingProtocolGuid, DriverBinding, 356 &gEfiComponentName2ProtocolGuid, ComponentName2, 357 NULL 358 ); 359 } 360 } else { 361 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 362 Status = gBS->InstallMultipleProtocolInterfaces ( 363 &DriverBinding Handle,364 &gEfiDriverBindingProtocolGuid, DriverBinding, 365 &gEfiComponentNameProtocolGuid, ComponentName, 366 NULL 367 ); 368 } else { 369 Status = gBS->InstallMultipleProtocolInterfaces ( 370 &DriverBinding Handle,355 &DriverBinding->DriverBindingHandle, 356 &gEfiDriverBindingProtocolGuid, DriverBinding, 357 NULL 358 ); 359 } else { 360 Status = gBS->InstallMultipleProtocolInterfaces ( 361 &DriverBinding->DriverBindingHandle, 362 &gEfiDriverBindingProtocolGuid, DriverBinding, 363 &gEfiComponentName2ProtocolGuid, ComponentName2, 364 NULL 365 ); 366 } 367 } else { 368 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 369 Status = gBS->InstallMultipleProtocolInterfaces ( 370 &DriverBinding->DriverBindingHandle, 371 &gEfiDriverBindingProtocolGuid, DriverBinding, 372 &gEfiComponentNameProtocolGuid, ComponentName, 373 NULL 374 ); 375 } else { 376 Status = gBS->InstallMultipleProtocolInterfaces ( 377 &DriverBinding->DriverBindingHandle, 371 378 &gEfiDriverBindingProtocolGuid, DriverBinding, 372 379 &gEfiComponentNameProtocolGuid, ComponentName, … … 380 387 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 381 388 Status = gBS->InstallMultipleProtocolInterfaces ( 382 &DriverBinding Handle,383 &gEfiDriverBindingProtocolGuid, DriverBinding, 384 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 385 NULL 386 ); 387 } else { 388 Status = gBS->InstallMultipleProtocolInterfaces ( 389 &DriverBinding Handle,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 &DriverBinding Handle,400 &gEfiDriverBindingProtocolGuid, DriverBinding, 401 &gEfiComponentNameProtocolGuid, ComponentName, 402 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 403 NULL 404 ); 405 } else { 406 Status = gBS->InstallMultipleProtocolInterfaces ( 407 &DriverBinding Handle,389 &DriverBinding->DriverBindingHandle, 390 &gEfiDriverBindingProtocolGuid, DriverBinding, 391 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 392 NULL 393 ); 394 } else { 395 Status = gBS->InstallMultipleProtocolInterfaces ( 396 &DriverBinding->DriverBindingHandle, 397 &gEfiDriverBindingProtocolGuid, DriverBinding, 398 &gEfiComponentName2ProtocolGuid, ComponentName2, 399 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 400 NULL 401 ); 402 } 403 } else { 404 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 405 Status = gBS->InstallMultipleProtocolInterfaces ( 406 &DriverBinding->DriverBindingHandle, 407 &gEfiDriverBindingProtocolGuid, DriverBinding, 408 &gEfiComponentNameProtocolGuid, ComponentName, 409 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 410 NULL 411 ); 412 } else { 413 Status = gBS->InstallMultipleProtocolInterfaces ( 414 &DriverBinding->DriverBindingHandle, 408 415 &gEfiDriverBindingProtocolGuid, DriverBinding, 409 416 &gEfiComponentNameProtocolGuid, ComponentName, … … 420 427 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 421 428 Status = gBS->InstallMultipleProtocolInterfaces ( 422 &DriverBinding Handle,423 &gEfiDriverBindingProtocolGuid, DriverBinding, 424 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 425 NULL 426 ); 427 } else { 428 Status = gBS->InstallMultipleProtocolInterfaces ( 429 &DriverBinding Handle,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 &DriverBinding Handle,440 &gEfiDriverBindingProtocolGuid, DriverBinding, 441 &gEfiComponentNameProtocolGuid, ComponentName, 442 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 443 NULL 444 ); 445 } else { 446 Status = gBS->InstallMultipleProtocolInterfaces ( 447 &DriverBinding Handle,429 &DriverBinding->DriverBindingHandle, 430 &gEfiDriverBindingProtocolGuid, DriverBinding, 431 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 432 NULL 433 ); 434 } else { 435 Status = gBS->InstallMultipleProtocolInterfaces ( 436 &DriverBinding->DriverBindingHandle, 437 &gEfiDriverBindingProtocolGuid, DriverBinding, 438 &gEfiComponentName2ProtocolGuid, ComponentName2, 439 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 440 NULL 441 ); 442 } 443 } else { 444 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 445 Status = gBS->InstallMultipleProtocolInterfaces ( 446 &DriverBinding->DriverBindingHandle, 447 &gEfiDriverBindingProtocolGuid, DriverBinding, 448 &gEfiComponentNameProtocolGuid, ComponentName, 449 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 450 NULL 451 ); 452 } else { 453 Status = gBS->InstallMultipleProtocolInterfaces ( 454 &DriverBinding->DriverBindingHandle, 448 455 &gEfiDriverBindingProtocolGuid, DriverBinding, 449 456 &gEfiComponentNameProtocolGuid, ComponentName, … … 458 465 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 459 466 Status = gBS->InstallMultipleProtocolInterfaces ( 460 &DriverBinding Handle,461 &gEfiDriverBindingProtocolGuid, DriverBinding, 462 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 463 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 464 NULL 465 ); 466 } else { 467 Status = gBS->InstallMultipleProtocolInterfaces ( 468 &DriverBinding Handle,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 &DriverBinding Handle,480 &gEfiDriverBindingProtocolGuid, DriverBinding, 481 &gEfiComponentNameProtocolGuid, ComponentName, 482 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 483 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 484 NULL 485 ); 486 } else { 487 Status = gBS->InstallMultipleProtocolInterfaces ( 488 &DriverBinding Handle,467 &DriverBinding->DriverBindingHandle, 468 &gEfiDriverBindingProtocolGuid, DriverBinding, 469 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 470 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 471 NULL 472 ); 473 } else { 474 Status = gBS->InstallMultipleProtocolInterfaces ( 475 &DriverBinding->DriverBindingHandle, 476 &gEfiDriverBindingProtocolGuid, DriverBinding, 477 &gEfiComponentName2ProtocolGuid, ComponentName2, 478 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 479 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 480 NULL 481 ); 482 } 483 } else { 484 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 485 Status = gBS->InstallMultipleProtocolInterfaces ( 486 &DriverBinding->DriverBindingHandle, 487 &gEfiDriverBindingProtocolGuid, DriverBinding, 488 &gEfiComponentNameProtocolGuid, ComponentName, 489 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 490 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 491 NULL 492 ); 493 } else { 494 Status = gBS->InstallMultipleProtocolInterfaces ( 495 &DriverBinding->DriverBindingHandle, 489 496 &gEfiDriverBindingProtocolGuid, DriverBinding, 490 497 &gEfiComponentNameProtocolGuid, ComponentName, … … 504 511 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 505 512 Status = gBS->InstallMultipleProtocolInterfaces ( 506 &DriverBinding Handle,507 &gEfiDriverBindingProtocolGuid, DriverBinding, 508 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 509 NULL 510 ); 511 } else { 512 Status = gBS->InstallMultipleProtocolInterfaces ( 513 &DriverBinding Handle,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 &DriverBinding Handle,524 &gEfiDriverBindingProtocolGuid, DriverBinding, 525 &gEfiComponentNameProtocolGuid, ComponentName, 526 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 527 NULL 528 ); 529 } else { 530 Status = gBS->InstallMultipleProtocolInterfaces ( 531 &DriverBinding Handle,513 &DriverBinding->DriverBindingHandle, 514 &gEfiDriverBindingProtocolGuid, DriverBinding, 515 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 516 NULL 517 ); 518 } else { 519 Status = gBS->InstallMultipleProtocolInterfaces ( 520 &DriverBinding->DriverBindingHandle, 521 &gEfiDriverBindingProtocolGuid, DriverBinding, 522 &gEfiComponentName2ProtocolGuid, ComponentName2, 523 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 524 NULL 525 ); 526 } 527 } else { 528 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 529 Status = gBS->InstallMultipleProtocolInterfaces ( 530 &DriverBinding->DriverBindingHandle, 531 &gEfiDriverBindingProtocolGuid, DriverBinding, 532 &gEfiComponentNameProtocolGuid, ComponentName, 533 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 534 NULL 535 ); 536 } else { 537 Status = gBS->InstallMultipleProtocolInterfaces ( 538 &DriverBinding->DriverBindingHandle, 532 539 &gEfiDriverBindingProtocolGuid, DriverBinding, 533 540 &gEfiComponentNameProtocolGuid, ComponentName, … … 542 549 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 543 550 Status = gBS->InstallMultipleProtocolInterfaces ( 544 &DriverBinding Handle,545 &gEfiDriverBindingProtocolGuid, DriverBinding, 546 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 547 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 548 NULL 549 ); 550 } else { 551 Status = gBS->InstallMultipleProtocolInterfaces ( 552 &DriverBinding Handle,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 &DriverBinding Handle,564 &gEfiDriverBindingProtocolGuid, DriverBinding, 565 &gEfiComponentNameProtocolGuid, ComponentName, 566 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 567 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 568 NULL 569 ); 570 } else { 571 Status = gBS->InstallMultipleProtocolInterfaces ( 572 &DriverBinding Handle,551 &DriverBinding->DriverBindingHandle, 552 &gEfiDriverBindingProtocolGuid, DriverBinding, 553 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 554 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 555 NULL 556 ); 557 } else { 558 Status = gBS->InstallMultipleProtocolInterfaces ( 559 &DriverBinding->DriverBindingHandle, 560 &gEfiDriverBindingProtocolGuid, DriverBinding, 561 &gEfiComponentName2ProtocolGuid, ComponentName2, 562 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 563 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 564 NULL 565 ); 566 } 567 } else { 568 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 569 Status = gBS->InstallMultipleProtocolInterfaces ( 570 &DriverBinding->DriverBindingHandle, 571 &gEfiDriverBindingProtocolGuid, DriverBinding, 572 &gEfiComponentNameProtocolGuid, ComponentName, 573 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 574 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 575 NULL 576 ); 577 } else { 578 Status = gBS->InstallMultipleProtocolInterfaces ( 579 &DriverBinding->DriverBindingHandle, 573 580 &gEfiDriverBindingProtocolGuid, DriverBinding, 574 581 &gEfiComponentNameProtocolGuid, ComponentName, … … 586 593 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 587 594 Status = gBS->InstallMultipleProtocolInterfaces ( 588 &DriverBinding Handle,589 &gEfiDriverBindingProtocolGuid, DriverBinding, 590 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 591 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 592 NULL 593 ); 594 } else { 595 Status = gBS->InstallMultipleProtocolInterfaces ( 596 &DriverBinding Handle,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 &DriverBinding Handle,608 &gEfiDriverBindingProtocolGuid, DriverBinding, 609 &gEfiComponentNameProtocolGuid, ComponentName, 610 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 611 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 612 NULL 613 ); 614 } else { 615 Status = gBS->InstallMultipleProtocolInterfaces ( 616 &DriverBinding Handle,595 &DriverBinding->DriverBindingHandle, 596 &gEfiDriverBindingProtocolGuid, DriverBinding, 597 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 598 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 599 NULL 600 ); 601 } else { 602 Status = gBS->InstallMultipleProtocolInterfaces ( 603 &DriverBinding->DriverBindingHandle, 604 &gEfiDriverBindingProtocolGuid, DriverBinding, 605 &gEfiComponentName2ProtocolGuid, ComponentName2, 606 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 607 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 608 NULL 609 ); 610 } 611 } else { 612 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 613 Status = gBS->InstallMultipleProtocolInterfaces ( 614 &DriverBinding->DriverBindingHandle, 615 &gEfiDriverBindingProtocolGuid, DriverBinding, 616 &gEfiComponentNameProtocolGuid, ComponentName, 617 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 618 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 619 NULL 620 ); 621 } else { 622 Status = gBS->InstallMultipleProtocolInterfaces ( 623 &DriverBinding->DriverBindingHandle, 617 624 &gEfiDriverBindingProtocolGuid, DriverBinding, 618 625 &gEfiComponentNameProtocolGuid, ComponentName, … … 628 635 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 629 636 Status = gBS->InstallMultipleProtocolInterfaces ( 630 &DriverBinding Handle,631 &gEfiDriverBindingProtocolGuid, DriverBinding, 632 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 633 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 634 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 635 NULL 636 ); 637 } else { 638 Status = gBS->InstallMultipleProtocolInterfaces ( 639 &DriverBinding Handle,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 &DriverBinding Handle,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 &DriverBinding Handle,637 &DriverBinding->DriverBindingHandle, 638 &gEfiDriverBindingProtocolGuid, DriverBinding, 639 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 640 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 641 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 642 NULL 643 ); 644 } else { 645 Status = gBS->InstallMultipleProtocolInterfaces ( 646 &DriverBinding->DriverBindingHandle, 647 &gEfiDriverBindingProtocolGuid, DriverBinding, 648 &gEfiComponentName2ProtocolGuid, ComponentName2, 649 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 650 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 651 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 652 NULL 653 ); 654 } 655 } else { 656 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 657 Status = gBS->InstallMultipleProtocolInterfaces ( 658 &DriverBinding->DriverBindingHandle, 659 &gEfiDriverBindingProtocolGuid, DriverBinding, 660 &gEfiComponentNameProtocolGuid, ComponentName, 661 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 662 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 663 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 664 NULL 665 ); 666 } else { 667 Status = gBS->InstallMultipleProtocolInterfaces ( 668 &DriverBinding->DriverBindingHandle, 662 669 &gEfiDriverBindingProtocolGuid, DriverBinding, 663 670 &gEfiComponentNameProtocolGuid, ComponentName, … … 680 687 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 681 688 Status = gBS->InstallMultipleProtocolInterfaces ( 682 &DriverBinding Handle,683 &gEfiDriverBindingProtocolGuid, DriverBinding, 684 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 685 NULL 686 ); 687 } else { 688 Status = gBS->InstallMultipleProtocolInterfaces ( 689 &DriverBinding Handle,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 &DriverBinding Handle,700 &gEfiDriverBindingProtocolGuid, DriverBinding, 701 &gEfiComponentNameProtocolGuid, ComponentName, 702 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 703 NULL 704 ); 705 } else { 706 Status = gBS->InstallMultipleProtocolInterfaces ( 707 &DriverBinding Handle,689 &DriverBinding->DriverBindingHandle, 690 &gEfiDriverBindingProtocolGuid, DriverBinding, 691 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 692 NULL 693 ); 694 } else { 695 Status = gBS->InstallMultipleProtocolInterfaces ( 696 &DriverBinding->DriverBindingHandle, 697 &gEfiDriverBindingProtocolGuid, DriverBinding, 698 &gEfiComponentName2ProtocolGuid, ComponentName2, 699 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 700 NULL 701 ); 702 } 703 } else { 704 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 705 Status = gBS->InstallMultipleProtocolInterfaces ( 706 &DriverBinding->DriverBindingHandle, 707 &gEfiDriverBindingProtocolGuid, DriverBinding, 708 &gEfiComponentNameProtocolGuid, ComponentName, 709 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 710 NULL 711 ); 712 } else { 713 Status = gBS->InstallMultipleProtocolInterfaces ( 714 &DriverBinding->DriverBindingHandle, 708 715 &gEfiDriverBindingProtocolGuid, DriverBinding, 709 716 &gEfiComponentNameProtocolGuid, ComponentName, … … 718 725 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 719 726 Status = gBS->InstallMultipleProtocolInterfaces ( 720 &DriverBinding Handle,721 &gEfiDriverBindingProtocolGuid, DriverBinding, 722 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 723 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 724 NULL 725 ); 726 } else { 727 Status = gBS->InstallMultipleProtocolInterfaces ( 728 &DriverBinding Handle,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 &DriverBinding Handle,740 &gEfiDriverBindingProtocolGuid, DriverBinding, 741 &gEfiComponentNameProtocolGuid, ComponentName, 742 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 743 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 744 NULL 745 ); 746 } else { 747 Status = gBS->InstallMultipleProtocolInterfaces ( 748 &DriverBinding Handle,727 &DriverBinding->DriverBindingHandle, 728 &gEfiDriverBindingProtocolGuid, DriverBinding, 729 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 730 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 731 NULL 732 ); 733 } else { 734 Status = gBS->InstallMultipleProtocolInterfaces ( 735 &DriverBinding->DriverBindingHandle, 736 &gEfiDriverBindingProtocolGuid, DriverBinding, 737 &gEfiComponentName2ProtocolGuid, ComponentName2, 738 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 739 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 740 NULL 741 ); 742 } 743 } else { 744 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 745 Status = gBS->InstallMultipleProtocolInterfaces ( 746 &DriverBinding->DriverBindingHandle, 747 &gEfiDriverBindingProtocolGuid, DriverBinding, 748 &gEfiComponentNameProtocolGuid, ComponentName, 749 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 750 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 751 NULL 752 ); 753 } else { 754 Status = gBS->InstallMultipleProtocolInterfaces ( 755 &DriverBinding->DriverBindingHandle, 749 756 &gEfiDriverBindingProtocolGuid, DriverBinding, 750 757 &gEfiComponentNameProtocolGuid, ComponentName, … … 762 769 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 763 770 Status = gBS->InstallMultipleProtocolInterfaces ( 764 &DriverBinding Handle,765 &gEfiDriverBindingProtocolGuid, DriverBinding, 766 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 767 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 768 NULL 769 ); 770 } else { 771 Status = gBS->InstallMultipleProtocolInterfaces ( 772 &DriverBinding Handle,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 &DriverBinding Handle,784 &gEfiDriverBindingProtocolGuid, DriverBinding, 785 &gEfiComponentNameProtocolGuid, ComponentName, 786 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 787 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 788 NULL 789 ); 790 } else { 791 Status = gBS->InstallMultipleProtocolInterfaces ( 792 &DriverBinding Handle,771 &DriverBinding->DriverBindingHandle, 772 &gEfiDriverBindingProtocolGuid, DriverBinding, 773 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 774 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 775 NULL 776 ); 777 } else { 778 Status = gBS->InstallMultipleProtocolInterfaces ( 779 &DriverBinding->DriverBindingHandle, 780 &gEfiDriverBindingProtocolGuid, DriverBinding, 781 &gEfiComponentName2ProtocolGuid, ComponentName2, 782 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 783 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 784 NULL 785 ); 786 } 787 } else { 788 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 789 Status = gBS->InstallMultipleProtocolInterfaces ( 790 &DriverBinding->DriverBindingHandle, 791 &gEfiDriverBindingProtocolGuid, DriverBinding, 792 &gEfiComponentNameProtocolGuid, ComponentName, 793 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 794 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 795 NULL 796 ); 797 } else { 798 Status = gBS->InstallMultipleProtocolInterfaces ( 799 &DriverBinding->DriverBindingHandle, 793 800 &gEfiDriverBindingProtocolGuid, DriverBinding, 794 801 &gEfiComponentNameProtocolGuid, ComponentName, … … 804 811 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 805 812 Status = gBS->InstallMultipleProtocolInterfaces ( 806 &DriverBinding Handle,807 &gEfiDriverBindingProtocolGuid, DriverBinding, 808 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 809 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 810 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 811 NULL 812 ); 813 } else { 814 Status = gBS->InstallMultipleProtocolInterfaces ( 815 &DriverBinding Handle,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 &DriverBinding Handle,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 &DriverBinding Handle,813 &DriverBinding->DriverBindingHandle, 814 &gEfiDriverBindingProtocolGuid, DriverBinding, 815 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 816 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 817 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 818 NULL 819 ); 820 } else { 821 Status = gBS->InstallMultipleProtocolInterfaces ( 822 &DriverBinding->DriverBindingHandle, 823 &gEfiDriverBindingProtocolGuid, DriverBinding, 824 &gEfiComponentName2ProtocolGuid, ComponentName2, 825 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 826 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 827 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 828 NULL 829 ); 830 } 831 } else { 832 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 833 Status = gBS->InstallMultipleProtocolInterfaces ( 834 &DriverBinding->DriverBindingHandle, 835 &gEfiDriverBindingProtocolGuid, DriverBinding, 836 &gEfiComponentNameProtocolGuid, ComponentName, 837 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 838 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 839 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 840 NULL 841 ); 842 } else { 843 Status = gBS->InstallMultipleProtocolInterfaces ( 844 &DriverBinding->DriverBindingHandle, 838 845 &gEfiDriverBindingProtocolGuid, DriverBinding, 839 846 &gEfiComponentNameProtocolGuid, ComponentName, … … 854 861 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 855 862 Status = gBS->InstallMultipleProtocolInterfaces ( 856 &DriverBinding Handle,857 &gEfiDriverBindingProtocolGuid, DriverBinding, 858 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 859 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 860 NULL 861 ); 862 } else { 863 Status = gBS->InstallMultipleProtocolInterfaces ( 864 &DriverBinding Handle,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 &DriverBinding Handle,876 &gEfiDriverBindingProtocolGuid, DriverBinding, 877 &gEfiComponentNameProtocolGuid, ComponentName, 878 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 879 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 880 NULL 881 ); 882 } else { 883 Status = gBS->InstallMultipleProtocolInterfaces ( 884 &DriverBinding Handle,863 &DriverBinding->DriverBindingHandle, 864 &gEfiDriverBindingProtocolGuid, DriverBinding, 865 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 866 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 867 NULL 868 ); 869 } else { 870 Status = gBS->InstallMultipleProtocolInterfaces ( 871 &DriverBinding->DriverBindingHandle, 872 &gEfiDriverBindingProtocolGuid, DriverBinding, 873 &gEfiComponentName2ProtocolGuid, ComponentName2, 874 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 875 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 876 NULL 877 ); 878 } 879 } else { 880 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 881 Status = gBS->InstallMultipleProtocolInterfaces ( 882 &DriverBinding->DriverBindingHandle, 883 &gEfiDriverBindingProtocolGuid, DriverBinding, 884 &gEfiComponentNameProtocolGuid, ComponentName, 885 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 886 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 887 NULL 888 ); 889 } else { 890 Status = gBS->InstallMultipleProtocolInterfaces ( 891 &DriverBinding->DriverBindingHandle, 885 892 &gEfiDriverBindingProtocolGuid, DriverBinding, 886 893 &gEfiComponentNameProtocolGuid, ComponentName, … … 896 903 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 897 904 Status = gBS->InstallMultipleProtocolInterfaces ( 898 &DriverBinding Handle,899 &gEfiDriverBindingProtocolGuid, DriverBinding, 900 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 901 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 902 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 903 NULL 904 ); 905 } else { 906 Status = gBS->InstallMultipleProtocolInterfaces ( 907 &DriverBinding Handle,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 &DriverBinding Handle,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 &DriverBinding Handle,905 &DriverBinding->DriverBindingHandle, 906 &gEfiDriverBindingProtocolGuid, DriverBinding, 907 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 908 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 909 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 910 NULL 911 ); 912 } else { 913 Status = gBS->InstallMultipleProtocolInterfaces ( 914 &DriverBinding->DriverBindingHandle, 915 &gEfiDriverBindingProtocolGuid, DriverBinding, 916 &gEfiComponentName2ProtocolGuid, ComponentName2, 917 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 918 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 919 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 920 NULL 921 ); 922 } 923 } else { 924 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 925 Status = gBS->InstallMultipleProtocolInterfaces ( 926 &DriverBinding->DriverBindingHandle, 927 &gEfiDriverBindingProtocolGuid, DriverBinding, 928 &gEfiComponentNameProtocolGuid, ComponentName, 929 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 930 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 931 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 932 NULL 933 ); 934 } else { 935 Status = gBS->InstallMultipleProtocolInterfaces ( 936 &DriverBinding->DriverBindingHandle, 930 937 &gEfiDriverBindingProtocolGuid, DriverBinding, 931 938 &gEfiComponentNameProtocolGuid, ComponentName, … … 944 951 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 945 952 Status = gBS->InstallMultipleProtocolInterfaces ( 946 &DriverBinding Handle,947 &gEfiDriverBindingProtocolGuid, DriverBinding, 948 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 949 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 950 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 951 NULL 952 ); 953 } else { 954 Status = gBS->InstallMultipleProtocolInterfaces ( 955 &DriverBinding Handle,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 &DriverBinding Handle,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 &DriverBinding Handle,953 &DriverBinding->DriverBindingHandle, 954 &gEfiDriverBindingProtocolGuid, DriverBinding, 955 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 956 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 957 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 958 NULL 959 ); 960 } else { 961 Status = gBS->InstallMultipleProtocolInterfaces ( 962 &DriverBinding->DriverBindingHandle, 963 &gEfiDriverBindingProtocolGuid, DriverBinding, 964 &gEfiComponentName2ProtocolGuid, ComponentName2, 965 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 966 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 967 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 968 NULL 969 ); 970 } 971 } else { 972 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 973 Status = gBS->InstallMultipleProtocolInterfaces ( 974 &DriverBinding->DriverBindingHandle, 975 &gEfiDriverBindingProtocolGuid, DriverBinding, 976 &gEfiComponentNameProtocolGuid, ComponentName, 977 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 978 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 979 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 980 NULL 981 ); 982 } else { 983 Status = gBS->InstallMultipleProtocolInterfaces ( 984 &DriverBinding->DriverBindingHandle, 978 985 &gEfiDriverBindingProtocolGuid, DriverBinding, 979 986 &gEfiComponentNameProtocolGuid, ComponentName, … … 990 997 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 991 998 Status = gBS->InstallMultipleProtocolInterfaces ( 992 &DriverBinding Handle,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 &DriverBinding Handle,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 &DriverBinding Handle,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 &DriverBinding Handle,999 &DriverBinding->DriverBindingHandle, 1000 &gEfiDriverBindingProtocolGuid, DriverBinding, 1001 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 1002 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 1003 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 1004 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 1005 NULL 1006 ); 1007 } else { 1008 Status = gBS->InstallMultipleProtocolInterfaces ( 1009 &DriverBinding->DriverBindingHandle, 1010 &gEfiDriverBindingProtocolGuid, DriverBinding, 1011 &gEfiComponentName2ProtocolGuid, ComponentName2, 1012 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 1013 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 1014 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 1015 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 1016 NULL 1017 ); 1018 } 1019 } else { 1020 if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { 1021 Status = gBS->InstallMultipleProtocolInterfaces ( 1022 &DriverBinding->DriverBindingHandle, 1023 &gEfiDriverBindingProtocolGuid, DriverBinding, 1024 &gEfiComponentNameProtocolGuid, ComponentName, 1025 &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, 1026 &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, 1027 &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, 1028 &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, 1029 NULL 1030 ); 1031 } else { 1032 Status = gBS->InstallMultipleProtocolInterfaces ( 1033 &DriverBinding->DriverBindingHandle, 1027 1034 &gEfiDriverBindingProtocolGuid, DriverBinding, 1028 1035 &gEfiComponentNameProtocolGuid, ComponentName, … … 1041 1048 } 1042 1049 1043 1044 1050 // 1045 1051 // ASSERT if the call to InstallMultipleProtocolInterfaces() failed 1046 1052 // 1047 1053 ASSERT_EFI_ERROR (Status); 1048 1049 //1050 // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol1051 //1052 DriverBinding->ImageHandle = ImageHandle;1053 DriverBinding->DriverBindingHandle = DriverBindingHandle;1054 1054 1055 1055 return Status; 1056 1056 } 1057 1058 -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiLib.c
r48674 r58459 6 6 and print messages on the console output and standard error devices. 7 7 8 Copyright (c) 2006 - 201 0, Intel Corporation. All rights reserved.<BR>8 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 9 9 This program and the accompanying materials 10 10 are licensed and made available under the terms and conditions of the BSD License … … 1213 1213 } 1214 1214 1215 /** 1215 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES 1216 1217 /** 1218 [ATTENTION] This function will be deprecated for security reason. 1219 1216 1220 Returns a pointer to an allocated buffer that contains the contents of a 1217 1221 variable retrieved through the UEFI Runtime Service GetVariable(). The … … 1274 1278 } 1275 1279 1276 1277 /** 1280 /** 1281 [ATTENTION] This function will be deprecated for security reason. 1282 1278 1283 Returns a pointer to an allocated buffer that contains the contents of a 1279 1284 variable retrieved through the UEFI Runtime Service GetVariable(). This … … 1299 1304 return GetVariable (Name, &gEfiGlobalVariableGuid); 1300 1305 } 1301 1306 #endif 1307 1308 /** 1309 Returns the status whether get the variable success. The function retrieves 1310 variable through the UEFI Runtime Service GetVariable(). The 1311 returned buffer is allocated using AllocatePool(). The caller is responsible 1312 for freeing this buffer with FreePool(). 1313 1314 If Name is NULL, then ASSERT(). 1315 If Guid is NULL, then ASSERT(). 1316 If Value is NULL, then ASSERT(). 1317 1318 @param[in] Name The pointer to a Null-terminated Unicode string. 1319 @param[in] Guid The pointer to an EFI_GUID structure 1320 @param[out] Value The buffer point saved the variable info. 1321 @param[out] Size The buffer size of the variable. 1322 1323 @return EFI_OUT_OF_RESOURCES Allocate buffer failed. 1324 @return EFI_SUCCESS Find the specified variable. 1325 @return Others Errors Return errors from call to gRT->GetVariable. 1326 1327 **/ 1328 EFI_STATUS 1329 EFIAPI 1330 GetVariable2 ( 1331 IN CONST CHAR16 *Name, 1332 IN CONST EFI_GUID *Guid, 1333 OUT VOID **Value, 1334 OUT UINTN *Size OPTIONAL 1335 ) 1336 { 1337 EFI_STATUS Status; 1338 UINTN BufferSize; 1339 1340 ASSERT (Name != NULL && Guid != NULL && Value != NULL); 1341 1342 // 1343 // Try to get the variable size. 1344 // 1345 BufferSize = 0; 1346 *Value = NULL; 1347 if (Size != NULL) { 1348 *Size = 0; 1349 } 1350 1351 Status = gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL, &BufferSize, *Value); 1352 if (Status != EFI_BUFFER_TOO_SMALL) { 1353 return Status; 1354 } 1355 1356 // 1357 // Allocate buffer to get the variable. 1358 // 1359 *Value = AllocatePool (BufferSize); 1360 ASSERT (*Value != NULL); 1361 if (*Value == NULL) { 1362 return EFI_OUT_OF_RESOURCES; 1363 } 1364 1365 // 1366 // Get the variable data. 1367 // 1368 Status = gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL, &BufferSize, *Value); 1369 if (EFI_ERROR (Status)) { 1370 FreePool(*Value); 1371 *Value = NULL; 1372 } 1373 1374 if (Size != NULL) { 1375 *Size = BufferSize; 1376 } 1377 1378 return Status; 1379 } 1380 1381 /** 1382 Returns a pointer to an allocated buffer that contains the contents of a 1383 variable retrieved through the UEFI Runtime Service GetVariable(). This 1384 function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables. 1385 The returned buffer is allocated using AllocatePool(). The caller is 1386 responsible for freeing this buffer with FreePool(). 1387 1388 If Name is NULL, then ASSERT(). 1389 If Value is NULL, then ASSERT(). 1390 1391 @param[in] Name The pointer to a Null-terminated Unicode string. 1392 @param[out] Value The buffer point saved the variable info. 1393 @param[out] Size The buffer size of the variable. 1394 1395 @return EFI_OUT_OF_RESOURCES Allocate buffer failed. 1396 @return EFI_SUCCESS Find the specified variable. 1397 @return Others Errors Return errors from call to gRT->GetVariable. 1398 1399 **/ 1400 EFI_STATUS 1401 EFIAPI 1402 GetEfiGlobalVariable2 ( 1403 IN CONST CHAR16 *Name, 1404 OUT VOID **Value, 1405 OUT UINTN *Size OPTIONAL 1406 ) 1407 { 1408 return GetVariable2 (Name, &gEfiGlobalVariableGuid, Value, Size); 1409 } 1302 1410 1303 1411 /** -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiLib.inf
r48674 r58459 8 8 # and print messages on the console output and standard error devices. 9 9 # 10 # Copyright (c) 2007 - 201 1, Intel Corporation. All rights reserved.<BR>10 # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 11 11 # 12 12 # This program and the accompanying materials … … 23 23 INF_VERSION = 0x00010005 24 24 BASE_NAME = UefiLib 25 MODULE_UNI_FILE = UefiLib.uni 25 26 FILE_GUID = 3a004ba5-efe0-4a61-9f1a-267a46ae5ba9 26 27 MODULE_TYPE = UEFI_DRIVER … … 59 60 60 61 [Guids] 61 gEfiEventReadyToBootGuid ## CONSUMES ## Event62 gEfiEventLegacyBootGuid ## CONSUMES ## Event63 gEfiGlobalVariableGuid ## CONSUMES ## Variable62 gEfiEventReadyToBootGuid ## SOMETIMES_CONSUMES ## Event 63 gEfiEventLegacyBootGuid ## SOMETIMES_CONSUMES ## Event 64 gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable 64 65 65 66 [Protocols] 66 gEfiDriverBindingProtocolGuid ## PRODUCES67 gEfiSimpleTextOutProtocolGuid ## CONSUMES68 gEfiGraphicsOutputProtocolGuid ## CONSUMES69 gEfiHiiFontProtocolGuid ## CONSUMES70 gEfiUgaDrawProtocolGuid | gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## SOMETIMES_CONSUMES (Consumes if gEfiGraphicsOutputProtocolGuid uninstalled)71 gEfiComponentNameProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable ## SOMETIMES_PRODUCES (User chooses to produce it)72 gEfiComponentName2ProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable ## SOMETIMES_PRODUCES (User chooses to produce it)73 gEfiDriverConfigurationProtocolGuid ## SOMETIMES_ CONSUMES (User chooses to produce it)74 gEfiDriverConfiguration2ProtocolGuid ## SOMETIMES_ CONSUMES (User chooses to produce it)75 gEfiDriverDiagnosticsProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable ## SOMETIMES_ CONSUMES (User chooses to produce it)76 gEfiDriverDiagnostics2ProtocolGuid| NOT gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable ## SOMETIMES_ CONSUMES (User chooses to produce it)67 gEfiDriverBindingProtocolGuid ## SOMETIMES_PRODUCES 68 gEfiSimpleTextOutProtocolGuid ## SOMETIMES_CONSUMES 69 gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES 70 gEfiHiiFontProtocolGuid ## SOMETIMES_CONSUMES 71 gEfiUgaDrawProtocolGuid | gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## SOMETIMES_CONSUMES # Consumes if gEfiGraphicsOutputProtocolGuid uninstalled 72 gEfiComponentNameProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable ## SOMETIMES_PRODUCES # User chooses to produce it 73 gEfiComponentName2ProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable ## SOMETIMES_PRODUCES # User chooses to produce it 74 gEfiDriverConfigurationProtocolGuid ## SOMETIMES_PRODUCES # User chooses to produce it 75 gEfiDriverConfiguration2ProtocolGuid ## SOMETIMES_PRODUCES # User chooses to produce it 76 gEfiDriverDiagnosticsProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable ## SOMETIMES_PRODUCES # User chooses to produce it 77 gEfiDriverDiagnostics2ProtocolGuid| NOT gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable ## SOMETIMES_PRODUCES # User chooses to produce it 77 78 78 79 79 80 [Pcd] 80 gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize ## CONSUMES81 gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize ## SOMETIMES_CONSUMES 81 82 82 83 [FeaturePcd] … … 87 88 gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES 88 89 89 -
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiNotTiano.c
r48674 r58459 35 35 VOID 36 36 EFIAPI 37 InternalEmptyFun tion (37 InternalEmptyFunction ( 38 38 IN EFI_EVENT Event, 39 39 IN VOID *Context … … 68 68 return EfiCreateEventLegacyBootEx ( 69 69 TPL_CALLBACK, 70 InternalEmptyFun tion,70 InternalEmptyFunction, 71 71 NULL, 72 72 LegacyBootEvent … … 102 102 ) 103 103 { 104 EFI_STATUS Status; 104 EFI_STATUS Status; 105 EFI_EVENT_NOTIFY WorkerNotifyFunction; 105 106 106 107 ASSERT (LegacyBootEvent != NULL); … … 115 116 // For UEFI 2.0 and the future use an Event Group 116 117 // 118 if (NotifyFunction == NULL) { 119 // 120 // CreateEventEx will check NotifyFunction is NULL or not and return error. 121 // Use dummy routine for the case NotifyFunction is NULL. 122 // 123 WorkerNotifyFunction = InternalEmptyFunction; 124 } else { 125 WorkerNotifyFunction = NotifyFunction; 126 } 117 127 Status = gBS->CreateEventEx ( 118 128 EVT_NOTIFY_SIGNAL, 119 129 NotifyTpl, 120 NotifyFunction,130 WorkerNotifyFunction, 121 131 NotifyContext, 122 132 &gEfiEventLegacyBootGuid, … … 153 163 return EfiCreateEventReadyToBootEx ( 154 164 TPL_CALLBACK, 155 InternalEmptyFun tion,165 InternalEmptyFunction, 156 166 NULL, 157 167 ReadyToBootEvent … … 187 197 ) 188 198 { 189 EFI_STATUS Status; 199 EFI_STATUS Status; 200 EFI_EVENT_NOTIFY WorkerNotifyFunction; 190 201 191 202 ASSERT (ReadyToBootEvent != NULL); … … 200 211 // For UEFI 2.0 and the future use an Event Group 201 212 // 213 if (NotifyFunction == NULL) { 214 // 215 // CreateEventEx will check NotifyFunction is NULL or not and return error. 216 // Use dummy routine for the case NotifyFunction is NULL. 217 // 218 WorkerNotifyFunction = InternalEmptyFunction; 219 } else { 220 WorkerNotifyFunction = NotifyFunction; 221 } 202 222 Status = gBS->CreateEventEx ( 203 223 EVT_NOTIFY_SIGNAL, 204 224 NotifyTpl, 205 NotifyFunction,225 WorkerNotifyFunction, 206 226 NotifyContext, 207 227 &gEfiEventReadyToBootGuid,
Note:
See TracChangeset
for help on using the changeset viewer.