]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / PciSegmentLibSegmentInfo / PciSegmentLibCommon.h
CommitLineData
5c9bb86f
RN
1/** @file\r
2 Provide common routines used by BasePciSegmentLibSegmentInfo and\r
3 DxeRuntimePciSegmentLibSegmentInfo libraries.\r
4\r
5 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
9344f092 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
5c9bb86f
RN
7\r
8**/\r
9\r
10#ifndef _PCI_SEGMENT_LIB_COMMON_H_\r
11#define _PCI_SEGMENT_LIB_COMMON_H_\r
12\r
13#include <Base.h>\r
14#include <IndustryStandard/PciExpress21.h>\r
15#include <Library/BaseLib.h>\r
16#include <Library/DebugLib.h>\r
17#include <Library/IoLib.h>\r
18#include <Library/PciSegmentLib.h>\r
19#include <Library/PciSegmentInfoLib.h>\r
20\r
21/**\r
22 Return the linear address for the physical address.\r
23\r
24 @param Address The physical address.\r
25\r
26 @retval The linear address.\r
27**/\r
28UINTN\r
29PciSegmentLibVirtualAddress (\r
2f88bd3a 30 IN UINTN Address\r
5c9bb86f
RN
31 );\r
32\r
33/**\r
34 Internal function that converts PciSegmentLib format address that encodes the PCI Bus, Device,\r
35 Function and Register to ECAM (Enhanced Configuration Access Mechanism) address.\r
36\r
37 @param Address The address that encodes the PCI Bus, Device, Function and\r
38 Register.\r
39 @param SegmentInfo An array of PCI_SEGMENT_INFO holding the segment information.\r
40 @param Count Number of segments.\r
41\r
42 @retval ECAM address.\r
43**/\r
44UINTN\r
45PciSegmentLibGetEcamAddress (\r
2f88bd3a
MK
46 IN UINT64 Address,\r
47 IN CONST PCI_SEGMENT_INFO *SegmentInfo,\r
48 IN UINTN Count\r
5c9bb86f
RN
49 );\r
50\r
51#endif\r