TianoCore EDK2 master
Loading...
Searching...
No Matches
BasePciCapLib.h
Go to the documentation of this file.
1
9#ifndef __BASE_PCI_CAP_LIB_H__
10#define __BASE_PCI_CAP_LIB_H__
11
13
14#include <Library/PciCapLib.h>
15
16//
17// Structure that uniquely identifies a capability instance and serves as key
18// for insertion and lookup.
19//
20typedef struct {
21 PCI_CAP_DOMAIN Domain;
22 UINT16 CapId;
23 UINT16 Instance;
25
26//
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.
30//
31typedef union {
32 UINT16 NumInstances;
33 PCI_CAP *InstanceZero;
35
36//
37// Complete the incomplete PCI_CAP structure here.
38//
39struct PCI_CAP {
40 PCI_CAP_KEY Key;
41 PCI_CAP_NUM_INSTANCES NumInstancesUnion;
42 UINT16 Offset;
43 UINT16 MaxSizeHint;
44 UINT8 Version;
45};
46
47//
48// Complete the incomplete PCI_CAP_LIST structure here.
49//
51 ORDERED_COLLECTION *Capabilities;
52};
53
54#endif // __BASE_PCI_CAP_LIB_H__