]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapPciSegmentLib.h
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / Library / BasePciCapPciSegmentLib / BasePciCapPciSegmentLib.h
1 /** @file
2 Plug a PciSegmentLib backend into PciCapLib, for config space access --
3 internal macro and type definitions.
4
5 Copyright (C) 2018, Red Hat, Inc.
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8 **/
9
10 #ifndef __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__
11 #define __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__
12
13 #include <Library/DebugLib.h>
14
15 #include <Library/PciCapPciSegmentLib.h>
16
17 #define SEGMENT_DEV_SIG SIGNATURE_64 ('P', 'C', 'P', 'S', 'G', 'M', 'N', 'T')
18
19 typedef struct {
20 //
21 // Signature identifying the derived class.
22 //
23 UINT64 Signature;
24 //
25 // Members added by the derived class, specific to the use of PciSegmentLib.
26 //
27 PCI_CAP_DOMAIN MaxDomain;
28 UINT16 SegmentNr;
29 UINT8 BusNr;
30 UINT8 DeviceNr;
31 UINT8 FunctionNr;
32 //
33 // Base class.
34 //
35 PCI_CAP_DEV BaseDevice;
36 } SEGMENT_DEV;
37
38 #define SEGMENT_DEV_FROM_PCI_CAP_DEV(PciDevice) \
39 CR (PciDevice, SEGMENT_DEV, BaseDevice, SEGMENT_DEV_SIG)
40
41 #endif // __BASE_PCI_CAP_PCI_SEGMENT_LIB_H__