--- /dev/null
+/** @file\r
+ PCI Host Bridge Library consumed by PciHostBridgeDxe driver returning\r
+ the platform specific information about the PCI Host Bridge.\r
+\r
+ Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are\r
+ licensed and made available under the terms and conditions of\r
+ the BSD License which accompanies this distribution. The full\r
+ text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+#ifndef __PCI_HOST_BRIDGE_LIB_H__\r
+#define __PCI_HOST_BRIDGE_LIB_H__\r
+\r
+//\r
+// (Base > Limit) indicates an aperture is not available.\r
+//\r
+typedef struct {\r
+ UINT64 Base;\r
+ UINT64 Limit;\r
+} PCI_ROOT_BRIDGE_APERTURE;\r
+\r
+typedef struct {\r
+ UINT32 Segment; ///< Segment number.\r
+ UINT64 Supports; ///< Supported attributes.\r
+ ///< Refer to EFI_PCI_ATTRIBUTE_xxx used by GetAttributes()\r
+ ///< and SetAttributes() in EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+ UINT64 Attributes; ///< Initial attributes.\r
+ ///< Refer to EFI_PCI_ATTRIBUTE_xxx used by GetAttributes()\r
+ ///< and SetAttributes() in EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+ BOOLEAN DmaAbove4G; ///< DMA above 4GB memory.\r
+ ///< Set to TRUE when root bridge supports DMA above 4GB memory.\r
+ UINT64 AllocationAttributes; ///< Allocation attributes.\r
+ ///< Refer to EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM and\r
+ ///< EFI_PCI_HOST_BRIDGE_MEM64_DECODE used by GetAllocAttributes()\r
+ ///< in EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
+ PCI_ROOT_BRIDGE_APERTURE Bus; ///< Bus aperture which can be used by the root bridge.\r
+ PCI_ROOT_BRIDGE_APERTURE Io; ///< IO aperture which can be used by the root bridge.\r
+ PCI_ROOT_BRIDGE_APERTURE Mem; ///< MMIO aperture below 4GB which can be used by the root bridge.\r
+ PCI_ROOT_BRIDGE_APERTURE MemAbove4G; ///< MMIO aperture above 4GB which can be used by the root bridge.\r
+ PCI_ROOT_BRIDGE_APERTURE PMem; ///< Prefetchable MMIO aperture below 4GB which can be used by the root bridge.\r
+ PCI_ROOT_BRIDGE_APERTURE PMemAbove4G; ///< Prefetchable MMIO aperture above 4GB which can be used by the root bridge.\r
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath; ///< Device path.\r
+} PCI_ROOT_BRIDGE;\r
+\r
+/**\r
+ Return all the root bridge instances in an array.\r
+\r
+ @param Count Return the count of root bridge instances.\r
+\r
+ @return All the root bridge instances in an array.\r
+ The array should be passed into PciHostBridgeFreeRootBridges()\r
+ when it's not used.\r
+**/\r
+PCI_ROOT_BRIDGE *\r
+EFIAPI\r
+PciHostBridgeGetRootBridges (\r
+ UINTN *Count\r
+ );\r
+\r
+/**\r
+ Free the root bridge instances array returned from PciHostBridgeGetRootBridges().\r
+\r
+ @param The root bridge instances array.\r
+ @param The count of the array.\r
+**/\r
+VOID\r
+EFIAPI\r
+PciHostBridgeFreeRootBridges (\r
+ PCI_ROOT_BRIDGE *Bridges,\r
+ UINTN Count\r
+ );\r
+\r
+/**\r
+ Inform the platform that the resource conflict happens.\r
+\r
+ @param HostBridgeHandle Handle of the Host Bridge.\r
+ @param Configuration Pointer to PCI I/O and PCI memory resource descriptors.\r
+ The Configuration contains the resources for all the\r
+ root bridges. The resource for each root bridge is\r
+ terminated with END descriptor and an additional END\r
+ is appended indicating the end of the entire resources.\r
+ The resource descriptor field values follow the description\r
+ in EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.SubmitResources().\r
+**/\r
+VOID\r
+EFIAPI\r
+PciHostBridgeResourceConflict (\r
+ EFI_HANDLE HostBridgeHandle,\r
+ VOID *Configuration\r
+ );\r
+\r
+#endif\r
# It also provides the definitions(including PPIs/PROTOCOLs/GUIDs and library classes)\r
# and libraries instances, which are used for those modules.\r
#\r
-# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials are licensed and made available under\r
# the terms and conditions of the BSD License that accompanies this distribution.\r
# The full text of the license may be found at\r
#\r
IpmiLib|Include/Library/IpmiLib.h\r
\r
+ ## @libraryclass Provides interfaces for platform to return root bridge information to PciHostBridgeDxe driver.\r
+ #\r
+ PciHostBridgeLib|Include/Library/PciHostBridgeLib.h\r
+\r
[Guids]\r
## MdeModule package token space guid\r
# Include/Guid/MdeModulePkgTokenSpace.h\r