]>
Commit | Line | Data |
---|---|---|
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 | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef _PCI_SEGMENT_LIB_COMMON_H_\r | |
17 | #define _PCI_SEGMENT_LIB_COMMON_H_\r | |
18 | \r | |
19 | #include <Base.h>\r | |
20 | #include <IndustryStandard/PciExpress21.h>\r | |
21 | #include <Library/BaseLib.h>\r | |
22 | #include <Library/DebugLib.h>\r | |
23 | #include <Library/IoLib.h>\r | |
24 | #include <Library/PciSegmentLib.h>\r | |
25 | #include <Library/PciSegmentInfoLib.h>\r | |
26 | \r | |
27 | /**\r | |
28 | Return the linear address for the physical address.\r | |
29 | \r | |
30 | @param Address The physical address.\r | |
31 | \r | |
32 | @retval The linear address.\r | |
33 | **/\r | |
34 | UINTN\r | |
35 | PciSegmentLibVirtualAddress (\r | |
36 | IN UINTN Address\r | |
37 | );\r | |
38 | \r | |
39 | /**\r | |
40 | Internal function that converts PciSegmentLib format address that encodes the PCI Bus, Device,\r | |
41 | Function and Register to ECAM (Enhanced Configuration Access Mechanism) address.\r | |
42 | \r | |
43 | @param Address The address that encodes the PCI Bus, Device, Function and\r | |
44 | Register.\r | |
45 | @param SegmentInfo An array of PCI_SEGMENT_INFO holding the segment information.\r | |
46 | @param Count Number of segments.\r | |
47 | \r | |
48 | @retval ECAM address.\r | |
49 | **/\r | |
50 | UINTN\r | |
51 | PciSegmentLibGetEcamAddress (\r | |
52 | IN UINT64 Address,\r | |
53 | IN CONST PCI_SEGMENT_INFO *SegmentInfo,\r | |
54 | IN UINTN Count\r | |
55 | );\r | |
56 | \r | |
57 | #endif\r |