2 Provide common routines used by BasePciSegmentLibSegmentInfo and
3 DxeRuntimePciSegmentLibSegmentInfo libraries.
5 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef _PCI_SEGMENT_LIB_COMMON_H_
11 #define _PCI_SEGMENT_LIB_COMMON_H_
14 #include <IndustryStandard/PciExpress21.h>
15 #include <Library/BaseLib.h>
16 #include <Library/DebugLib.h>
17 #include <Library/IoLib.h>
18 #include <Library/PciSegmentLib.h>
19 #include <Library/PciSegmentInfoLib.h>
22 Return the linear address for the physical address.
24 @param Address The physical address.
26 @retval The linear address.
29 PciSegmentLibVirtualAddress (
34 Internal function that converts PciSegmentLib format address that encodes the PCI Bus, Device,
35 Function and Register to ECAM (Enhanced Configuration Access Mechanism) address.
37 @param Address The address that encodes the PCI Bus, Device, Function and
39 @param SegmentInfo An array of PCI_SEGMENT_INFO holding the segment information.
40 @param Count Number of segments.
45 PciSegmentLibGetEcamAddress (
47 IN CONST PCI_SEGMENT_INFO
*SegmentInfo
,