VirtualBox

Ignore:
Timestamp:
Mar 12, 2019 12:40:12 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129295
Message:

EFI: First step in UDK2018 merge. Does not build yet.

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/DxeHobLib/HobLib.c

    r58466 r77662  
    22  HOB Library implemenation for Dxe Phase.
    33
    4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
     4Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
    66are licensed and made available under the terms and conditions of the BSD License
     
    2323
    2424VOID  *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_STATUS
    40 EFIAPI
    41 HobLibConstructor (
    42   IN EFI_HANDLE        ImageHandle,
    43   IN EFI_SYSTEM_TABLE  *SystemTable
    44   )
    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 }
    5425
    5526/**
     
    6637  If the pointer to the HOB list is NULL, then ASSERT().
    6738
     39  This function also caches the pointer to the HOB list retrieved.
     40
    6841  @return The pointer to the HOB list.
    6942
     
    7548  )
    7649{
    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  }
    7857  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**/
     70EFI_STATUS
     71EFIAPI
     72HobLibConstructor (
     73  IN EFI_HANDLE        ImageHandle,
     74  IN EFI_SYSTEM_TABLE  *SystemTable
     75  )
     76{
     77  GetHobList ();
     78
     79  return EFI_SUCCESS;
    7980}
    8081
     
    419420
    420421  If there is no additional space for HOB creation, then ASSERT().
     422  If the FvImage buffer is not at its required alignment, then ASSERT().
    421423
    422424  @param  BaseAddress   The base address of the Firmware Volume.
     
    445447
    446448  If there is no additional space for HOB creation, then ASSERT().
     449  If the FvImage buffer is not at its required alignment, then ASSERT().
    447450
    448451  @param  BaseAddress   The base address of the Firmware Volume.
     
    464467}
    465468
     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**/
     490VOID
     491EFIAPI
     492BuildFv3Hob (
     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}
    466503
    467504/**
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette