Changeset 77662 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeHobLib/HobLib.c
- Timestamp:
- Mar 12, 2019 12:40:12 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129295
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776 /vendor/edk2/current 103735-103757,103769-103776,129194-129237
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeHobLib/HobLib.c
r58466 r77662 2 2 HOB Library implemenation for Dxe Phase. 3 3 4 Copyright (c) 2006 - 201 4, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2006 - 2017, 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 … … 23 23 24 24 VOID *mHobList = NULL; 25 26 /**27 The constructor function caches the pointer to HOB list.28 29 The constructor function gets the start address of HOB list from system configuration table.30 It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.31 32 @param ImageHandle The firmware allocated handle for the EFI image.33 @param SystemTable A pointer to the EFI System Table.34 35 @retval EFI_SUCCESS The constructor successfully gets HobList.36 @retval Other value The constructor can't get HobList.37 38 **/39 EFI_STATUS40 EFIAPI41 HobLibConstructor (42 IN EFI_HANDLE ImageHandle,43 IN EFI_SYSTEM_TABLE *SystemTable44 )45 {46 EFI_STATUS Status;47 48 Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, &mHobList);49 ASSERT_EFI_ERROR (Status);50 ASSERT (mHobList != NULL);51 52 return Status;53 }54 25 55 26 /** … … 66 37 If the pointer to the HOB list is NULL, then ASSERT(). 67 38 39 This function also caches the pointer to the HOB list retrieved. 40 68 41 @return The pointer to the HOB list. 69 42 … … 75 48 ) 76 49 { 77 ASSERT (mHobList != NULL); 50 EFI_STATUS Status; 51 52 if (mHobList == NULL) { 53 Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, &mHobList); 54 ASSERT_EFI_ERROR (Status); 55 ASSERT (mHobList != NULL); 56 } 78 57 return mHobList; 58 } 59 60 /** 61 The constructor function caches the pointer to HOB list by calling GetHobList() 62 and will always return EFI_SUCCESS. 63 64 @param ImageHandle The firmware allocated handle for the EFI image. 65 @param SystemTable A pointer to the EFI System Table. 66 67 @retval EFI_SUCCESS The constructor successfully gets HobList. 68 69 **/ 70 EFI_STATUS 71 EFIAPI 72 HobLibConstructor ( 73 IN EFI_HANDLE ImageHandle, 74 IN EFI_SYSTEM_TABLE *SystemTable 75 ) 76 { 77 GetHobList (); 78 79 return EFI_SUCCESS; 79 80 } 80 81 … … 419 420 420 421 If there is no additional space for HOB creation, then ASSERT(). 422 If the FvImage buffer is not at its required alignment, then ASSERT(). 421 423 422 424 @param BaseAddress The base address of the Firmware Volume. … … 445 447 446 448 If there is no additional space for HOB creation, then ASSERT(). 449 If the FvImage buffer is not at its required alignment, then ASSERT(). 447 450 448 451 @param BaseAddress The base address of the Firmware Volume. … … 464 467 } 465 468 469 /** 470 Builds a EFI_HOB_TYPE_FV3 HOB. 471 472 This function builds a EFI_HOB_TYPE_FV3 HOB. 473 It can only be invoked during PEI phase; 474 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 475 476 If there is no additional space for HOB creation, then ASSERT(). 477 If the FvImage buffer is not at its required alignment, then ASSERT(). 478 479 @param BaseAddress The base address of the Firmware Volume. 480 @param Length The size of the Firmware Volume in bytes. 481 @param AuthenticationStatus The authentication status. 482 @param ExtractedFv TRUE if the FV was extracted as a file within 483 another firmware volume. FALSE otherwise. 484 @param FvName The name of the Firmware Volume. 485 Valid only if IsExtractedFv is TRUE. 486 @param FileName The name of the file. 487 Valid only if IsExtractedFv is TRUE. 488 489 **/ 490 VOID 491 EFIAPI 492 BuildFv3Hob ( 493 IN EFI_PHYSICAL_ADDRESS BaseAddress, 494 IN UINT64 Length, 495 IN UINT32 AuthenticationStatus, 496 IN BOOLEAN ExtractedFv, 497 IN CONST EFI_GUID *FvName, OPTIONAL 498 IN CONST EFI_GUID *FileName OPTIONAL 499 ) 500 { 501 ASSERT (FALSE); 502 } 466 503 467 504 /**
Note:
See TracChangeset
for help on using the changeset viewer.