TianoCore EDK2 master
Loading...
Searching...
No Matches
DxeLoadFuncFit.c File Reference
#include <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/HobLib.h>
#include <Library/FdtLib.h>
#include "VirtualMemory.h"
#include "UefiPayloadEntry.h"

Go to the source code of this file.

Data Structures

struct  _X64_IDT_TABLE
 

Macros

#define STACK_SIZE   0x20000
 
#define IDT_ENTRY_COUNT   32
 

Typedefs

typedef struct _X64_IDT_TABLE X64_IDT_TABLE
 

Functions

UINTN Create4GPageTablesIa32Pae (IN EFI_PHYSICAL_ADDRESS StackBase, IN UINTN StackSize)
 
BOOLEAN IsIa32PaeSupport (VOID)
 
BOOLEAN ToBuildPageTable (VOID)
 
VOID HandOffToDxeCore (IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint, IN EFI_PEI_HOB_POINTERS HobList)
 
EFI_STATUS EFIAPI _ModuleEntryPoint (IN UINTN BootloaderParameter)
 

Variables

VOID * mHobList
 
GLOBAL_REMOVE_IF_UNREFERENCED IA32_GDT gGdtEntries []
 
GLOBAL_REMOVE_IF_UNREFERENCED CONST IA32_DESCRIPTOR gGdt
 
GLOBAL_REMOVE_IF_UNREFERENCED IA32_DESCRIPTOR gLidtDescriptor
 

Detailed Description

Ia32-specific functionality for DxeLoad.

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

Definition in file DxeLoadFuncFit.c.

Macro Definition Documentation

◆ IDT_ENTRY_COUNT

#define IDT_ENTRY_COUNT   32

Definition at line 21 of file DxeLoadFuncFit.c.

◆ STACK_SIZE

#define STACK_SIZE   0x20000

Definition at line 20 of file DxeLoadFuncFit.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 400 of file DxeLoadFuncFit.c.

◆ Create4GPageTablesIa32Pae()

UINTN Create4GPageTablesIa32Pae ( IN EFI_PHYSICAL_ADDRESS  StackBase,
IN UINTN  StackSize 
)

Allocates and fills in the Page Directory and Page Table Entries to establish a 4G page table.

Parameters
[in]StackBaseStack base address.
[in]StackSizeStack size.
Returns
The address of page table.

Definition at line 93 of file DxeLoadFuncFit.c.

◆ HandOffToDxeCore()

VOID HandOffToDxeCore ( IN EFI_PHYSICAL_ADDRESS  DxeCoreEntryPoint,
IN EFI_PEI_HOB_POINTERS  HobList 
)

Transfers control to DxeCore.

This function performs a CPU architecture specific operations to execute the entry point of DxeCore with the parameters of HobList.

Parameters
DxeCoreEntryPointThe entry point of DxeCore.
HobListThe start of HobList passed to DxeCore.

Definition at line 257 of file DxeLoadFuncFit.c.

◆ IsIa32PaeSupport()

BOOLEAN IsIa32PaeSupport ( VOID  )

The function will check if IA32 PAE is supported.

Return values
TRUEIA32 PAE is supported.
FALSEIA32 PAE is not supported.

Definition at line 191 of file DxeLoadFuncFit.c.

◆ ToBuildPageTable()

BOOLEAN ToBuildPageTable ( VOID  )

The function will check if page table should be setup or not.

Return values
TRUEPage table should be created.
FALSEPage table should not be created.

Definition at line 219 of file DxeLoadFuncFit.c.

Variable Documentation

◆ gGdt

GLOBAL_REMOVE_IF_UNREFERENCED CONST IA32_DESCRIPTOR gGdt
Initial value:
= {
sizeof (gGdtEntries) - 1,
(UINTN)gGdtEntries
}
UINT64 UINTN

Definition at line 72 of file DxeLoadFuncFit.c.

◆ gGdtEntries

Initial value:
= {
{
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
},
{
{ 0xffff, 0, 0, 0x2, 1, 0, 1, 0xf, 0, 0, 1, 1, 0 }
},
{
{ 0xffff, 0, 0, 0xf, 1, 0, 1, 0xf, 0, 0, 1, 1, 0 }
},
{
{ 0xffff, 0, 0, 0x3, 1, 0, 1, 0xf, 0, 0, 1, 1, 0 }
},
{
{ 0xffff, 0, 0, 0xa, 1, 0, 1, 0xf, 0, 0, 1, 1, 0 }
},
{
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
},
{
{ 0xffff, 0, 0, 0x2, 1, 0, 1, 0xf, 0, 0, 1, 1, 0 }
},
{
{ 0xffff, 0, 0, 0xa, 1, 0, 1, 0xf, 0, 1, 0, 1, 0 }
},
{
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
},
}

Definition at line 38 of file DxeLoadFuncFit.c.

◆ gLidtDescriptor

GLOBAL_REMOVE_IF_UNREFERENCED IA32_DESCRIPTOR gLidtDescriptor
Initial value:
= {
sizeof (X64_IDT_GATE_DESCRIPTOR) * IDT_ENTRY_COUNT - 1,
0
}

Definition at line 77 of file DxeLoadFuncFit.c.

◆ mHobList

VOID* mHobList
extern

Definition at line 25 of file HobLib.c.