2 Provide common routines used by BasePciSegmentLibSegmentInfo and
3 DxeRuntimePciSegmentLibSegmentInfo libraries.
5 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _PCI_SEGMENT_LIB_COMMON_H_
17 #define _PCI_SEGMENT_LIB_COMMON_H_
20 #include <IndustryStandard/PciExpress21.h>
21 #include <Library/BaseLib.h>
22 #include <Library/DebugLib.h>
23 #include <Library/IoLib.h>
24 #include <Library/PciSegmentLib.h>
25 #include <Library/PciSegmentInfoLib.h>
28 Return the linear address for the physical address.
30 @param Address The physical address.
32 @retval The linear address.
35 PciSegmentLibVirtualAddress (
40 Internal function that converts PciSegmentLib format address that encodes the PCI Bus, Device,
41 Function and Register to ECAM (Enhanced Configuration Access Mechanism) address.
43 @param Address The address that encodes the PCI Bus, Device, Function and
45 @param SegmentInfo An array of PCI_SEGMENT_INFO holding the segment information.
46 @param Count Number of segments.
51 PciSegmentLibGetEcamAddress (
53 IN CONST PCI_SEGMENT_INFO
*SegmentInfo
,