3 * Copyright (c) 2021, 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>
34 #include <UniversalPayload/SmbiosTable.h>
35 #include <UniversalPayload/AcpiTable.h>
37 #define LEGACY_8259_MASK_REGISTER_MASTER 0x21
38 #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1
39 #define GET_OCCUPIED_SIZE(ActualSize, Alignment) \
40 ((ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1)))
43 Auto-generated function that calls the library constructors for all of the module's
48 ProcessLibraryConstructorList (
53 Add a new HOB to the HOB List.
55 @param HobType Type of the new HOB.
56 @param HobLength Length of the new HOB to allocate.
58 @return NULL if there is no space to create a hob.
59 @return The address point to the new created hob.
70 Update the Stack Hob if the stack has been moved
72 @param BaseAddress The 64 bit physical address of the Stack.
73 @param Length The length of the stack in bytes.
79 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
84 Build a Handoff Information Table HOB
86 This function initialize a HOB region from EfiMemoryBegin with length
87 EfiMemoryLength. And EfiFreeMemoryBottom and EfiFreeMemoryTop should
88 be inside the HOB region.
90 @param[in] EfiMemoryBegin Total memory start address
91 @param[in] EfiMemoryLength Total memory length reported in handoff HOB.
92 @param[in] EfiFreeMemoryBottom Free memory start address
93 @param[in] EfiFreeMemoryTop Free memory end address.
95 @return The pointer to the handoff HOB table.
98 EFI_HOB_HANDOFF_INFO_TABLE
*
101 IN VOID
*EfiMemoryBegin
,
102 IN UINTN EfiMemoryLength
,
103 IN VOID
*EfiFreeMemoryBottom
,
104 IN VOID
*EfiFreeMemoryTop
108 Find DXE core from FV and build DXE core HOBs.
110 @param[out] DxeCoreEntryPoint DXE core entry point
112 @retval EFI_SUCCESS If it completed successfully.
113 @retval EFI_NOT_FOUND If it failed to load DXE FV.
117 OUT PHYSICAL_ADDRESS
*DxeCoreEntryPoint
121 Transfers control to DxeCore.
123 This function performs a CPU architecture specific operations to execute
124 the entry point of DxeCore with the parameters of HobList.
126 @param DxeCoreEntryPoint The entry point of DxeCore.
127 @param HobList The start of HobList passed to DxeCore.
131 IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint
,
132 IN EFI_PEI_HOB_POINTERS HobList