2 Null instance of PCI Host Bridge Library with empty functions.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/PciHostBridgeLib.h>
11 #include <Library/DebugLib.h>
13 GLOBAL_REMOVE_IF_UNREFERENCED
14 CHAR16
*mPciHostBridgeLibAcpiAddressSpaceTypeStr
[] = {
15 L
"Mem", L
"I/O", L
"Bus"
19 Return all the root bridge instances in an array.
21 @param Count Return the count of root bridge instances.
23 @return All the root bridge instances in an array.
24 The array should be passed into PciHostBridgeFreeRootBridges()
29 PciHostBridgeGetRootBridges (
38 Free the root bridge instances array returned from PciHostBridgeGetRootBridges().
40 @param Bridges The root bridge instances array.
41 @param Count The count of the array.
45 PciHostBridgeFreeRootBridges (
46 PCI_ROOT_BRIDGE
*Bridges
,
54 Inform the platform that the resource conflict happens.
56 @param HostBridgeHandle Handle of the Host Bridge.
57 @param Configuration Pointer to PCI I/O and PCI memory resource
58 descriptors. The Configuration contains the resources
59 for all the root bridges. The resource for each root
60 bridge is terminated with END descriptor and an
61 additional END is appended indicating the end of the
62 entire resources. The resource descriptor field
63 values follow the description in
64 EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
69 PciHostBridgeResourceConflict (
70 EFI_HANDLE HostBridgeHandle
,
74 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*Descriptor
;
75 UINTN RootBridgeIndex
;
76 DEBUG ((EFI_D_ERROR
, "PciHostBridge: Resource conflict happens!\n"));
79 Descriptor
= (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*) Configuration
;
80 while (Descriptor
->Desc
== ACPI_ADDRESS_SPACE_DESCRIPTOR
) {
81 DEBUG ((EFI_D_ERROR
, "RootBridge[%d]:\n", RootBridgeIndex
++));
82 for (; Descriptor
->Desc
== ACPI_ADDRESS_SPACE_DESCRIPTOR
; Descriptor
++) {
83 ASSERT (Descriptor
->ResType
<
84 (sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr
) /
85 sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr
[0])
88 DEBUG ((EFI_D_ERROR
, " %s: Length/Alignment = 0x%lx / 0x%lx\n",
89 mPciHostBridgeLibAcpiAddressSpaceTypeStr
[Descriptor
->ResType
],
90 Descriptor
->AddrLen
, Descriptor
->AddrRangeMax
92 if (Descriptor
->ResType
== ACPI_ADDRESS_SPACE_TYPE_MEM
) {
93 DEBUG ((EFI_D_ERROR
, " Granularity/SpecificFlag = %ld / %02x%s\n",
94 Descriptor
->AddrSpaceGranularity
, Descriptor
->SpecificFlag
,
95 ((Descriptor
->SpecificFlag
&
96 EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE
97 ) != 0) ? L
" (Prefetchable)" : L
""
102 // Skip the END descriptor for root bridge
104 ASSERT (Descriptor
->Desc
== ACPI_END_TAG_DESCRIPTOR
);
105 Descriptor
= (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*)(
106 (EFI_ACPI_END_TAG_DESCRIPTOR
*)Descriptor
+ 1