VirtualBox

Ignore:
Timestamp:
Oct 28, 2015 8:17:18 PM (9 years ago)
Author:
vboxsync
Message:

EFI/Firmware: 'svn merge /vendor/edk2/UDK2010.SR1 /vendor/edk2/current .', reverting and removing files+dirs listed in ReadMe.vbox, resolving conflicts with help from ../UDK2014.SP1/. This is a raw untested merge.

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

Legend:

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

  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiHobLib/HobLib.c

    r48674 r58459  
    22  Provide Hob Library functions for Pei phase.
    33
    4 Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
     4Copyright (c) 2007 - 2014, 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
     
    302302
    303303/**
     304  Builds a HOB that describes a chunk of system memory with Owner GUID.
     305
     306  This function builds a HOB that describes a chunk of system memory.
     307  It can only be invoked during PEI phase;
     308  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
     309 
     310  If there is no additional space for HOB creation, then ASSERT().
     311
     312  @param  ResourceType        The type of resource described by this HOB.
     313  @param  ResourceAttribute   The resource attributes of the memory described by this HOB.
     314  @param  PhysicalStart       The 64 bit physical address of memory described by this HOB.
     315  @param  NumberOfBytes       The length of the memory described by this HOB in bytes.
     316  @param  OwnerGUID           GUID for the owner of this resource.
     317
     318**/
     319VOID
     320EFIAPI
     321BuildResourceDescriptorWithOwnerHob (
     322  IN EFI_RESOURCE_TYPE            ResourceType,
     323  IN EFI_RESOURCE_ATTRIBUTE_TYPE  ResourceAttribute,
     324  IN EFI_PHYSICAL_ADDRESS         PhysicalStart,
     325  IN UINT64                       NumberOfBytes,
     326  IN EFI_GUID                     *OwnerGUID
     327  )
     328{
     329  EFI_HOB_RESOURCE_DESCRIPTOR  *Hob;
     330
     331  Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, (UINT16) sizeof (EFI_HOB_RESOURCE_DESCRIPTOR));
     332  if (Hob == NULL) {
     333    return;
     334  }
     335
     336  Hob->ResourceType      = ResourceType;
     337  Hob->ResourceAttribute = ResourceAttribute;
     338  Hob->PhysicalStart     = PhysicalStart;
     339  Hob->ResourceLength    = NumberOfBytes;
     340
     341  CopyGuid (&Hob->Owner, OwnerGUID);
     342}
     343
     344/**
    304345  Builds a HOB that describes a chunk of system memory.
    305346
     
    336377  Hob->PhysicalStart     = PhysicalStart;
    337378  Hob->ResourceLength    = NumberOfBytes;
     379  ZeroMem (&(Hob->Owner), sizeof (EFI_GUID));
    338380}
    339381
     
    350392  If Guid is NULL, then ASSERT().
    351393  If there is no additional space for HOB creation, then ASSERT().
    352   If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
     394  If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
     395  HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
    353396
    354397  @param  Guid          The GUID to tag the customized HOB.
     
    376419  // Make sure that data length is not too long.
    377420  //
    378   ASSERT (DataLength <= (0xffff - sizeof (EFI_HOB_GUID_TYPE)));
     421  ASSERT (DataLength <= (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)));
    379422
    380423  Hob = InternalPeiCreateHob (EFI_HOB_TYPE_GUID_EXTENSION, (UINT16) (sizeof (EFI_HOB_GUID_TYPE) + DataLength));
     
    400443  If Data is NULL and DataLength > 0, then ASSERT().
    401444  If there is no additional space for HOB creation, then ASSERT().
    402   If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
     445  If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
     446  HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
    403447
    404448  @param  Guid          The GUID to tag the customized HOB.
Note: See TracChangeset for help on using the changeset viewer.

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