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

Go to the source code of this file.

Macros

#define MEMORY_ATTRIBUTE_MASK
 
#define TESTED_MEMORY_ATTRIBUTES
 

Functions

VOID PrintHob (IN CONST VOID *HobStart)
 
VOID EFIAPI ProcessLibraryConstructorList (VOID)
 
UINTN EFIAPI AsciiStrSpn (IN CHAR8 *String, IN CHAR8 *CharSet)
 
CHAR8 *EFIAPI AsciiStrBrk (IN CHAR8 *String, IN CHAR8 *CharSet)
 
CHAR8 *EFIAPI AsciiStrTokenLine (IN CHAR8 *String OPTIONAL, IN CHAR8 *CharSet)
 
EFI_STATUS FixUpPcdDatabase (IN EFI_FIRMWARE_VOLUME_HEADER *DxeFv)
 
EFI_STATUS BuildFitLoadablesFvHob (OUT EFI_FIRMWARE_VOLUME_HEADER **DxeFv)
 
VOID CreatNewHobForHoblist (IN UINTN BootloaderParameter)
 
EFI_STATUS FitBuildHobs (IN UINTN NewFdtBase, OUT EFI_FIRMWARE_VOLUME_HEADER **DxeFv)
 
EFI_STATUS EFIAPI FitUplEntryPoint (IN UINTN BootloaderParameter)
 

Variables

GLOBAL_REMOVE_IF_UNREFERENCED EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation []
 
VOID * mHobList
 
CHAR8 * mLineBuffer = NULL
 

Detailed Description

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

Definition in file FitUniversalPayloadEntry.c.

Macro Definition Documentation

◆ MEMORY_ATTRIBUTE_MASK

#define MEMORY_ATTRIBUTE_MASK
Value:
(EFI_RESOURCE_ATTRIBUTE_PRESENT | \
EFI_RESOURCE_ATTRIBUTE_INITIALIZED | \
EFI_RESOURCE_ATTRIBUTE_TESTED | \
EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED | \
EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED | \
EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED | \
EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED | \
EFI_RESOURCE_ATTRIBUTE_16_BIT_IO | \
EFI_RESOURCE_ATTRIBUTE_32_BIT_IO | \
EFI_RESOURCE_ATTRIBUTE_64_BIT_IO | \
EFI_RESOURCE_ATTRIBUTE_PERSISTENT )

Definition at line 13 of file FitUniversalPayloadEntry.c.

◆ TESTED_MEMORY_ATTRIBUTES

#define TESTED_MEMORY_ATTRIBUTES
Value:
(EFI_RESOURCE_ATTRIBUTE_PRESENT | \
EFI_RESOURCE_ATTRIBUTE_INITIALIZED | \
EFI_RESOURCE_ATTRIBUTE_TESTED )

Definition at line 25 of file FitUniversalPayloadEntry.c.

Function Documentation

◆ AsciiStrBrk()

CHAR8 *EFIAPI AsciiStrBrk ( IN CHAR8 *  String,
IN CHAR8 *  CharSet 
)

Searches a string for the first occurrence of a character contained in a specified buffer.

Parameters
StringPoint to the string where to find the substring.
CharSetPoint to the string to be found.

Definition at line 100 of file FitUniversalPayloadEntry.c.

◆ AsciiStrSpn()

UINTN EFIAPI AsciiStrSpn ( IN CHAR8 *  String,
IN CHAR8 *  CharSet 
)

Find the first substring.

Parameters
StringPoint to the string where to find the substring.
CharSetPoint to the string to be found.

Definition at line 64 of file FitUniversalPayloadEntry.c.

◆ AsciiStrTokenLine()

CHAR8 *EFIAPI AsciiStrTokenLine ( IN CHAR8 *String  OPTIONAL,
IN CHAR8 *  CharSet 
)

Find the next token after one or more specified characters.

Parameters
StringPoint to the string where to find the substring.
CharSetPoint to the string to be found.

Definition at line 126 of file FitUniversalPayloadEntry.c.

