TianoCore EDK2 master
|
#include <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
#include <Guid/MemoryAllocationHob.h>
#include <Library/IoLib.h>
#include <Library/CpuLib.h>
#include <IndustryStandard/Acpi.h>
#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
#include <Guid/AcpiBoardInfoGuid.h>
#include <UniversalPayload/AcpiTable.h>
#include <UniversalPayload/UniversalPayload.h>
#include <UniversalPayload/ExtraData.h>
Go to the source code of this file.
Macros | |
#define | MEMORY_ATTRIBUTE_MASK |
#define | TESTED_MEMORY_ATTRIBUTES |
Functions | |
VOID *EFIAPI | CreateHob (IN UINT16 HobType, IN UINT16 HobLength) |
EFI_HOB_HANDOFF_INFO_TABLE *EFIAPI | HobConstructor (IN VOID *EfiMemoryBottom, IN VOID *EfiMemoryTop, IN VOID *EfiFreeMemoryBottom, IN VOID *EfiFreeMemoryTop) |
ACPI_BOARD_INFO * | BuildHobFromAcpi (IN UINT64 AcpiTableBase) |
VOID | AddNewHob (IN EFI_PEI_HOB_POINTERS *Hob) |
EFI_HOB_RESOURCE_DESCRIPTOR * | FindResourceDescriptorByRange (IN VOID *HobList, IN EFI_PHYSICAL_ADDRESS Base, IN EFI_PHYSICAL_ADDRESS Top) |
EFI_HOB_RESOURCE_DESCRIPTOR * | FindAnotherHighestBelow4GResourceDescriptor (IN VOID *HobList, IN UINTN MinimalNeededSize, IN EFI_HOB_RESOURCE_DESCRIPTOR *ExceptResourceHob) |
BOOLEAN | IsHobNeed (EFI_PEI_HOB_POINTERS Hob) |
Variables | |
VOID * | mHobList |
Copyright (c) 2024, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HobParseLib.c.
#define MEMORY_ATTRIBUTE_MASK |
Definition at line 23 of file HobParseLib.c.
#define TESTED_MEMORY_ATTRIBUTES |
Definition at line 35 of file HobParseLib.c.
VOID AddNewHob | ( | IN EFI_PEI_HOB_POINTERS * | Hob | ) |
Add HOB into HOB list
[in] | Hob | The HOB to be added into the HOB list. |
Definition at line 101 of file HobParseLib.c.
ACPI_BOARD_INFO * BuildHobFromAcpi | ( | IN UINT64 | AcpiTableBase | ) |
Build ACPI board info HOB using infomation from ACPI table
AcpiTableBase | ACPI table start address in memory |
A | pointer to ACPI board HOB ACPI_BOARD_INFO. Null if build HOB failure. |
Definition at line 139 of file AcpiTable.c.
Add a new HOB to the HOB List.
HobType | Type of the new HOB. |
HobLength | Length of the new HOB to allocate. |
This service enables PEIMs to create various types of HOBs.
Type | The type of HOB to be installed. |
Length | The length of the HOB to be added. |
!NULL | The HOB was successfully created. |
NULL | There is no additional space for HOB creation. |
EFI_HOB_RESOURCE_DESCRIPTOR * FindAnotherHighestBelow4GResourceDescriptor | ( | IN VOID * | HobList, |
IN UINTN | MinimalNeededSize, | ||
IN EFI_HOB_RESOURCE_DESCRIPTOR * | ExceptResourceHob | ||
) |
Find the highest below 4G memory resource descriptor, except the input Resource Descriptor.
[in] | HobList | Hob start address |
[in] | MinimalNeededSize | Minimal needed size. |
[in] | ExceptResourceHob | Ignore this Resource Descriptor. |
The | pointer to the Resource Descriptor HOB. |
Definition at line 184 of file HobParseLib.c.
EFI_HOB_RESOURCE_DESCRIPTOR * FindResourceDescriptorByRange | ( | IN VOID * | HobList, |
IN EFI_PHYSICAL_ADDRESS | Base, | ||
IN EFI_PHYSICAL_ADDRESS | Top | ||
) |
Found the Resource Descriptor HOB that contains a range (Base, Top)
[in] | HobList | Hob start address |
[in] | Base | Memory start address |
[in] | Top | Memory end address. |
The | pointer to the Resource Descriptor HOB. |
Definition at line 128 of file HobParseLib.c.
EFI_HOB_HANDOFF_INFO_TABLE *EFIAPI HobConstructor | ( | IN VOID * | EfiMemoryBottom, |
IN VOID * | EfiMemoryTop, | ||
IN VOID * | EfiFreeMemoryBottom, | ||
IN VOID * | EfiFreeMemoryTop | ||
) |
Build a Handoff Information Table HOB
This function initialize a HOB region from EfiMemoryBegin to EfiMemoryTop. And EfiFreeMemoryBottom and EfiFreeMemoryTop should be inside the HOB region.
[in] | EfiMemoryBottom | Total memory start address |
[in] | EfiMemoryTop | Total memory end address. |
[in] | EfiFreeMemoryBottom | Free memory start address |
[in] | EfiFreeMemoryTop | Free memory end address. |
BOOLEAN IsHobNeed | ( | EFI_PEI_HOB_POINTERS | Hob | ) |
Check the HOB and decide if it is need inside Payload
Payload maintainer may make decision which HOB is need or needn't Then add the check logic in the function.
[in] | Hob | The HOB to check |
TRUE | If HOB is need inside Payload |
FALSE | If HOB is needn't inside Payload |
Definition at line 264 of file HobParseLib.c.