TianoCore EDK2 master
Loading...
Searching...
No Matches
PciHostBridgeLibNull.c
Go to the documentation of this file.
1
9#include <PiDxe.h>
11#include <Library/DebugLib.h>
12
14CHAR16 *mPciHostBridgeLibAcpiAddressSpaceTypeStr[] = {
15 L"Mem", L"I/O", L"Bus"
16};
17
28EFIAPI
30 UINTN *Count
31 )
32{
33 *Count = 0;
34 return NULL;
35}
36
43VOID
44EFIAPI
46 PCI_ROOT_BRIDGE *Bridges,
47 UINTN Count
48 )
49{
50 return;
51}
52
67VOID
68EFIAPI
70 EFI_HANDLE HostBridgeHandle,
71 VOID *Configuration
72 )
73{
75 UINTN RootBridgeIndex;
76
77 DEBUG ((DEBUG_ERROR, "PciHostBridge: Resource conflict happens!\n"));
78
79 RootBridgeIndex = 0;
80 Descriptor = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *)Configuration;
81 while (Descriptor->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR) {
82 DEBUG ((DEBUG_ERROR, "RootBridge[%d]:\n", RootBridgeIndex++));
83 for ( ; Descriptor->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR; Descriptor++) {
84 ASSERT (
85 Descriptor->ResType <
86 (sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr) /
87 sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr[0])
88 )
89 );
90 DEBUG ((
91 DEBUG_ERROR,
92 " %s: Length/Alignment = 0x%lx / 0x%lx\n",
93 mPciHostBridgeLibAcpiAddressSpaceTypeStr[Descriptor->ResType],
94 Descriptor->AddrLen,
95 Descriptor->AddrRangeMax
96 ));
97 if (Descriptor->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM) {
98 DEBUG ((
99 DEBUG_ERROR,
100 " Granularity/SpecificFlag = %ld / %02x%s\n",
101 Descriptor->AddrSpaceGranularity,
102 Descriptor->SpecificFlag,
103 ((Descriptor->SpecificFlag &
104 EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE
105 ) != 0) ? L" (Prefetchable)" : L""
106 ));
107 }
108 }
109
110 //
111 // Skip the END descriptor for root bridge
112 //
113 ASSERT (Descriptor->Desc == ACPI_END_TAG_DESCRIPTOR);
114 Descriptor = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *)(
115 (EFI_ACPI_END_TAG_DESCRIPTOR *)Descriptor + 1
116 );
117 }
118}
UINT64 UINTN
PACKED struct @89 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
#define NULL
Definition: Base.h:319
#define GLOBAL_REMOVE_IF_UNREFERENCED
Definition: Base.h:48
#define DEBUG(Expression)
Definition: DebugLib.h:434
PCI_ROOT_BRIDGE *EFIAPI PciHostBridgeGetRootBridges(UINTN *Count)
VOID EFIAPI PciHostBridgeFreeRootBridges(PCI_ROOT_BRIDGE *Bridges, UINTN Count)
VOID EFIAPI PciHostBridgeResourceConflict(EFI_HANDLE HostBridgeHandle, VOID *Configuration)
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33