◆ BuildFitLoadablesFvHob()

EFI_STATUS BuildFitLoadablesFvHob ( OUT EFI_FIRMWARE_VOLUME_HEADER **  DxeFv)

It will build Fv HOBs based on information from bootloaders.

Parameters
[out]DxeFvThe pointer to the DXE FV in memory.
Return values
EFI_SUCCESSIf it completed successfully.
EFI_NOT_FOUNDIf it failed to find node in fit image.
OthersIf it failed to build required HOBs.

Definition at line 220 of file FitUniversalPayloadEntry.c.

◆ CreatNewHobForHoblist()

VOID CreatNewHobForHoblist ( IN UINTN  BootloaderParameter)

Create new HOB for new HOB list

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

Definition at line 319 of file FitUniversalPayloadEntry.c.

◆ FitBuildHobs()

EFI_STATUS FitBuildHobs ( IN UINTN  NewFdtBase,
OUT EFI_FIRMWARE_VOLUME_HEADER **  DxeFv 
)

It will build HOBs based on information from bootloaders.

Parameters
[in]NewFdtBaseThe pointer to New FdtBase.
[out]DxeFvThe pointer to the DXE FV in memory.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required HOBs.

Definition at line 417 of file FitUniversalPayloadEntry.c.

◆ FitUplEntryPoint()

EFI_STATUS EFIAPI FitUplEntryPoint ( IN UINTN  BootloaderParameter)

Entry point to the C language phase of UEFI payload.

Parameters
[in]BootloaderParameterThe starting address of FDT .
Return values
Itwill not return if SUCCESS, and return error when passing bootloader parameter.

Definition at line 495 of file FitUniversalPayloadEntry.c.

◆ FixUpPcdDatabase()

EFI_STATUS FixUpPcdDatabase ( IN EFI_FIRMWARE_VOLUME_HEADER DxeFv)

Some bootloader may pass a pcd database, and UPL also contain a PCD database. Dxe PCD driver has the assumption that the two PCD database can be catenated and the local token number should be successive. This function will fix up the UPL PCD database to meet that assumption.

Parameters
[in]DxeFvThe FV where to find the Universal PCD database.
Return values
EFI_SUCCESSIf it completed successfully.
otherFailed to fix up.

Definition at line 165 of file FitUniversalPayloadEntry.c.

◆ PrintHob()

VOID PrintHob ( IN CONST VOID *  HobStart)

Print all HOBs info from the HOB list.

Returns
The pointer to the HOB list.

Print all HOBs info from the HOB list.

Parameters
[in]HobStartA pointer to the HOB list

Definition at line 362 of file PrintHob.c.

Variable Documentation

◆ mDefaultMemoryTypeInformation

Initial value:
= {
{ EfiACPIReclaimMemory, FixedPcdGet32 (PcdMemoryTypeEfiACPIReclaimMemory) },
{ EfiACPIMemoryNVS, FixedPcdGet32 (PcdMemoryTypeEfiACPIMemoryNVS) },
{ EfiReservedMemoryType, FixedPcdGet32 (PcdMemoryTypeEfiReservedMemoryType) },
{ EfiRuntimeServicesData, FixedPcdGet32 (PcdMemoryTypeEfiRuntimeServicesData) },
{ EfiRuntimeServicesCode, FixedPcdGet32 (PcdMemoryTypeEfiRuntimeServicesCode) },
{ EfiMaxMemoryType, 0 }
}
#define FixedPcdGet32(TokenName)
Definition: PcdLib.h:92
@ EfiReservedMemoryType
@ EfiACPIMemoryNVS
@ EfiACPIReclaimMemory
@ EfiRuntimeServicesCode
@ EfiRuntimeServicesData

Definition at line 29 of file FitUniversalPayloadEntry.c.

◆ mHobList

VOID* mHobList
extern

Definition at line 25 of file HobLib.c.

◆ mLineBuffer

CHAR8* mLineBuffer = NULL

Definition at line 40 of file FitUniversalPayloadEntry.c.