2 Work with PCI capabilities in PCI config space -- internal type definitions.
4 Copyright (C) 2018, Red Hat, Inc.
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
12 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __BASE_PCI_CAP_LIB_H__
16 #define __BASE_PCI_CAP_LIB_H__
18 #include <Library/OrderedCollectionLib.h>
20 #include <Library/PciCapLib.h>
23 // Structure that uniquely identifies a capability instance and serves as key
24 // for insertion and lookup.
27 PCI_CAP_DOMAIN Domain
;
33 // In Instance==0 PCI_CAP objects, store NumInstances directly. In Instance>0
34 // PCI_CAP objects, link Instance#0 of the same (Domain, CapId). This way
35 // NumInstances needs maintenance in one object only, per (Domain, CapId) pair.
39 PCI_CAP
*InstanceZero
;
40 } PCI_CAP_NUM_INSTANCES
;
43 // Complete the incomplete PCI_CAP structure here.
47 PCI_CAP_NUM_INSTANCES NumInstancesUnion
;
54 // Complete the incomplete PCI_CAP_LIST structure here.
57 ORDERED_COLLECTION
*Capabilities
;
60 #endif // __BASE_PCI_CAP_LIB_H__