TianoCore EDK2 master
Loading...
Searching...
No Matches
PlatformInitLib.h
Go to the documentation of this file.
1
9#ifndef PLATFORM_INIT_LIB_H_
10#define PLATFORM_INIT_LIB_H_
11
12#include <PiPei.h>
13
14#pragma pack(1)
15typedef struct {
16 EFI_HOB_GUID_TYPE GuidHeader;
17 UINT16 HostBridgeDevId;
18
19 UINT64 PcdConfidentialComputingGuestAttr;
20 BOOLEAN SevEsIsEnabled;
21
22 UINT32 BootMode;
23 BOOLEAN S3Supported;
24
25 BOOLEAN SmmSmramRequire;
26 BOOLEAN Q35SmramAtDefaultSmbase;
27 UINT16 Q35TsegMbytes;
28
29 UINT32 LowMemory;
30 UINT64 FirstNonAddress;
31 UINT8 PhysMemAddressWidth;
32 UINT32 Uc32Base;
33 UINT32 Uc32Size;
34
35 BOOLEAN PcdSetNxForStack;
36 UINT64 PcdTdxSharedBitMask;
37
38 UINT64 PcdPciMmio64Base;
39 UINT64 PcdPciMmio64Size;
40 UINT32 PcdPciMmio32Base;
41 UINT32 PcdPciMmio32Size;
42 UINT64 PcdPciIoBase;
43 UINT64 PcdPciIoSize;
44
45 UINT64 PcdEmuVariableNvStoreReserved;
46 UINT32 PcdCpuBootLogicalProcessorNumber;
47 UINT32 PcdCpuMaxLogicalProcessorNumber;
48 UINT32 DefaultMaxCpuNumber;
49
50 UINT32 S3AcpiReservedMemoryBase;
51 UINT32 S3AcpiReservedMemorySize;
52
53 UINT64 FeatureControlValue;
54
55 BOOLEAN QemuFwCfgChecked;
56 BOOLEAN QemuFwCfgSupported;
57 BOOLEAN QemuFwCfgDmaSupported;
59#pragma pack()
60
72UINT8
73EFIAPI
75 IN UINTN Index
76 );
77
90UINT8
91EFIAPI
93 IN UINTN Index,
94 IN UINT8 Value
95 );
96
100VOID
101EFIAPI
103 VOID
104 );
105
106VOID
107EFIAPI
108PlatformAddIoMemoryBaseSizeHob (
109 IN EFI_PHYSICAL_ADDRESS MemoryBase,
110 IN UINT64 MemorySize
111 );
112
113VOID
114EFIAPI
115PlatformAddIoMemoryRangeHob (
116 IN EFI_PHYSICAL_ADDRESS MemoryBase,
117 IN EFI_PHYSICAL_ADDRESS MemoryLimit
118 );
119
120VOID
121EFIAPI
122PlatformAddMemoryBaseSizeHob (
123 IN EFI_PHYSICAL_ADDRESS MemoryBase,
124 IN UINT64 MemorySize
125 );
126
127VOID
128EFIAPI
129PlatformAddMemoryRangeHob (
130 IN EFI_PHYSICAL_ADDRESS MemoryBase,
131 IN EFI_PHYSICAL_ADDRESS MemoryLimit
132 );
133
134VOID
135EFIAPI
136PlatformAddReservedMemoryBaseSizeHob (
137 IN EFI_PHYSICAL_ADDRESS MemoryBase,
138 IN UINT64 MemorySize,
139 IN BOOLEAN Cacheable
140 );
141
142VOID
143EFIAPI
144PlatformQemuUc32BaseInitialization (
145 IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
146 );
147
148VOID
149EFIAPI
150PlatformGetSystemMemorySizeBelow4gb (
151 IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob
152 );
153
157VOID
158EFIAPI
160 IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
161 );
162
167VOID
168EFIAPI
170 IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob
171 );
172
173VOID
174EFIAPI
175PlatformQemuInitializeRamForS3 (
176 IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob
177 );
178
179VOID
180EFIAPI
181PlatformMemMapInitialization (
182 IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
183 );
184
192EFIAPI
194 IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
195 );
196
197VOID
198EFIAPI
199PlatformMiscInitialization (
200 IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob
201 );
202
207VOID
208EFIAPI
210 IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
211 );
212
221VOID
222EFIAPI
224 VOID
225 );
226
237BOOLEAN
238EFIAPI
240 IN UINT8 *NvVarStoreBase,
241 IN UINT32 NvVarStoreSize
242 );
243
253VOID *
254EFIAPI
256 VOID
257 );
258
273EFIAPI
275 IN VOID *EmuVariableNvStore
276 );
277
278#endif // PLATFORM_INIT_LIB_H_
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
BOOLEAN SevEsIsEnabled(VOID)
Definition: AmdSev.c:272
UINT8 EFIAPI PlatformCmosRead8(IN UINTN Index)
Definition: Cmos.c:26
VOID EFIAPI PlatformMaxCpuCountInitialization(IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob)
Definition: Platform.c:560
VOID EFIAPI PlatformAddressWidthInitialization(IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob)
Definition: MemDetect.c:1045
VOID EFIAPI PlatformDebugDumpCmos(VOID)
Definition: Cmos.c:63
EFI_STATUS EFIAPI PlatformNoexecDxeInitialization(IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob)
Definition: Platform.c:261
VOID EFIAPI PlatformTdxPublishRamRegions(VOID)
Definition: IntelTdx.c:146
VOID EFIAPI PlatformQemuInitializeRam(IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob)
Definition: MemDetect.c:1231
BOOLEAN EFIAPI PlatformValidateNvVarStore(IN UINT8 *NvVarStoreBase, IN UINT32 NvVarStoreSize)
Definition: Platform.c:765
UINT8 EFIAPI PlatformCmosWrite8(IN UINTN Index, IN UINT8 Value)
Definition: Cmos.c:48
VOID *EFIAPI PlatformReserveEmuVariableNvStore(VOID)
Definition: Platform.c:890
EFI_STATUS EFIAPI PlatformInitEmuVariableNvStore(IN VOID *EmuVariableNvStore)
Definition: Platform.c:933
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29