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

Go to the source code of this file.

Functions

EFI_STATUS MemInfoCallbackMmio (IN MEMORY_MAP_ENTRY *MemoryMapEntry, IN VOID *Params)
 
EFI_STATUS FindToludCallback (IN MEMORY_MAP_ENTRY *MemoryMapEntry, IN VOID *Params)
 
EFI_STATUS MemInfoCallback (IN MEMORY_MAP_ENTRY *MemoryMapEntry, IN VOID *Params)
 
EFI_STATUS BuildHobFromBl (VOID)
 
VOID BuildGenericHob (VOID)
 
EFI_STATUS EFIAPI _ModuleEntryPoint (IN UINTN BootloaderParameter)
 

Variables

STATIC UINT32 mTopOfLowerUsableDram = 0
 
EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation []
 

Detailed Description

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

Definition in file UefiPayloadEntry.c.

Function Documentation

◆ _ModuleEntryPoint()

EFI_STATUS EFIAPI _ModuleEntryPoint ( IN UINTN  BootloaderParameter)

Entry point to the C language phase of UEFI payload.

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

Definition at line 396 of file UefiPayloadEntry.c.

◆ BuildGenericHob()

VOID BuildGenericHob ( VOID  )

This function will build some generic HOBs that doesn't depend on information from bootloaders.

Definition at line 350 of file UefiPayloadEntry.c.

◆ BuildHobFromBl()

EFI_STATUS BuildHobFromBl ( VOID  )

It will build HOBs based on information from bootloaders.

Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required HOBs.

Definition at line 232 of file UefiPayloadEntry.c.

◆ FindToludCallback()

EFI_STATUS FindToludCallback ( IN MEMORY_MAP_ENTRY MemoryMapEntry,
IN VOID *  Params 
)

Callback function to find TOLUD (Top of Lower Usable DRAM)

Estimate where TOLUD (Top of Lower Usable DRAM) resides. The exact position would require platform specific code.

Parameters
MemoryMapEntryMemory map entry info got from bootloader.
ParamsNot used for now.
Return values
EFI_SUCCESSSuccessfully updated mTopOfLowerUsableDram.

Definition at line 115 of file UefiPayloadEntry.c.

◆ MemInfoCallback()

EFI_STATUS MemInfoCallback ( IN MEMORY_MAP_ENTRY MemoryMapEntry,
IN VOID *  Params 
)

Callback function to build resource descriptor HOB

This function build a HOB based on the memory map entry info. Only add EFI_RESOURCE_SYSTEM_MEMORY.

Parameters
MemoryMapEntryMemory map entry info got from bootloader.
ParamsNot used for now.
Return values
RETURN_SUCCESSSuccessfully build a HOB.

Definition at line 181 of file UefiPayloadEntry.c.

◆ MemInfoCallbackMmio()

EFI_STATUS MemInfoCallbackMmio ( IN MEMORY_MAP_ENTRY MemoryMapEntry,
IN VOID *  Params 
)

Callback function to build resource descriptor HOB

This function build a HOB based on the memory map entry info. It creates only EFI_RESOURCE_MEMORY_MAPPED_IO and EFI_RESOURCE_MEMORY_RESERVED resources.

Parameters
MemoryMapEntryMemory map entry info got from bootloader.
ParamsA pointer to ACPI_BOARD_INFO.
Return values
EFI_SUCCESSSuccessfully build a HOB.
EFI_INVALID_PARAMETERInvalid parameter provided.

Definition at line 36 of file UefiPayloadEntry.c.

Variable Documentation

◆ mDefaultMemoryTypeInformation

EFI_MEMORY_TYPE_INFORMATION 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 13 of file UefiPayloadEntry.c.

◆ mTopOfLowerUsableDram

STATIC UINT32 mTopOfLowerUsableDram = 0

Definition at line 11 of file UefiPayloadEntry.c.