30#define IGD_BUS_NUM 0x00
31#define IGD_DEV_NUM 0x02
32#define IGD_FUN_NUM 0x00
35BOOLEAN mResourceAssigned;
37CHAR8 *mMemoryAllocType[] = {
50 "MemoryMappedIOPortSpace",
72 &gEdkiiPeiPciDevicePpiGuid,
75 (
void **)&mPciDevicePpi
77 if (EFI_ERROR (Status) || (mPciDevicePpi ==
NULL)) {
106 HobStart =
GetFirstHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR);
110 for (Hob.Raw = HobStart; !END_OF_HOB_LIST (Hob); Hob.Raw = GET_NEXT_HOB (Hob)) {
111 if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {
112 ResourceHob = Hob.ResourceDescriptor;
114 if (ResourceHob->
ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) {
119 ASSERT (TempNode > 0);
123 Status =
FdtSetProperty (Fdt, TempNode,
"reg", &RegTmp,
sizeof (RegTmp));
166 ASSERT (ParentNode > 0);
169 Status =
FdtSetProperty (Fdt, ParentNode,
"#address-cells", &Data32,
sizeof (UINT32));
170 Status =
FdtSetProperty (Fdt, ParentNode,
"#size-cells", &Data32,
sizeof (UINT32));
175 if (GuidHob !=
NULL) {
176 SmbiosTable = GET_GUID_HOB_DATA (GuidHob);
177 DEBUG ((DEBUG_INFO,
"To build Smbios memory FDT ,SmbiosTable :%lx, SmBiosEntryPoint :%lx\n", (
UINTN)SmbiosTable, SmbiosTable->SmBiosEntryPoint));
178 Status =
AsciiSPrint (TempStr,
sizeof (TempStr),
"memory@%lX", SmbiosTable->SmBiosEntryPoint);
179 DEBUG ((DEBUG_INFO,
"To build Smbios memory FDT #2, SmbiosTable->Header.Length :%x\n", SmbiosTable->Header.Length));
182 DEBUG ((DEBUG_INFO,
"FdtAddSubnode %x", TempNode));
183 RegTmp[0] =
CpuToFdt64 (SmbiosTable->SmBiosEntryPoint);
184 RegTmp[1] =
CpuToFdt64 (SmbiosTable->Header.Length);
192 if (GuidHob !=
NULL) {
196 HobStart =
GetFirstHob (EFI_HOB_TYPE_MEMORY_ALLOCATION);
200 for (Hob.Raw = HobStart; !END_OF_HOB_LIST (Hob); Hob.Raw = GET_NEXT_HOB (Hob)) {
201 if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) {
210 if (
CompareGuid (AllocMemName, &gEfiHobMemoryAllocStackGuid)) {
212 }
else if (
CompareGuid (AllocMemName, &gEfiHobMemoryAllocBspStoreGuid)) {
219 "Found hob for rsvd memory alloc: base %016lX length %016lX type %x\n",
226 if (IsStackHob == 1) {
234 }
else if (IsBspStore == 1) {
247 mMemoryAllocType[AllocMemType],
252 if (
AsciiStrCmp (mMemoryAllocType[AllocMemType],
"ConventionalMemory") == 0) {
256 if (
AsciiStrCmp (mMemoryAllocType[AllocMemType],
"mmio") == 0) {
263 DEBUG ((DEBUG_INFO,
"FdtAddSubnode %x", TempNode));
270 Status =
FdtSetProperty (Fdt, TempNode,
"reg", &RegTmp,
sizeof (RegTmp));
273 if ((
AsciiStrCmp (mMemoryAllocType[AllocMemType],
"mmio") == 0)) {
277 if (!(
AsciiStrCmp (mMemoryAllocType[AllocMemType],
"acpi-nvs") == 0) && (
AsciiStrCmp (mMemoryAllocType[AllocMemType],
"acpi") == 0)) {
280 DEBUG ((DEBUG_INFO,
"keep acpi memory hob \n"));
281 Status =
FdtSetProperty (Fdt, TempNode,
"compatible", mMemoryAllocType[AllocMemType], (UINT32)(
AsciiStrLen (mMemoryAllocType[AllocMemType])+1));
284 DEBUG ((DEBUG_INFO,
"change acpi memory hob \n"));
285 Status =
FdtSetProperty (Fdt, TempNode,
"compatible", mMemoryAllocType[4], (UINT32)(
AsciiStrLen (mMemoryAllocType[4])+1));
289 DEBUG ((DEBUG_INFO,
"other memory hob \n"));
290 Status =
FdtSetProperty (Fdt, TempNode,
"compatible", mMemoryAllocType[AllocMemType], (UINT32)(
AsciiStrLen (mMemoryAllocType[AllocMemType])+1));
327 Status =
AsciiSPrint (TempStr,
sizeof (TempStr),
"serial@%lX", (RegisterBase == 0) ?
PcdGet64 (PcdSerialRegisterBase) : RegisterBase);
329 ASSERT (TempNode > 0);
332 Status =
FdtSetProperty (Fdt, TempNode,
"current-speed", &Data32,
sizeof (Data32));
343 Data64 = (RegisterBase == 0) ?
PcdGet64 (PcdSerialRegisterBase) : RegisterBase;
344 Data32 = (UINT32)((Data64 & 0x0FFFFFFFF));
347 Status =
FdtSetProperty (Fdt, TempNode,
"reg", &RegData,
sizeof (RegData));
351 Status =
FdtSetProperty (Fdt, TempNode,
"reg-io-width", &Data32,
sizeof (Data32));
384 SerialPortInfo =
NULL;
387 DEBUG ((DEBUG_INFO,
"BuildFdtForSerialLpss start \n"));
389 while (GuidHob !=
NULL) {
392 if (!SerialPortInfo->UseMmio) {
393 GuidHob = GET_NEXT_HOB (GuidHob);
394 GuidHob =
GetNextGuidHob (&gUniversalPayloadSerialPortInfoGuid, GuidHob);
398 DEBUG ((DEBUG_INFO,
"Create SerialPortInfo LPSS FDT node \n"));
402 Status =
AsciiSPrint (TempStr,
sizeof (TempStr),
"serial@%lX", SerialPortInfo->RegisterBase);
404 ASSERT (TempNode > 0);
406 Data32 =
CpuToFdt32 (SerialPortInfo->BaudRate);
407 Status =
FdtSetProperty (Fdt, TempNode,
"current-speed", &Data32,
sizeof (Data32));
410 RegData[0] =
CpuToFdt32 ((UINT32)SerialPortInfo->RegisterBase);
412 Status =
FdtSetProperty (Fdt, TempNode,
"reg", &RegData,
sizeof (RegData));
416 Status =
FdtSetProperty (Fdt, TempNode,
"reg-io-width", &Data32,
sizeof (Data32));
422 GuidHob = GET_NEXT_HOB (GuidHob);
423 GuidHob =
GetNextGuidHob (&gUniversalPayloadSerialPortInfoGuid, GuidHob);
450 UINT32 DMARegData[8];
473 PciRootBridgeInfo =
NULL;
475 DEBUG ((DEBUG_INFO,
"%a: #1 \n", __func__));
481 if (GuidHob !=
NULL) {
485 DEBUG ((DEBUG_INFO,
"%a: #2 \n", __func__));
495 GuidHob =
GetFirstGuidHob (&gUniversalPayloadSerialPortParentDeviceInfoGuid);
496 if (GuidHob !=
NULL) {
498 BusBase = (SerialParent->ParentDevicePcieBaseAddress >> 20) & 0xFF;
499 DevBase = (SerialParent->ParentDevicePcieBaseAddress >> 15) & 0x1F;
500 FunBase = (SerialParent->ParentDevicePcieBaseAddress >> 12) & 0x07;
503 DEBUG ((DEBUG_INFO,
"PciRootBridgeInfo->Count %x\n", PciRootBridgeInfo->Count));
504 DEBUG ((DEBUG_INFO,
"PciRootBridge->Segment %x, \n", PciRootBridgeInfo->RootBridge[0].
Segment));
506 DEBUG ((DEBUG_INFO,
"PciRootBridge->Bus.Base %x, \n", PciRootBridgeInfo->RootBridge[0].
Bus.Base));
507 DEBUG ((DEBUG_INFO,
"PciRootBridge->Bus.limit %x, \n", PciRootBridgeInfo->RootBridge[0].
Bus.Limit));
509 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.Base %x, \n", PciRootBridgeInfo->RootBridge[0].
Mem.Base));
510 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.limit %x, \n", PciRootBridgeInfo->RootBridge[0].
Mem.Limit));
512 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.Base %llx, \n", PciRootBridgeInfo->RootBridge[0].
MemAbove4G.Base));
513 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.limit %llx, \n", PciRootBridgeInfo->RootBridge[0].
MemAbove4G.Limit));
515 DEBUG ((DEBUG_INFO,
"PciRootBridge->PMem.Base %llx, \n", PciRootBridgeInfo->RootBridge[0].
PMem.Base));
516 DEBUG ((DEBUG_INFO,
"PciRootBridge->PMem.limit %llx, \n", PciRootBridgeInfo->RootBridge[0].
PMem.Limit));
518 DEBUG ((DEBUG_INFO,
"PciRootBridge->Bus.Base %x, \n", PciRootBridgeInfo->RootBridge[1].
Bus.Base));
519 DEBUG ((DEBUG_INFO,
"PciRootBridge->Bus.limit %x, \n", PciRootBridgeInfo->RootBridge[1].
Bus.Limit));
521 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.Base %x, \n", PciRootBridgeInfo->RootBridge[1].
Mem.Base));
522 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.limit %x, \n", PciRootBridgeInfo->RootBridge[1].
Mem.Limit));
524 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.Base %llx, \n", PciRootBridgeInfo->RootBridge[1].
MemAbove4G.Base));
525 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.limit %llx, \n", PciRootBridgeInfo->RootBridge[1].
MemAbove4G.Limit));
527 DEBUG ((DEBUG_INFO,
"PciRootBridge->PMem.Base %x, \n", PciRootBridgeInfo->RootBridge[1].
PMem.Base));
528 DEBUG ((DEBUG_INFO,
"PciRootBridge->PMem.limit %x, \n", PciRootBridgeInfo->RootBridge[1].
PMem.Limit));
530 if (PciRootBridgeInfo !=
NULL) {
531 for (Index = 0; Index < PciRootBridgeInfo->Count; Index++) {
532 UINTN PciExpressBaseAddress;
534 mResourceAssigned = PciRootBridgeInfo->ResourceAssigned;
535 PciExpressBaseAddress =
PcdGet64 (PcdPciExpressBaseAddress) + (
PCI_LIB_ADDRESS (PciRootBridgeInfo->RootBridge[Index].
Bus.Base, 0, 0, 0));
536 Status =
AsciiSPrint (TempStr,
sizeof (TempStr),
"pci-rb%d@%lX", Index, PciExpressBaseAddress);
538 ASSERT (TempNode > 0);
539 SetMem (RegData,
sizeof (RegData), 0);
542 Data32 = (N_NON_RELOCATABLE + SS_32BIT_MEMORY_SPACE);
544 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.Base RegData[0] %x, \n", Data32));
548 Data32 = (UINT32)PciRootBridgeInfo->RootBridge[Index].
Mem.Base;
550 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.Base RegData[2] %x, \n", Data32));
555 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.Base RegData[4] %x, \n", Data32));
558 Data64 = (PciRootBridgeInfo->RootBridge[Index].
Mem.Limit - PciRootBridgeInfo->RootBridge[Index].
Mem.Base + 1);
559 if (Data64 & 0xFFFFFFFF00000000) {
560 Data32 = (UINT32)
RShiftU64 ((Data64 & 0xFFFFFFFF00000000), 31);
565 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.size RegData[5] %x, \n", Data32));
567 Data32 = (UINT32)((Data64 & 0x0FFFFFFFF));
568 DEBUG ((DEBUG_INFO,
"PciRootBridge->Mem.size RegData[6] %x, \n", Data32));
573 Data32 = (N_NON_RELOCATABLE + SS_64BIT_MEMORY_SPACE);
575 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.Base RegData[7] %x, \n", Data32));
578 Data64 = PciRootBridgeInfo->RootBridge[Index].
MemAbove4G.Base;
579 Data32 = (UINT32)
RShiftU64 ((Data64 & 0xFFFFFFFF00000000), 32);
582 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.Base RegData[8] %x, \n", Data32));
583 Data32 = (UINT32)((Data64 & 0x0FFFFFFFF));
585 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.Base RegData[9] %x, \n", Data32));
588 RegData[10] = RegData[8];
589 RegData[11] = RegData[9];
592 Data64 = (PciRootBridgeInfo->RootBridge[Index].
MemAbove4G.Limit - PciRootBridgeInfo->RootBridge[Index].
MemAbove4G.Base + 1);
593 if (Data64 & 0xFFFFFFFF00000000) {
594 Data32 = (UINT32)
RShiftU64 ((Data64 & 0xFFFFFFFF00000000), 32);
600 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.size RegData[12] %x, \n", Data32));
602 Data32 = (UINT32)((Data64 & 0x0FFFFFFFF));
604 DEBUG ((DEBUG_INFO,
"PciRootBridge->MemAbove4G.size RegData[13] %x, \n", Data32));
607 Data32 = (N_NON_RELOCATABLE + SS_IO_SPACE);
610 DEBUG ((DEBUG_INFO,
"PciRootBridge->Io.base RegData[14] %x, \n", Data32));
612 Data32 = (UINT32)PciRootBridgeInfo->RootBridge[Index].
Io.Base;
616 DEBUG ((DEBUG_INFO,
"PciRootBridge->Io.base RegData[16] %x, \n", Data32));
622 Data64 = (PciRootBridgeInfo->RootBridge[Index].
Io.Limit - PciRootBridgeInfo->RootBridge[Index].
Io.Base + 1);
623 if (Data64 & 0xFFFFFFFF00000000) {
624 Data32 = (UINT32)
RShiftU64 ((Data64 & 0xFFFFFFFF00000000), 32);
630 DEBUG ((DEBUG_INFO,
"PciRootBridge->Io.base size [19] %x, \n", Data32));
632 Data32 = (UINT32)((Data64 & 0x0FFFFFFFF));
634 DEBUG ((DEBUG_INFO,
"PciRootBridge->Io.base size [20] %x, \n", Data32));
636 Status =
FdtSetProperty (Fdt, TempNode,
"ranges", &RegData,
sizeof (RegData));
641 Data32 = (N_NON_RELOCATABLE + SS_32BIT_MEMORY_SPACE);
644 DEBUG ((DEBUG_INFO,
"PciRootBridge->DMA base RegData[0] %x, \n", Data32));
656 Status =
FdtSetProperty (Fdt, TempNode,
"dma-ranges", &DMARegData,
sizeof (DMARegData));
659 ASSERT (PciRootBridgeInfo->RootBridge[Index].
Bus.Base <= 0xFF);
660 ASSERT (PciRootBridgeInfo->RootBridge[Index].
Bus.Limit <= 0xFF);
662 Reg64Data[0] =
CpuToFdt64 (PciExpressBaseAddress +
LShiftU64 (PciRootBridgeInfo->RootBridge[Index].
Bus.Base, 20));
665 Status =
FdtSetProperty (Fdt, TempNode,
"reg", &Reg64Data,
sizeof (Reg64Data));
668 BusNumber = PciRootBridgeInfo->RootBridge[Index].
Bus.Base & 0xFF;
670 BusLimit = PciRootBridgeInfo->RootBridge[Index].
Bus.Limit & 0xFF;
672 DEBUG ((DEBUG_INFO,
"PciRootBridge->BusNumber %x, \n", BusNumber));
673 DEBUG ((DEBUG_INFO,
"PciRootBridge->BusLimit %x, \n", BusLimit));
675 Status =
FdtSetProperty (Fdt, TempNode,
"bus-range", &RegTmp,
sizeof (RegTmp));
679 Status =
FdtSetProperty (Fdt, TempNode,
"#size-cells", &Data32,
sizeof (UINT32));
682 Status =
FdtSetProperty (Fdt, TempNode,
"#address-cells", &Data32,
sizeof (UINT32));
688 PciExpressBaseAddress =
PcdGet64 (PcdPciExpressBaseAddress) + (
PCI_LIB_ADDRESS (IGD_BUS_NUM, IGD_DEV_NUM, IGD_FUN_NUM, 0));
689 Status =
AsciiSPrint (GmaStr,
sizeof (GmaStr),
"gma@%lX", PciExpressBaseAddress);
692 if (!EFI_ERROR (Status)) {
693 Status = mPciDevicePpi->PciIo.Pci.
Read (
694 &mPciDevicePpi->PciIo,
696 PCI_VENDOR_ID_OFFSET,
697 sizeof (PciData.Hdr.VendorId),
698 &(PciData.Hdr.VendorId)
701 Status = mPciDevicePpi->PciIo.Pci.
Read (
702 &mPciDevicePpi->PciIo,
704 PCI_DEVICE_ID_OFFSET,
705 sizeof (PciData.Hdr.DeviceId),
706 &(PciData.Hdr.DeviceId)
709 Status = mPciDevicePpi->PciIo.Pci.
Read (
710 &mPciDevicePpi->PciIo,
712 PCI_REVISION_ID_OFFSET,
713 sizeof (PciData.Hdr.RevisionID),
714 &(PciData.Hdr.RevisionID)
717 Status = mPciDevicePpi->PciIo.Pci.
Read (
718 &mPciDevicePpi->PciIo,
721 sizeof (PciData.Device.SubsystemVendorID),
722 &(PciData.Device.SubsystemVendorID)
725 Status = mPciDevicePpi->PciIo.Pci.
Read (
726 &mPciDevicePpi->PciIo,
729 sizeof (PciData.Device.SubsystemID),
730 &(PciData.Device.SubsystemID)
734 Data32 =
CpuToFdt32 (PciData.Device.SubsystemID);
735 Status =
FdtSetProperty (Fdt, GmaNode,
"subsystem-id", &Data32,
sizeof (UINT32));
737 Data32 =
CpuToFdt32 (PciData.Device.SubsystemVendorID);
738 Status =
FdtSetProperty (Fdt, GmaNode,
"subsystem-vendor-id", &Data32,
sizeof (UINT32));
741 Status =
FdtSetProperty (Fdt, GmaNode,
"revision-id", &Data32,
sizeof (UINT32));
744 Status =
FdtSetProperty (Fdt, GmaNode,
"device-id", &Data32,
sizeof (UINT32));
747 Status =
FdtSetProperty (Fdt, GmaNode,
"vendor-id", &Data32,
sizeof (UINT32));
750 if (SerialParent !=
NULL) {
751 DEBUG ((DEBUG_INFO,
"SerialParent->IsIsaCompatible :%x , SerialParent->ParentDevicePcieBaseAddress :%x\n", SerialParent->IsIsaCompatible, SerialParent->ParentDevicePcieBaseAddress));
752 DEBUG ((DEBUG_INFO,
"BusBase :%x , PciRootBridgeInfo->RootBridge[Index].Bus.Base :%x\n", BusBase, PciRootBridgeInfo->RootBridge[Index].
Bus.Base));
756 if ((BusBase >= PciRootBridgeInfo->RootBridge[Index].
Bus.Base) && (BusBase <= PciRootBridgeInfo->RootBridge[Index].Bus.Limit)) {
758 if (SerialParent !=
NULL) {
759 if (SerialParent->IsIsaCompatible) {
760 Status =
AsciiSPrint (eSPIStr,
sizeof (eSPIStr),
"isa@%X,%X", DevBase, FunBase);
765 Status =
FdtSetProperty (Fdt, eSPINode,
"#size-cells", &Data32,
sizeof (UINT32));
767 Status =
FdtSetProperty (Fdt, eSPINode,
"#address-cells", &Data32,
sizeof (UINT32));
780 DEBUG ((DEBUG_INFO,
"%a: #3 \n", __func__));
808 if (GuidHob !=
NULL) {
810 Status =
AsciiSPrint (TempStr,
sizeof (TempStr),
"framebuffer@%lX", GraphicsInfo->FrameBufferBase);
812 ASSERT (TempNode > 0);
821 Status =
FdtSetProperty (Fdt, TempNode,
"height", &Data32,
sizeof (UINT32));
825 Status =
FdtSetProperty (Fdt, TempNode,
"width", &Data32,
sizeof (UINT32));
828 RegData[0] =
CpuToFdt64 (GraphicsInfo->FrameBufferBase);
829 RegData[1] =
CpuToFdt64 (GraphicsInfo->FrameBufferSize);
830 Status =
FdtSetProperty (Fdt, TempNode,
"reg", &RegData,
sizeof (RegData));
833 Status =
FdtSetProperty (Fdt, TempNode,
"compatible",
"simple-framebuffer", (UINT32)(
AsciiStrLen (
"simple-framebuffer")+1));
836 Status =
AsciiSPrint (TempStr,
sizeof (TempStr),
"framebuffer@%lX", 0xB0000000);
838 ASSERT (TempNode > 0);
847 Status =
FdtSetProperty (Fdt, TempNode,
"height", &Data32,
sizeof (UINT32));
851 Status =
FdtSetProperty (Fdt, TempNode,
"width", &Data32,
sizeof (UINT32));
856 Status =
FdtSetProperty (Fdt, TempNode,
"reg", &RegData,
sizeof (RegData));
859 Status =
FdtSetProperty (Fdt, TempNode,
"compatible",
"simple-framebuffer", (UINT32)(
AsciiStrLen (
"simple-framebuffer")+1));
900 ASSERT (ParentNode > 0);
903 ASSERT (UPLParaNode > 0);
909 ASSERT (CpuHob !=
NULL);
911 if (mResourceAssigned) {
919 Status =
FdtSetProperty (Fdt, UPLParaNode,
"addr-width", &Data32,
sizeof (Data32));
922 if (BootMode == BOOT_WITH_FULL_CONFIGURATION) {
924 }
else if (BootMode == BOOT_WITH_MINIMAL_CONFIGURATION) {
926 }
else if (BootMode == BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS) {
928 }
else if (BootMode == BOOT_WITH_DEFAULT_SETTINGS) {
930 }
else if (BootMode == BOOT_ON_S4_RESUME) {
932 }
else if (BootMode == BOOT_ON_S3_RESUME) {
944 if (GuidHob !=
NULL) {
946 Fit = (VOID *)(
UINTN)PayloadBase->Entry;
947 DEBUG ((DEBUG_INFO,
"PayloadBase Entry = 0x%08x\n", PayloadBase->Entry));
949 Status =
AsciiSPrint (TempStr,
sizeof (TempStr),
"upl-images@%lX", (
UINTN)(Fit));
953 Status =
FdtSetProperty (FdtBase, UPLImageNode,
"addr", &Data64,
sizeof (Data64));
957 ASSERT (CustomNode > 0);
961 Status =
FdtSetProperty (Fdt, CustomNode,
"hoblistptr", &Data64,
sizeof (Data64));
VOID *EFIAPI GetFirstHob(IN UINT16 Type)
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
VOID *EFIAPI GetNextGuidHob(IN CONST EFI_GUID *Guid, IN CONST VOID *HobStart)
VOID *EFIAPI GetHobList(VOID)
EFI_BOOT_MODE EFIAPI GetBootModeHob(VOID)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
INTN EFIAPI AsciiStrCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
BOOLEAN EFIAPI IsZeroGuid(IN CONST GUID *Guid)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
UINT64 EFIAPI CpuToFdt64(IN UINT64 Value)
INT32 EFIAPI FdtSetProperty(IN VOID *Fdt, IN INT32 NodeOffset, IN CONST CHAR8 *Name, IN CONST VOID *Value, IN UINT32 Length)
INT32 EFIAPI FdtAddSubnode(IN VOID *Fdt, IN INT32 ParentOffset, IN CONST CHAR8 *Name)
UINT32 EFIAPI CpuToFdt32(IN UINT32 Value)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PCI_LIB_ADDRESS(Bus, Device, Function, Register)
EFI_PCI_IO_PROTOCOL_WIDTH
#define PcdGet64(TokenName)
#define PcdGet32(TokenName)
#define PcdGetBool(TokenName)
#define PCI_SID_OFFSET
SubSystem ID.
#define PCI_SVID_OFFSET
SubSystem Vendor id.
UINT64 EFI_PHYSICAL_ADDRESS
EFI_STATUS BuildFdtForMemAlloc(IN VOID *FdtBase)
EFI_STATUS EFIAPI LocatePciDevicePpi(VOID)
EFI_STATUS BuildFdtForMemory(IN VOID *FdtBase)
EFI_STATUS BuildFdtForPciRootBridge(IN VOID *FdtBase)
EFI_STATUS BuildFdtForUPL(IN VOID *FdtBase)
EFI_STATUS BuildFdtForSerial(IN INT32 ISANode, IN VOID *FdtBase)
EFI_STATUS BuildFdtForFrameBuffer(IN VOID *FdtBase)
EFI_STATUS BuildFdtForUplRequired(IN VOID *FdtBase)
EFI_STATUS BuildFdtForSerialLpss(IN INT32 ISANode, IN VOID *FdtBase)
UINT32 VerticalResolution
UINT32 HorizontalResolution
EFI_PHYSICAL_ADDRESS MemoryBaseAddress
EFI_MEMORY_TYPE MemoryType
EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor
EFI_PHYSICAL_ADDRESS PhysicalStart
EFI_RESOURCE_TYPE ResourceType
EFI_PCI_IO_PROTOCOL_CONFIG Read
UINT32 Segment
Segment number.
UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE Bus
Bus aperture which can be used by the root bridge.
UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE Mem
MMIO aperture below 4GB which can be used by the root bridge.
UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE MemAbove4G
MMIO aperture above 4GB which can be used by the root bridge.
UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE PMem
Prefetchable MMIO aperture below 4GB which can be used by the root bridge.
UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGE_APERTURE Io
IO aperture which can be used by the root bridge.