]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/PciSegmentInfoLib.h
MdePkg/PciSegmentInfoLib: Add PciSegmentInfoLib class and instance.
[mirror_edk2.git] / MdePkg / Include / Library / PciSegmentInfoLib.h
diff --git a/MdePkg/Include/Library/PciSegmentInfoLib.h b/MdePkg/Include/Library/PciSegmentInfoLib.h
new file mode 100644 (file)
index 0000000..588269a
--- /dev/null
@@ -0,0 +1,41 @@
+/** @file\r
+  Provides services to return segment information on a platform with multiple PCI segments.\r
+\r
+  This library is consumed by PciSegmentLib to support multiple segment PCI configuration access.\r
+\r
+  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full 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
+\r
+#ifndef __PCI_SEGMENT_INFO_LIB__\r
+#define __PCI_SEGMENT_INFO_LIB__\r
+\r
+typedef struct {\r
+  UINT16               SegmentNumber;   ///< Segment number.\r
+  UINT64               BaseAddress;     ///< ECAM Base address.\r
+  UINT8                StartBusNumber;  ///< Start BUS number, for verifying the PCI Segment address.\r
+  UINT8                EndBusNumber;    ///< End BUS number, for verifying the PCI Segment address.\r
+} PCI_SEGMENT_INFO;\r
+\r
+/**\r
+  Return an array of PCI_SEGMENT_INFO holding the segment information.\r
+\r
+  Note: The returned array/buffer is owned by callee.\r
+\r
+  @param  Count  Return the count of segments.\r
+\r
+  @retval A callee owned array holding the segment information.\r
+**/\r
+PCI_SEGMENT_INFO *\r
+GetPciSegmentInfo (\r
+  UINTN  *Count\r
+  );\r
+\r
+#endif\r