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

Go to the source code of this file.

Macros

#define IGD_BUS_NUM   0x00
 
#define IGD_DEV_NUM   0x02
 
#define IGD_FUN_NUM   0x00
 

Functions

EFI_STATUS EFIAPI LocatePciDevicePpi (VOID)
 
EFI_STATUS BuildFdtForMemory (IN VOID *FdtBase)
 
EFI_STATUS BuildFdtForMemAlloc (IN VOID *FdtBase)
 
EFI_STATUS BuildFdtForSerial (IN INT32 ISANode, IN VOID *FdtBase)
 
EFI_STATUS BuildFdtForSerialLpss (IN INT32 ISANode, IN VOID *FdtBase)
 
EFI_STATUS BuildFdtForPciRootBridge (IN VOID *FdtBase)
 
EFI_STATUS BuildFdtForFrameBuffer (IN VOID *FdtBase)
 
EFI_STATUS BuildFdtForUplRequired (IN VOID *FdtBase)
 
EFI_STATUS BuildFdtForUPL (IN VOID *FdtBase)
 

Variables

EDKII_PCI_DEVICE_PPImPciDevicePpi
 
BOOLEAN mResourceAssigned
 
CHAR8 * mMemoryAllocType []
 

Detailed Description

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

Definition in file X86_BuildFdtLib.c.

Macro Definition Documentation

◆ IGD_BUS_NUM

#define IGD_BUS_NUM   0x00

Definition at line 30 of file X86_BuildFdtLib.c.

◆ IGD_DEV_NUM

#define IGD_DEV_NUM   0x02

Definition at line 31 of file X86_BuildFdtLib.c.

◆ IGD_FUN_NUM

#define IGD_FUN_NUM   0x00

Definition at line 32 of file X86_BuildFdtLib.c.

Function Documentation

◆ BuildFdtForFrameBuffer()

EFI_STATUS BuildFdtForFrameBuffer ( IN VOID *  FdtBase)

It will build FDT based on FrameBuffer.

Parameters
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 792 of file X86_BuildFdtLib.c.

◆ BuildFdtForMemAlloc()

EFI_STATUS BuildFdtForMemAlloc ( IN VOID *  FdtBase)

It will build FDT based on memory allocation information from Hobs.

Parameters
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 142 of file X86_BuildFdtLib.c.

◆ BuildFdtForMemory()

EFI_STATUS BuildFdtForMemory ( IN VOID *  FdtBase)

It will build FDT based on memory information from Hobs.

Parameters
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 91 of file X86_BuildFdtLib.c.

◆ BuildFdtForPciRootBridge()

EFI_STATUS BuildFdtForPciRootBridge ( IN VOID *  FdtBase)

It will build FDT based on BuildFdtForPciRootBridge information.

Parameters
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 436 of file X86_BuildFdtLib.c.

◆ BuildFdtForSerial()

EFI_STATUS BuildFdtForSerial ( IN INT32  ISANode,
IN VOID *  FdtBase 
)

It will build FDT based on serial information.

Parameters
[in]ISANodeISANode.
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 307 of file X86_BuildFdtLib.c.

◆ BuildFdtForSerialLpss()

EFI_STATUS BuildFdtForSerialLpss ( IN INT32  ISANode,
IN VOID *  FdtBase 
)

It will build FDT based on serial information.

Parameters
[in]ISANodeISANode.
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 369 of file X86_BuildFdtLib.c.

◆ BuildFdtForUPL()

EFI_STATUS BuildFdtForUPL ( IN VOID *  FdtBase)

It will build FDT for UPL consumed.

Parameters
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 974 of file X86_BuildFdtLib.c.

◆ BuildFdtForUplRequired()

EFI_STATUS BuildFdtForUplRequired ( IN VOID *  FdtBase)

It will build FDT for UPL required data.

Parameters
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 873 of file X86_BuildFdtLib.c.

◆ LocatePciDevicePpi()

EFI_STATUS EFIAPI LocatePciDevicePpi ( VOID  )

The wrapper function of PeiServicesLocatePpi() for gEdkiiPeiPciDevicePpiGuid and Save the PPI to mPciDevicePpi.

Return values
EFI_SUCCESSIf it locate gEdkiiPeiPciDevicePpiGuid successfully.
EFI_NOT_FOUNDIf it can't find gEdkiiPeiPciDevicePpiGuid.

Definition at line 63 of file X86_BuildFdtLib.c.

Variable Documentation

◆ mMemoryAllocType

CHAR8* mMemoryAllocType[]
Initial value:
= {
"Reserved",
"LoaderCode",
"LoaderData",
"boot-code",
"boot-data",
"runtime-code",
"runtime-data",
"ConventionalMemory",
"UnusableMemory",
"acpi",
"acpi-nvs",
"mmio",
"MemoryMappedIOPortSpace",
"PalCode",
"PersistentMemory",
}

Definition at line 37 of file X86_BuildFdtLib.c.

◆ mPciDevicePpi

EDKII_PCI_DEVICE_PPI* mPciDevicePpi

Definition at line 34 of file X86_BuildFdtLib.c.

◆ mResourceAssigned

BOOLEAN mResourceAssigned

Definition at line 35 of file X86_BuildFdtLib.c.