]>
Commit | Line | Data |
---|---|---|
6a744d40 LE |
1 | /** @file\r |
2 | Plug a PciSegmentLib backend into PciCapLib, for config space access --\r | |
3 | internal macro and type definitions.\r | |
4 | \r | |
5 | Copyright (C) 2018, Red Hat, Inc.\r | |
6 | \r | |
7 | This program and the accompanying materials are licensed and made available\r | |
8 | under the terms and conditions of the BSD License which accompanies this\r | |
9 | distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r | |
13 | WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__\r | |
17 | #define __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__\r | |
18 | \r | |
19 | #include <Library/DebugLib.h>\r | |
20 | \r | |
21 | #include <Library/PciCapPciSegmentLib.h>\r | |
22 | \r | |
23 | #define SEGMENT_DEV_SIG SIGNATURE_64 ('P', 'C', 'P', 'S', 'G', 'M', 'N', 'T')\r | |
24 | \r | |
25 | typedef struct {\r | |
26 | //\r | |
27 | // Signature identifying the derived class.\r | |
28 | //\r | |
29 | UINT64 Signature;\r | |
30 | //\r | |
31 | // Members added by the derived class, specific to the use of PciSegmentLib.\r | |
32 | //\r | |
33 | PCI_CAP_DOMAIN MaxDomain;\r | |
34 | UINT16 SegmentNr;\r | |
35 | UINT8 BusNr;\r | |
36 | UINT8 DeviceNr;\r | |
37 | UINT8 FunctionNr;\r | |
38 | //\r | |
39 | // Base class.\r | |
40 | //\r | |
41 | PCI_CAP_DEV BaseDevice;\r | |
42 | } SEGMENT_DEV;\r | |
43 | \r | |
44 | #define SEGMENT_DEV_FROM_PCI_CAP_DEV(PciDevice) \\r | |
45 | CR (PciDevice, SEGMENT_DEV, BaseDevice, SEGMENT_DEV_SIG)\r | |
46 | \r | |
47 | #endif // __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__\r |