Last change
on this file was 99404, checked in by vboxsync, 2 years ago |
Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643
|
-
Property svn:eol-style
set to
native
|
File size:
1.3 KB
|
Line | |
---|
1 | /** @file
|
---|
2 | Work with PCI capabilities in PCI config space -- internal type definitions.
|
---|
3 |
|
---|
4 | Copyright (C) 2018, Red Hat, Inc.
|
---|
5 |
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 | **/
|
---|
8 |
|
---|
9 | #ifndef __BASE_PCI_CAP_LIB_H__
|
---|
10 | #define __BASE_PCI_CAP_LIB_H__
|
---|
11 |
|
---|
12 | #include <Library/OrderedCollectionLib.h>
|
---|
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 | //
|
---|
20 | typedef struct {
|
---|
21 | PCI_CAP_DOMAIN Domain;
|
---|
22 | UINT16 CapId;
|
---|
23 | UINT16 Instance;
|
---|
24 | } PCI_CAP_KEY;
|
---|
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 | //
|
---|
31 | typedef union {
|
---|
32 | UINT16 NumInstances;
|
---|
33 | PCI_CAP *InstanceZero;
|
---|
34 | } PCI_CAP_NUM_INSTANCES;
|
---|
35 |
|
---|
36 | //
|
---|
37 | // Complete the incomplete PCI_CAP structure here.
|
---|
38 | //
|
---|
39 | struct 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 | //
|
---|
50 | struct PCI_CAP_LIST {
|
---|
51 | ORDERED_COLLECTION *Capabilities;
|
---|
52 | };
|
---|
53 |
|
---|
54 | #endif // __BASE_PCI_CAP_LIB_H__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.