TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestPeiServicesTablePointerLibHob.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI UnitTestGetHobList (IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT VOID **HobList)
 
EFI_STATUS EFIAPI UnitTestCreateHob (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINT16 Type, IN UINT16 Length, IN OUT VOID **Hob)
 
EFI_STATUS UnitTestCoreBuildHobHandoffInfoTable (IN EFI_BOOT_MODE BootMode, IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN UINT64 MemoryLength)
 

Detailed Description

This file implements some PEI services about Hob.

Copyright (c) 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UnitTestPeiServicesTablePointerLibHob.c.

Function Documentation

◆ UnitTestCoreBuildHobHandoffInfoTable()

EFI_STATUS UnitTestCoreBuildHobHandoffInfoTable ( IN EFI_BOOT_MODE  BootMode,
IN EFI_PHYSICAL_ADDRESS  MemoryBegin,
IN UINT64  MemoryLength 
)

Builds a Handoff Information Table HOB

Parameters
BootMode- Current Bootmode
MemoryBegin- Start Memory Address.
MemoryLength- Length of Memory.
Returns
EFI_SUCCESS Always success to initialize HOB.

Definition at line 126 of file UnitTestPeiServicesTablePointerLibHob.c.

◆ UnitTestCreateHob()

EFI_STATUS EFIAPI UnitTestCreateHob ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN UINT16  Type,
IN UINT16  Length,
IN OUT VOID **  Hob 
)

Add a new HOB to the HOB List.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
TypeType of the new HOB.
LengthLength of the new HOB to allocate.
HobPointer to the new HOB.
Returns
EFI_SUCCESS Success to create HOB.
Return values
EFI_INVALID_PARAMETERif Hob is NULL
EFI_NOT_AVAILABLE_YETif HobList is still not available.
EFI_OUT_OF_RESOURCESif there is no more memory to grow the Hoblist.

Definition at line 59 of file UnitTestPeiServicesTablePointerLibHob.c.

◆ UnitTestGetHobList()

EFI_STATUS EFIAPI UnitTestGetHobList ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN OUT VOID **  HobList 
)

Gets the pointer to the HOB List.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
HobListPointer to the HOB List.
Return values
EFI_SUCCESSGet the pointer of HOB List
EFI_NOT_AVAILABLE_YETthe HOB List is not yet published
EFI_INVALID_PARAMETERHobList is NULL (in debug mode)

Definition at line 25 of file UnitTestPeiServicesTablePointerLibHob.c.