2 Work with PCI capabilities in PCI config space -- internal type definitions.
4 Copyright (C) 2018, Red Hat, Inc.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef __BASE_PCI_CAP_LIB_H__
10 #define __BASE_PCI_CAP_LIB_H__
12 #include <Library/OrderedCollectionLib.h>
14 #include <Library/PciCapLib.h>
17 // Structure that uniquely identifies a capability instance and serves as key
18 // for insertion and lookup.
21 PCI_CAP_DOMAIN Domain
;
27 // In Instance==0 PCI_CAP objects, store NumInstances directly. In Instance>0
28 // PCI_CAP objects, link Instance#0 of the same (Domain, CapId). This way
29 // NumInstances needs maintenance in one object only, per (Domain, CapId) pair.
33 PCI_CAP
*InstanceZero
;
34 } PCI_CAP_NUM_INSTANCES
;
37 // Complete the incomplete PCI_CAP structure here.
41 PCI_CAP_NUM_INSTANCES NumInstancesUnion
;
48 // Complete the incomplete PCI_CAP_LIST structure here.
51 ORDERED_COLLECTION
*Capabilities
;
54 #endif // __BASE_PCI_CAP_LIB_H__