TianoCore EDK2 master
Loading...
Searching...
No Matches
CustomFdtNodeParserLib.c File Reference
#include <PiPei.h>
#include <Pi/PiHob.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
#include <Library/IoLib.h>
#include <Library/PrintLib.h>
#include <Library/FdtLib.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>

Go to the source code of this file.

Functions

VOID *EFIAPI CreateHob (IN UINT16 HobType, IN UINT16 HobLength)
 
VOID AddNewHob (IN EFI_PEI_HOB_POINTERS *Hob)
 
BOOLEAN EFIAPI FitIsHobNeed (EFI_PEI_HOB_POINTERS Hob)
 
UINTN EFIAPI CustomFdtNodeParser (IN VOID *FdtBase, IN VOID *HobList)
 

Detailed Description

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

Definition in file CustomFdtNodeParserLib.c.

Function Documentation

◆ AddNewHob()

VOID AddNewHob ( IN EFI_PEI_HOB_POINTERS Hob)

Add HOB into HOB list

Parameters
[in]HobThe HOB to be added into the HOB list.

Definition at line 101 of file HobParseLib.c.

◆ CreateHob()

VOID *EFIAPI CreateHob ( IN UINT16  HobType,
IN UINT16  HobLength 
)

Add a new HOB to the HOB List.

Parameters
HobTypeType of the new HOB.
HobLengthLength of the new HOB to allocate.
Returns
NULL if there is no space to create a hob.
The address point to the new created hob.

This service enables PEIMs to create various types of HOBs.

Parameters
TypeThe type of HOB to be installed.
LengthThe length of the HOB to be added.
Return values
!NULLThe HOB was successfully created.
NULLThere is no additional space for HOB creation.

Definition at line 101 of file Hob.c.

◆ CustomFdtNodeParser()

UINTN EFIAPI CustomFdtNodeParser ( IN VOID *  FdtBase,
IN VOID *  HobList 
)

It will Parse FDT -custom node based on information from bootloaders.

Parameters
[in]FdtBaseThe starting memory address of FdtBase
[in]HobListThe starting memory address of New Hob list.

Definition at line 120 of file CustomFdtNodeParserLib.c.

◆ FitIsHobNeed()

BOOLEAN EFIAPI FitIsHobNeed ( 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.

Parameters
[in]HobThe HOB to check
Return values
TRUEIf HOB is need inside Payload
FALSEIf HOB is needn't inside Payload

Definition at line 53 of file CustomFdtNodeParserLib.c.