TianoCore EDK2 master
Loading...
Searching...
No Matches
FitUniversalPayloadEntry.c
Go to the documentation of this file.
1
6#include "UefiPayloadEntry.h"
7#include <Library/FdtLib.h>
12
13#define MEMORY_ATTRIBUTE_MASK (EFI_RESOURCE_ATTRIBUTE_PRESENT | \
14 EFI_RESOURCE_ATTRIBUTE_INITIALIZED | \
15 EFI_RESOURCE_ATTRIBUTE_TESTED | \
16 EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED | \
17 EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED | \
18 EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED | \
19 EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED | \
20 EFI_RESOURCE_ATTRIBUTE_16_BIT_IO | \
21 EFI_RESOURCE_ATTRIBUTE_32_BIT_IO | \
22 EFI_RESOURCE_ATTRIBUTE_64_BIT_IO | \
23 EFI_RESOURCE_ATTRIBUTE_PERSISTENT )
24
25#define TESTED_MEMORY_ATTRIBUTES (EFI_RESOURCE_ATTRIBUTE_PRESENT | \
26 EFI_RESOURCE_ATTRIBUTE_INITIALIZED | \
27 EFI_RESOURCE_ATTRIBUTE_TESTED )
28
29GLOBAL_REMOVE_IF_UNREFERENCED EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
30 { EfiACPIReclaimMemory, FixedPcdGet32 (PcdMemoryTypeEfiACPIReclaimMemory) },
31 { EfiACPIMemoryNVS, FixedPcdGet32 (PcdMemoryTypeEfiACPIMemoryNVS) },
32 { EfiReservedMemoryType, FixedPcdGet32 (PcdMemoryTypeEfiReservedMemoryType) },
33 { EfiRuntimeServicesData, FixedPcdGet32 (PcdMemoryTypeEfiRuntimeServicesData) },
34 { EfiRuntimeServicesCode, FixedPcdGet32 (PcdMemoryTypeEfiRuntimeServicesCode) },
35 { EfiMaxMemoryType, 0 }
36};
37
38extern VOID *mHobList;
39
40CHAR8 *mLineBuffer = NULL;
41
46VOID
48 IN CONST VOID *HobStart
49 );
50
51VOID
52EFIAPI
53ProcessLibraryConstructorList (
54 VOID
55 );
56
63EFIAPI
65 IN CHAR8 *String,
66 IN CHAR8 *CharSet
67 )
68{
69 UINTN Count;
70 CHAR8 *Str1;
71 CHAR8 *Str2;
72
73 Count = 0;
74
75 for (Str1 = String; *Str1 != L'\0'; Str1++) {
76 for (Str2 = CharSet; *Str2 != L'\0'; Str2++) {
77 if (*Str1 == *Str2) {
78 break;
79 }
80 }
81
82 if (*Str2 == L'\0') {
83 return Count;
84 }
85
86 Count++;
87 }
88
89 return Count;
90}
91
98CHAR8 *
99EFIAPI
101 IN CHAR8 *String,
102 IN CHAR8 *CharSet
103 )
104{
105 CHAR8 *Str1;
106 CHAR8 *Str2;
107
108 for (Str1 = String; *Str1 != L'\0'; Str1++) {
109 for (Str2 = CharSet; *Str2 != L'\0'; Str2++) {
110 if (*Str1 == *Str2) {
111 return (CHAR8 *)Str1;
112 }
113 }
114 }
115
116 return NULL;
117}
118
124CHAR8 *
125EFIAPI
127 IN CHAR8 *String OPTIONAL,
128 IN CHAR8 *CharSet
129 )
130{
131 CHAR8 *Begin;
132 CHAR8 *End;
133
134 Begin = (String == NULL) ? mLineBuffer : String;
135 if (Begin == NULL) {
136 return NULL;
137 }
138
139 Begin += AsciiStrSpn (Begin, CharSet);
140 if (*Begin == L'\0') {
141 mLineBuffer = NULL;
142 return NULL;
143 }
144
145 End = AsciiStrBrk (Begin, CharSet);
146 if ((End != NULL) && (*End != L'\0')) {
147 *End = L'\0';
148 End++;
149 }
150
151 mLineBuffer = End;
152 return Begin;
153}
154
167 )
168{
169 EFI_STATUS Status;
170 EFI_FFS_FILE_HEADER *FileHeader;
171 VOID *PcdRawData;
172 PEI_PCD_DATABASE *PeiDatabase;
173 PEI_PCD_DATABASE *UplDatabase;
174 EFI_HOB_GUID_TYPE *GuidHob;
175 DYNAMICEX_MAPPING *ExMapTable;
176 UINTN Index;
177
178 GuidHob = GetFirstGuidHob (&gPcdDataBaseHobGuid);
179 if (GuidHob == NULL) {
180 //
181 // No fix-up is needed.
182 //
183 return EFI_SUCCESS;
184 }
185
186 PeiDatabase = (PEI_PCD_DATABASE *)GET_GUID_HOB_DATA (GuidHob);
187 DEBUG ((DEBUG_INFO, "Find the Pei PCD data base, the total local token number is %d\n", PeiDatabase->LocalTokenCount));
188
189 Status = FvFindFileByTypeGuid (DxeFv, EFI_FV_FILETYPE_DRIVER, PcdGetPtr (PcdPcdDriverFile), &FileHeader);
190 ASSERT_EFI_ERROR (Status);
191 if (EFI_ERROR (Status)) {
192 return Status;
193 }
194
195 Status = FileFindSection (FileHeader, EFI_SECTION_RAW, &PcdRawData);
196 ASSERT_EFI_ERROR (Status);
197 if (EFI_ERROR (Status)) {
198 return Status;
199 }
200
201 UplDatabase = (PEI_PCD_DATABASE *)PcdRawData;
202 ExMapTable = (DYNAMICEX_MAPPING *)(UINTN)((UINTN)PcdRawData + UplDatabase->ExMapTableOffset);
203
204 for (Index = 0; Index < UplDatabase->ExTokenCount; Index++) {
205 ExMapTable[Index].TokenNumber += PeiDatabase->LocalTokenCount;
206 }
207
208 DEBUG ((DEBUG_INFO, "Fix up UPL PCD database successfully\n"));
209 return EFI_SUCCESS;
210}
211
222 )
223{
224 EFI_STATUS Status;
225 VOID *Fdt;
226 UINT8 *GuidHob;
227 UNIVERSAL_PAYLOAD_BASE *PayloadBase;
228 INT32 ConfigNode;
229 INT32 Config1Node;
230 INT32 ImageNode;
231 INT32 FvNode;
232 INT32 Depth;
233 CONST FDT_PROPERTY *PropertyPtr;
234 INT32 TempLen;
235 CONST CHAR8 *Fvname;
236 UINT32 DataOffset;
237 UINT32 DataSize;
238 UINT32 *Data32;
239
240 Fdt = NULL;
241
242 GuidHob = GetFirstGuidHob (&gUniversalPayloadBaseGuid);
243 if (GuidHob != NULL) {
244 PayloadBase = (UNIVERSAL_PAYLOAD_BASE *)GET_GUID_HOB_DATA (GuidHob);
245 Fdt = (VOID *)(UINTN)PayloadBase->Entry;
246 DEBUG ((DEBUG_INFO, "PayloadBase Entry = 0x%08x\n", PayloadBase->Entry));
247 }
248
249 if (Fdt == NULL) {
250 return EFI_UNSUPPORTED;
251 }
252
253 Status = FdtCheckHeader (Fdt);
254 if (EFI_ERROR (Status)) {
255 return EFI_UNSUPPORTED;
256 }
257
258 ConfigNode = FdtSubnodeOffsetNameLen (Fdt, 0, "configurations", (INT32)AsciiStrLen ("configurations"));
259 if (ConfigNode <= 0) {
260 return EFI_NOT_FOUND;
261 }
262
263 Config1Node = FdtSubnodeOffsetNameLen (Fdt, ConfigNode, "conf-1", (INT32)AsciiStrLen ("conf-1"));
264 if (Config1Node <= 0) {
265 return EFI_NOT_FOUND;
266 }
267
268 ImageNode = FdtSubnodeOffsetNameLen (Fdt, 0, "images", (INT32)AsciiStrLen ("images"));
269 if (ImageNode <= 0) {
270 return EFI_NOT_FOUND;
271 }
272
273 FvNode = FdtSubnodeOffsetNameLen (Fdt, ImageNode, "tianocore", (INT32)AsciiStrLen ("tianocore"));
274 Depth = FdtNodeDepth (Fdt, FvNode);
275 FvNode = FdtNextNode (Fdt, FvNode, &Depth);
276 Fvname = FdtGetName (Fdt, FvNode, &TempLen);
277 while ((AsciiStrCmp ((Fvname + AsciiStrLen (Fvname) - 2), "fv") == 0)) {
278 if (FvNode <= 0) {
279 return EFI_NOT_FOUND;
280 }
281
282 PropertyPtr = FdtGetProperty (Fdt, FvNode, "data-offset", &TempLen);
283 Data32 = (UINT32 *)(PropertyPtr->Data);
284 DataOffset = SwapBytes32 (*Data32);
285
286 PropertyPtr = FdtGetProperty (Fdt, FvNode, "data-size", &TempLen);
287 Data32 = (UINT32 *)(PropertyPtr->Data);
288 DataSize = SwapBytes32 (*Data32);
289
290 if (AsciiStrCmp (Fvname, "uefi-fv") == 0) {
291 *DxeFv = (EFI_FIRMWARE_VOLUME_HEADER *)((UINTN)PayloadBase->Entry + (UINTN)DataOffset);
292 ASSERT ((*DxeFv)->FvLength == DataSize);
293 } else {
294 BuildFvHob (((UINTN)PayloadBase->Entry + (UINTN)DataOffset), DataSize);
295 }
296
297 DEBUG ((
298 DEBUG_INFO,
299 "UPL Multiple fv[%a], Base=0x%08x, size=0x%08x\n",
300 Fvname,
301 ((UINTN)PayloadBase->Entry + (UINTN)DataOffset),
302 DataSize
303 ));
304 Depth = FdtNodeDepth (Fdt, FvNode);
305 FvNode = FdtNextNode (Fdt, FvNode, &Depth);
306 Fvname = FdtGetName (Fdt, FvNode, &TempLen);
307 }
308
309 return EFI_SUCCESS;
310}
311
318VOID
320 IN UINTN BootloaderParameter
321 )
322{
324 UINTN MinimalNeededSize;
325 EFI_PHYSICAL_ADDRESS FreeMemoryBottom;
326 EFI_PHYSICAL_ADDRESS FreeMemoryTop;
327 EFI_PHYSICAL_ADDRESS MemoryBottom;
328 EFI_PHYSICAL_ADDRESS MemoryTop;
329 EFI_HOB_RESOURCE_DESCRIPTOR *PhitResourceHob;
330 EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob;
332
333 Hob.Raw = (UINT8 *)BootloaderParameter;
334 MinimalNeededSize = FixedPcdGet32 (PcdSystemMemoryUefiRegionSize);
335
336 ASSERT (Hob.Raw != NULL);
337 ASSERT ((UINTN)Hob.HandoffInformationTable->EfiFreeMemoryTop == Hob.HandoffInformationTable->EfiFreeMemoryTop);
338 ASSERT ((UINTN)Hob.HandoffInformationTable->EfiMemoryTop == Hob.HandoffInformationTable->EfiMemoryTop);
339 ASSERT ((UINTN)Hob.HandoffInformationTable->EfiFreeMemoryBottom == Hob.HandoffInformationTable->EfiFreeMemoryBottom);
340 ASSERT ((UINTN)Hob.HandoffInformationTable->EfiMemoryBottom == Hob.HandoffInformationTable->EfiMemoryBottom);
341
342 //
343 // Try to find Resource Descriptor HOB that contains Hob range EfiMemoryBottom..EfiMemoryTop
344 //
345 PhitResourceHob = FindResourceDescriptorByRange (Hob.Raw, Hob.HandoffInformationTable->EfiMemoryBottom, Hob.HandoffInformationTable->EfiMemoryTop);
346 if (PhitResourceHob == NULL) {
347 //
348 // Boot loader's Phit Hob is not in an available Resource Descriptor, find another Resource Descriptor for new Phit Hob
349 //
350 ResourceHob = FindAnotherHighestBelow4GResourceDescriptor (Hob.Raw, MinimalNeededSize, NULL);
351 if (ResourceHob == NULL) {
352 return;
353 }
354
355 MemoryBottom = ResourceHob->PhysicalStart + ResourceHob->ResourceLength - MinimalNeededSize;
356 FreeMemoryBottom = MemoryBottom;
357 FreeMemoryTop = ResourceHob->PhysicalStart + ResourceHob->ResourceLength;
358 MemoryTop = FreeMemoryTop;
359 } else if (PhitResourceHob->PhysicalStart + PhitResourceHob->ResourceLength - Hob.HandoffInformationTable->EfiMemoryTop >= MinimalNeededSize) {
360 //
361 // New availiable Memory range in new hob is right above memory top in old hob.
362 //
363 MemoryBottom = Hob.HandoffInformationTable->EfiFreeMemoryTop;
364 FreeMemoryBottom = Hob.HandoffInformationTable->EfiMemoryTop;
365 FreeMemoryTop = FreeMemoryBottom + MinimalNeededSize;
366 MemoryTop = FreeMemoryTop;
367 } else if (Hob.HandoffInformationTable->EfiMemoryBottom - PhitResourceHob->PhysicalStart >= MinimalNeededSize) {
368 //
369 // New availiable Memory range in new hob is right below memory bottom in old hob.
370 //
371 MemoryBottom = Hob.HandoffInformationTable->EfiMemoryBottom - MinimalNeededSize;
372 FreeMemoryBottom = MemoryBottom;
373 FreeMemoryTop = Hob.HandoffInformationTable->EfiMemoryBottom;
374 MemoryTop = Hob.HandoffInformationTable->EfiMemoryTop;
375 } else {
376 //
377 // In the Resource Descriptor HOB contains boot loader Hob, there is no enough free memory size for payload hob
378 // Find another Resource Descriptor Hob
379 //
380 ResourceHob = FindAnotherHighestBelow4GResourceDescriptor (Hob.Raw, MinimalNeededSize, PhitResourceHob);
381 if (ResourceHob == NULL) {
382 return;
383 }
384
385 MemoryBottom = ResourceHob->PhysicalStart + ResourceHob->ResourceLength - MinimalNeededSize;
386 FreeMemoryBottom = MemoryBottom;
387 FreeMemoryTop = ResourceHob->PhysicalStart + ResourceHob->ResourceLength;
388 MemoryTop = FreeMemoryTop;
389 }
390
391 HobInfo = HobConstructor ((VOID *)(UINTN)MemoryBottom, (VOID *)(UINTN)MemoryTop, (VOID *)(UINTN)FreeMemoryBottom, (VOID *)(UINTN)FreeMemoryTop);
392 HobInfo->BootMode = Hob.HandoffInformationTable->BootMode;
393
394 //
395 // Since payload created new Hob, move all hobs except PHIT from boot loader hob list.
396 //
397 while (!END_OF_HOB_LIST (Hob)) {
398 if (IsHobNeed (Hob)) {
399 // Add this hob to payload HOB
400 AddNewHob (&Hob);
401 }
402
403 Hob.Raw = GET_NEXT_HOB (Hob);
404 }
405
406 return;
407}
408
418 IN UINTN NewFdtBase,
420 )
421{
422 UINT8 *GuidHob;
423 UINT32 FdtSize;
426 ACPI_BOARD_INFO *AcpiBoardInfo;
428
429 if (FixedPcdGetBool (PcdHandOffFdtEnable)) {
430 //
431 // Back up FDT in Reserved memory region
432 //
433 if (NewFdtBase != 0) {
434 GuidHob = GetFirstGuidHob (&gUniversalPayloadDeviceTreeGuid);
435 if (GuidHob != NULL) {
436 Fdt = (UNIVERSAL_PAYLOAD_DEVICE_TREE *)GET_GUID_HOB_DATA (GuidHob);
437 if (Fdt != NULL) {
438 DEBUG ((DEBUG_INFO, "Update FDT base to reserved memory\n"));
439 FdtSize = PcdGet8 (PcdFDTPageSize) * EFI_PAGE_SIZE;
440 CopyMem ((VOID *)NewFdtBase, (VOID *)(Fdt->DeviceTreeAddress), FdtSize);
441 Fdt->DeviceTreeAddress = NewFdtBase;
442 }
443 }
444 }
445 }
446
447 //
448 // To create Memory Type Information HOB
449 //
450 GuidHob = GetFirstGuidHob (&gEfiMemoryTypeInformationGuid);
451 if (GuidHob == NULL) {
453 &gEfiMemoryTypeInformationGuid,
454 mDefaultMemoryTypeInformation,
455 sizeof (mDefaultMemoryTypeInformation)
456 );
457 }
458
459 //
460 // Create guid hob for acpi board information
461 //
462 GuidHob = GetFirstGuidHob (&gUniversalPayloadAcpiTableGuid);
463 if (GuidHob != NULL) {
464 AcpiTable = (UNIVERSAL_PAYLOAD_ACPI_TABLE *)GET_GUID_HOB_DATA (GuidHob);
466 if (GuidHob == NULL) {
467 AcpiBoardInfo = BuildHobFromAcpi ((UINT64)AcpiTable->Rsdp);
468 ASSERT (AcpiBoardInfo != NULL);
469 }
470 }
471
472 //
473 // Create an empty FvHob for the DXE FV that contains DXE core.
474 //
476
478 //
479 // Update DXE FV information to first fv hob in the hob list, which
480 // is the empty FvHob created before.
481 //
482 FvHob = GetFirstHob (EFI_HOB_TYPE_FV);
483 FvHob->BaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)*DxeFv;
484 FvHob->Length = (*DxeFv)->FvLength;
485 return EFI_SUCCESS;
486}
487
494EFIAPI
496 IN UINTN BootloaderParameter
497 )
498{
499 EFI_STATUS Status;
500 PHYSICAL_ADDRESS DxeCoreEntryPoint;
503
504 #if FixedPcdGetBool (PcdHandOffFdtEnable) == 1
505 PHYSICAL_ADDRESS HobListPtr;
506 VOID *FdtBase;
507 #endif
508 VOID *FdtBaseResvd;
509
510 if (FixedPcdGetBool (PcdHandOffFdtEnable)) {
511 mHobList = (VOID *)NULL;
512 } else {
513 mHobList = (VOID *)BootloaderParameter;
514 }
515
516 DxeFv = NULL;
517 FdtBaseResvd = 0;
518 // Call constructor for all libraries
519 ProcessLibraryConstructorList ();
520
521 DEBUG ((DEBUG_INFO, "Entering Universal Payload...\n"));
522 DEBUG ((DEBUG_INFO, "sizeof(UINTN) = 0x%x\n", sizeof (UINTN)));
523 DEBUG ((DEBUG_INFO, "BootloaderParameter = 0x%x\n", BootloaderParameter));
524
525 DEBUG ((DEBUG_INFO, "Start init Hobs...\n"));
526 #if FixedPcdGetBool (PcdHandOffFdtEnable) == 1
527 HobListPtr = UplInitHob ((VOID *)BootloaderParameter);
528
529 //
530 // Found hob list node
531 //
532 if (HobListPtr != 0) {
533 FdtBase = (VOID *)BootloaderParameter;
534 if (FdtCheckHeader (FdtBase) == 0) {
535 CustomFdtNodeParser ((VOID *)FdtBase, (VOID *)HobListPtr);
536 FdtBaseResvd = PayloadAllocatePages (PcdGet8 (PcdFDTPageSize), EfiReservedMemoryType);
537 }
538 }
539
540 #else
541 CreatNewHobForHoblist (BootloaderParameter);
542 #endif
543
544 // Build HOB based on information from Bootloader
545 Status = FitBuildHobs ((UINTN)FdtBaseResvd, &DxeFv);
546
547 // Call constructor for all libraries again since hobs were built
548 ProcessLibraryConstructorList ();
549
550 DEBUG_CODE (
551 //
552 // Dump the Hobs from boot loader
553 //
554 PrintHob (mHobList);
555 );
556
557 FixUpPcdDatabase (DxeFv);
558 Status = UniversalLoadDxeCore (DxeFv, &DxeCoreEntryPoint);
559 ASSERT_EFI_ERROR (Status);
560
561 Hob.HandoffInformationTable = (EFI_HOB_HANDOFF_INFO_TABLE *)GetFirstHob (EFI_HOB_TYPE_HANDOFF);
562 HandOffToDxeCore (DxeCoreEntryPoint, Hob);
563
564 // Should not get here
565 CpuDeadLoop ();
566 return EFI_SUCCESS;
567}
UINT64 UINTN
EFI_GUID gUefiAcpiBoardInfoGuid
VOID *EFIAPI GetFirstHob(IN UINT16 Type)
Definition: HobLib.c:142
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
Definition: HobLib.c:215
VOID *EFIAPI BuildGuidDataHob(IN CONST EFI_GUID *Guid, IN VOID *Data, IN UINTN DataLength)
Definition: HobLib.c:375
VOID EFIAPI BuildFvHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:404
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
Definition: String.c:641
INTN EFIAPI AsciiStrCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
Definition: String.c:716
VOID EFIAPI CpuDeadLoop(VOID)
Definition: CpuDeadLoop.c:25
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
Definition: SwapBytes32.c:25
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID HandOffToDxeCore(IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint, IN EFI_PEI_HOB_POINTERS HobList)
Definition: DxeHandoff.c:26
INT32 EFIAPI FdtNodeDepth(IN CONST VOID *Fdt, IN INT32 NodeOffset)
Definition: FdtLib.c:749
CONST FDT_PROPERTY *EFIAPI FdtGetProperty(IN CONST VOID *Fdt, IN INT32 NodeOffset, IN CONST CHAR8 *Name, IN INT32 *Length)
Definition: FdtLib.c:446
INT32 EFIAPI FdtSubnodeOffsetNameLen(IN CONST VOID *Fdt, IN INT32 ParentOffset, IN CONST CHAR8 *Name, IN INT32 NameLength)
Definition: FdtLib.c:320
INT32 EFIAPI FdtNextNode(IN CONST VOID *Fdt, IN INT32 Offset, IN INT32 *Depth)
Definition: FdtLib.c:220
INT32 EFIAPI FdtCheckHeader(IN CONST VOID *Fdt)
Definition: FdtLib.c:125
CONST CHAR8 *EFIAPI FdtGetName(IN VOID *Fdt, IN INT32 NodeOffset, IN INT32 *Length)
Definition: FdtLib.c:729
UINTN EFIAPI UplInitHob(IN VOID *FdtBase)
UINTN EFIAPI CustomFdtNodeParser(IN VOID *FdtBase, IN VOID *HostList)
VOID PrintHob(IN CONST VOID *HobStart)
Definition: PrintHob.c:362
VOID CreatNewHobForHoblist(IN UINTN BootloaderParameter)
EFI_STATUS BuildFitLoadablesFvHob(OUT EFI_FIRMWARE_VOLUME_HEADER **DxeFv)
EFI_STATUS FixUpPcdDatabase(IN EFI_FIRMWARE_VOLUME_HEADER *DxeFv)
CHAR8 *EFIAPI AsciiStrBrk(IN CHAR8 *String, IN CHAR8 *CharSet)
UINTN EFIAPI AsciiStrSpn(IN CHAR8 *String, IN CHAR8 *CharSet)
CHAR8 *EFIAPI AsciiStrTokenLine(IN CHAR8 *String OPTIONAL, IN CHAR8 *CharSet)
EFI_STATUS FitBuildHobs(IN UINTN NewFdtBase, OUT EFI_FIRMWARE_VOLUME_HEADER **DxeFv)
EFI_STATUS EFIAPI FitUplEntryPoint(IN UINTN BootloaderParameter)
ACPI_BOARD_INFO * BuildHobFromAcpi(IN UINT64 AcpiTableBase)
Definition: AcpiTable.c:139
VOID AddNewHob(IN EFI_PEI_HOB_POINTERS *Hob)
Definition: HobParseLib.c:101
EFI_HOB_RESOURCE_DESCRIPTOR * FindResourceDescriptorByRange(IN VOID *HobList, IN EFI_PHYSICAL_ADDRESS Base, IN EFI_PHYSICAL_ADDRESS Top)
Definition: HobParseLib.c:128
BOOLEAN IsHobNeed(EFI_PEI_HOB_POINTERS Hob)
Definition: HobParseLib.c:264
EFI_HOB_RESOURCE_DESCRIPTOR * FindAnotherHighestBelow4GResourceDescriptor(IN VOID *HobList, IN UINTN MinimalNeededSize, IN EFI_HOB_RESOURCE_DESCRIPTOR *ExceptResourceHob)
Definition: HobParseLib.c:184
EFI_STATUS UniversalLoadDxeCore(IN EFI_FIRMWARE_VOLUME_HEADER *DxeFv, OUT PHYSICAL_ADDRESS *DxeCoreEntryPoint)
Definition: LoadDxeCore.c:327
EFI_STATUS FileFindSection(IN EFI_FFS_FILE_HEADER *FileHeader, IN EFI_SECTION_TYPE SectionType, OUT VOID **SectionData)
Definition: LoadDxeCore.c:201
EFI_STATUS FvFindFileByTypeGuid(IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader, IN EFI_FV_FILETYPE FileType, IN EFI_GUID *Guid OPTIONAL, OUT EFI_FFS_FILE_HEADER **FileHeader)
Definition: LoadDxeCore.c:131
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define GLOBAL_REMOVE_IF_UNREFERENCED
Definition: Base.h:48
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define DEBUG_CODE(Expression)
Definition: DebugLib.h:590
VOID *EFIAPI PayloadAllocatePages(IN UINTN Pages, IN EFI_MEMORY_TYPE MemoryType)
#define FixedPcdGet32(TokenName)
Definition: PcdLib.h:92
#define PcdGet8(TokenName)
Definition: PcdLib.h:336
#define FixedPcdGetBool(TokenName)
Definition: PcdLib.h:120
#define PcdGetPtr(TokenName)
Definition: PcdLib.h:388
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
@ EfiReservedMemoryType
@ EfiACPIMemoryNVS
@ EfiACPIReclaimMemory
@ EfiRuntimeServicesCode
@ EfiRuntimeServicesData
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:364
EFI_BOOT_MODE BootMode
Definition: PiHob.h:74
EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom
Definition: PiHob.h:92
EFI_PHYSICAL_ADDRESS EfiMemoryTop
Definition: PiHob.h:79
EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop
Definition: PiHob.h:88
EFI_PHYSICAL_ADDRESS EfiMemoryBottom
Definition: PiHob.h:83
EFI_PHYSICAL_ADDRESS PhysicalStart
Definition: PiHob.h:328