]>
Commit | Line | Data |
---|---|---|
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 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
8 | **/\r | |
9 | \r | |
10 | #ifndef __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__\r | |
11 | #define __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__\r | |
12 | \r | |
13 | #include <Library/DebugLib.h>\r | |
14 | \r | |
15 | #include <Library/PciCapPciSegmentLib.h>\r | |
16 | \r | |
17 | #define SEGMENT_DEV_SIG SIGNATURE_64 ('P', 'C', 'P', 'S', 'G', 'M', 'N', 'T')\r | |
18 | \r | |
19 | typedef struct {\r | |
20 | //\r | |
21 | // Signature identifying the derived class.\r | |
22 | //\r | |
23 | UINT64 Signature;\r | |
24 | //\r | |
25 | // Members added by the derived class, specific to the use of PciSegmentLib.\r | |
26 | //\r | |
27 | PCI_CAP_DOMAIN MaxDomain;\r | |
28 | UINT16 SegmentNr;\r | |
29 | UINT8 BusNr;\r | |
30 | UINT8 DeviceNr;\r | |
31 | UINT8 FunctionNr;\r | |
32 | //\r | |
33 | // Base class.\r | |
34 | //\r | |
35 | PCI_CAP_DEV BaseDevice;\r | |
36 | } SEGMENT_DEV;\r | |
37 | \r | |
38 | #define SEGMENT_DEV_FROM_PCI_CAP_DEV(PciDevice) \\r | |
39 | CR (PciDevice, SEGMENT_DEV, BaseDevice, SEGMENT_DEV_SIG)\r | |
40 | \r | |
41 | #endif // __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__\r |