3 * Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
5 * SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef __UEFI_PAYLOAD_ENTRY_H__
10 #define __UEFI_PAYLOAD_ENTRY_H__
14 #include <Library/BaseLib.h>
15 #include <Library/BaseMemoryLib.h>
16 #include <Library/MemoryAllocationLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/PeCoffLib.h>
19 #include <Library/HobLib.h>
20 #include <Library/PcdLib.h>
21 #include <Guid/MemoryAllocationHob.h>
22 #include <Library/IoLib.h>
23 #include <Library/PeCoffLib.h>
24 #include <Library/BlParseLib.h>
25 #include <Library/PlatformSupportLib.h>
26 #include <Library/UefiCpuLib.h>
27 #include <IndustryStandard/Acpi.h>
28 #include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
29 #include <Guid/SerialPortInfoGuid.h>
30 #include <Guid/SystemTableInfoGuid.h>
31 #include <Guid/MemoryMapInfoGuid.h>
32 #include <Guid/AcpiBoardInfoGuid.h>
33 #include <Guid/GraphicsInfoHob.h>
36 #define LEGACY_8259_MASK_REGISTER_MASTER 0x21
37 #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1
38 #define GET_OCCUPIED_SIZE(ActualSize, Alignment) \
39 ((ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1)))
42 Auto-generated function that calls the library constructors for all of the module's
47 ProcessLibraryConstructorList (
52 Add a new HOB to the HOB List.
54 @param HobType Type of the new HOB.
55 @param HobLength Length of the new HOB to allocate.
57 @return NULL if there is no space to create a hob.
58 @return The address point to the new created hob.
69 Update the Stack Hob if the stack has been moved
71 @param BaseAddress The 64 bit physical address of the Stack.
72 @param Length The length of the stack in bytes.
78 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
83 Build a Handoff Information Table HOB
85 This function initialize a HOB region from EfiMemoryBegin with length
86 EfiMemoryLength. And EfiFreeMemoryBottom and EfiFreeMemoryTop should
87 be inside the HOB region.
89 @param[in] EfiMemoryBegin Total memory start address
90 @param[in] EfiMemoryLength Total memory length reported in handoff HOB.
91 @param[in] EfiFreeMemoryBottom Free memory start address
92 @param[in] EfiFreeMemoryTop Free memory end address.
94 @return The pointer to the handoff HOB table.
97 EFI_HOB_HANDOFF_INFO_TABLE
*
100 IN VOID
*EfiMemoryBegin
,
101 IN UINTN EfiMemoryLength
,
102 IN VOID
*EfiFreeMemoryBottom
,
103 IN VOID
*EfiFreeMemoryTop
107 Find DXE core from FV and build DXE core HOBs.
109 @param[out] DxeCoreEntryPoint DXE core entry point
111 @retval EFI_SUCCESS If it completed successfully.
112 @retval EFI_NOT_FOUND If it failed to load DXE FV.
116 OUT PHYSICAL_ADDRESS
*DxeCoreEntryPoint
120 Transfers control to DxeCore.
122 This function performs a CPU architecture specific operations to execute
123 the entry point of DxeCore with the parameters of HobList.
125 @param DxeCoreEntryPoint The entry point of DxeCore.
126 @param HobList The start of HobList passed to DxeCore.
130 IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint
,
131 IN EFI_PEI_HOB_POINTERS HobList