]>
Commit | Line | Data |
---|---|---|
7c4ab1c2 GD |
1 | /** @file\r |
2 | *\r | |
3 | * Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r | |
4 | *\r | |
5 | * SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | *\r | |
7 | **/\r | |
8 | \r | |
9 | #ifndef __UEFI_PAYLOAD_ENTRY_H__\r | |
10 | #define __UEFI_PAYLOAD_ENTRY_H__\r | |
11 | \r | |
12 | #include <PiPei.h>\r | |
13 | \r | |
14 | #include <Library/BaseLib.h>\r | |
15 | #include <Library/BaseMemoryLib.h>\r | |
16 | #include <Library/MemoryAllocationLib.h>\r | |
17 | #include <Library/DebugLib.h>\r | |
18 | #include <Library/PeCoffLib.h>\r | |
19 | #include <Library/HobLib.h>\r | |
20 | #include <Library/PcdLib.h>\r | |
21 | #include <Guid/MemoryAllocationHob.h>\r | |
22 | #include <Library/IoLib.h>\r | |
23 | #include <Library/PeCoffLib.h>\r | |
24 | #include <Library/BlParseLib.h>\r | |
25 | #include <Library/PlatformSupportLib.h>\r | |
26 | #include <Library/UefiCpuLib.h>\r | |
27 | #include <IndustryStandard/Acpi.h>\r | |
28 | #include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>\r | |
29 | #include <Guid/SerialPortInfoGuid.h>\r | |
30 | #include <Guid/SystemTableInfoGuid.h>\r | |
31 | #include <Guid/MemoryMapInfoGuid.h>\r | |
32 | #include <Guid/AcpiBoardInfoGuid.h>\r | |
33 | #include <Guid/GraphicsInfoHob.h>\r | |
34 | \r | |
35 | \r | |
36 | #define LEGACY_8259_MASK_REGISTER_MASTER 0x21\r | |
37 | #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1\r | |
38 | #define GET_OCCUPIED_SIZE(ActualSize, Alignment) \\r | |
39 | ((ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1)))\r | |
40 | \r | |
41 | /**\r | |
42 | Auto-generated function that calls the library constructors for all of the module's\r | |
43 | dependent libraries.\r | |
44 | **/\r | |
45 | VOID\r | |
46 | EFIAPI\r | |
47 | ProcessLibraryConstructorList (\r | |
48 | VOID\r | |
49 | );\r | |
50 | \r | |
51 | /**\r | |
52 | Add a new HOB to the HOB List.\r | |
53 | \r | |
54 | @param HobType Type of the new HOB.\r | |
55 | @param HobLength Length of the new HOB to allocate.\r | |
56 | \r | |
57 | @return NULL if there is no space to create a hob.\r | |
58 | @return The address point to the new created hob.\r | |
59 | \r | |
60 | **/\r | |
61 | VOID *\r | |
62 | EFIAPI\r | |
63 | CreateHob (\r | |
64 | IN UINT16 HobType,\r | |
65 | IN UINT16 HobLength\r | |
66 | );\r | |
67 | \r | |
68 | /**\r | |
69 | Update the Stack Hob if the stack has been moved\r | |
70 | \r | |
71 | @param BaseAddress The 64 bit physical address of the Stack.\r | |
72 | @param Length The length of the stack in bytes.\r | |
73 | \r | |
74 | **/\r | |
75 | VOID\r | |
76 | EFIAPI\r | |
77 | UpdateStackHob (\r | |
78 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
79 | IN UINT64 Length\r | |
80 | );\r | |
81 | \r | |
82 | /**\r | |
83 | Build a Handoff Information Table HOB\r | |
84 | \r | |
85 | This function initialize a HOB region from EfiMemoryBegin with length\r | |
86 | EfiMemoryLength. And EfiFreeMemoryBottom and EfiFreeMemoryTop should\r | |
87 | be inside the HOB region.\r | |
88 | \r | |
89 | @param[in] EfiMemoryBegin Total memory start address\r | |
90 | @param[in] EfiMemoryLength Total memory length reported in handoff HOB.\r | |
91 | @param[in] EfiFreeMemoryBottom Free memory start address\r | |
92 | @param[in] EfiFreeMemoryTop Free memory end address.\r | |
93 | \r | |
94 | @return The pointer to the handoff HOB table.\r | |
95 | \r | |
96 | **/\r | |
97 | EFI_HOB_HANDOFF_INFO_TABLE*\r | |
98 | EFIAPI\r | |
99 | HobConstructor (\r | |
100 | IN VOID *EfiMemoryBegin,\r | |
101 | IN UINTN EfiMemoryLength,\r | |
102 | IN VOID *EfiFreeMemoryBottom,\r | |
103 | IN VOID *EfiFreeMemoryTop\r | |
104 | );\r | |
105 | \r | |
106 | /**\r | |
107 | Find DXE core from FV and build DXE core HOBs.\r | |
108 | \r | |
109 | @param[out] DxeCoreEntryPoint DXE core entry point\r | |
110 | \r | |
111 | @retval EFI_SUCCESS If it completed successfully.\r | |
112 | @retval EFI_NOT_FOUND If it failed to load DXE FV.\r | |
113 | **/\r | |
114 | EFI_STATUS\r | |
115 | LoadDxeCore (\r | |
116 | OUT PHYSICAL_ADDRESS *DxeCoreEntryPoint\r | |
117 | );\r | |
118 | \r | |
119 | /**\r | |
120 | Transfers control to DxeCore.\r | |
121 | \r | |
122 | This function performs a CPU architecture specific operations to execute\r | |
123 | the entry point of DxeCore with the parameters of HobList.\r | |
124 | \r | |
125 | @param DxeCoreEntryPoint The entry point of DxeCore.\r | |
126 | @param HobList The start of HobList passed to DxeCore.\r | |
127 | **/\r | |
128 | VOID\r | |
129 | HandOffToDxeCore (\r | |
130 | IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,\r | |
131 | IN EFI_PEI_HOB_POINTERS HobList\r | |
132 | );\r | |
133 | \r | |
134 | #endif\r |