]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/IncompatiblePciDeviceList.h
53609c0bfcb27e5715ec50cd51a9da5a2c2c09ef
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / PciIncompatibleDeviceSupportLib / IncompatiblePciDeviceList.h
1 /** @file
2 The incompatible PCI device list template.
3
4 Copyright (c) 2006 - 2009, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _EFI_INCOMPATIBLE_PCI_DEVICE_LIST_H
16 #define _EFI_INCOMPATIBLE_PCI_DEVICE_LIST_H
17
18 #include <Library/PciIncompatibleDeviceSupportLib.h>
19 #include <Library/MemoryAllocationLib.h>
20 #include <Library/DebugLib.h>
21
22 #include <IndustryStandard/Pci.h>
23 #include <IndustryStandard/Acpi.h>
24
25
26 #define PCI_DEVICE_ID(VendorId, DeviceId, Revision, SubVendorId, SubDeviceId) \
27 VendorId, DeviceId, Revision, SubVendorId, SubDeviceId
28
29 #define PCI_BAR_TYPE_IO ACPI_ADDRESS_SPACE_TYPE_IO
30 #define PCI_BAR_TYPE_MEM ACPI_ADDRESS_SPACE_TYPE_MEM
31
32 #define DEVICE_INF_TAG 0xFFF2
33 #define DEVICE_RES_TAG 0xFFF1
34 #define LIST_END_TAG 0x0000
35
36 //
37 // descriptor for access width of incompatible PCI device
38 //
39 typedef struct {
40 UINT64 AccessType;
41 UINT64 AccessWidth;
42 EFI_PCI_REGISTER_ACCESS_DATA PciRegisterAccessData;
43 } EFI_PCI_REGISTER_ACCESS_DESCRIPTOR;
44
45 //
46 // descriptor for register value of incompatible PCI device
47 //
48 typedef struct {
49 UINT64 AccessType;
50 UINT64 Offset;
51 EFI_PCI_REGISTER_VALUE_DATA PciRegisterValueData;
52 } EFI_PCI_REGISTER_VALUE_DESCRIPTOR;
53
54 //
55 // the incompatible PCI devices list for ACPI resource
56 //
57 GLOBAL_REMOVE_IF_UNREFERENCED UINT64 gIncompatiblePciDeviceListForResource[] = {
58 //
59 // DEVICE_INF_TAG,
60 // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId),
61 // DEVICE_RES_TAG,
62 // ResType, GFlag , SFlag, Granularity, RangeMin,
63 // RangeMax, Offset, AddrLen
64 //
65
66 //
67 // Sample Device 1
68 //
69 //DEVICE_INF_TAG,
70 //PCI_DEVICE_ID(0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
71 //DEVICE_RES_TAG,
72 //PCI_BAR_TYPE_IO,
73 //PCI_ACPI_UNUSED,
74 //PCI_ACPI_UNUSED,
75 //PCI_ACPI_UNUSED,
76 //PCI_ACPI_UNUSED,
77 //PCI_BAR_EVEN_ALIGN,
78 //PCI_BAR_ALL,
79 //PCI_BAR_NOCHANGE,
80
81 //
82 // Sample Device 2
83 //
84 //DEVICE_INF_TAG,
85 //PCI_DEVICE_ID(0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
86 //DEVICE_RES_TAG,
87 //PCI_BAR_TYPE_IO,
88 //PCI_ACPI_UNUSED,
89 //PCI_ACPI_UNUSED,
90 //PCI_ACPI_UNUSED,
91 //PCI_ACPI_UNUSED,
92 //PCI_BAR_EVEN_ALIGN,
93 //PCI_BAR_ALL,
94 //PCI_BAR_NOCHANGE,
95
96 //
97 // The end of the list
98 //
99 LIST_END_TAG
100 };
101
102 //
103 // the incompatible PCI devices list for the values of configuration registers
104 //
105 GLOBAL_REMOVE_IF_UNREFERENCED UINT64 gIncompatiblePciDeviceListForRegister[] = {
106 //
107 // DEVICE_INF_TAG,
108 // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId),
109 // PCI_RES_TAG,
110 // PCI_ACCESS_TYPE, PCI_CONFIG_ADDRESS,
111 // AND_VALUE, OR_VALUE
112
113 //
114 // Sample Device 1
115 //
116 //DEVICE_INF_TAG,
117 //PCI_DEVICE_ID(0xXXXX, 0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
118 //DEVICE_RES_TAG,
119 //PCI_REGISTER_READ,
120 //PCI_CAPBILITY_POINTER_OFFSET,
121 //0xffffff00,
122 //VALUE_NOCARE,
123
124 //
125 // Sample Device 2
126 //
127 //DEVICE_INF_TAG,
128 //PCI_DEVICE_ID(0xXXXX, 0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
129 //DEVICE_RES_TAG,
130 //PCI_REGISTER_READ,
131 //PCI_CAPBILITY_POINTER_OFFSET,
132 //0xffffff00,
133 //VALUE_NOCARE,
134
135 //
136 // The end of the list
137 //
138 LIST_END_TAG
139 };
140
141 //
142 // the incompatible PCI devices list for the access width of configuration registers
143 //
144 GLOBAL_REMOVE_IF_UNREFERENCED UINT64 gDeviceListForAccessWidth[] = {
145 //
146 // DEVICE_INF_TAG,
147 // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId),
148 // DEVICE_RES_TAG,
149 // PCI_ACCESS_TYPE, PCI_ACCESS_WIDTH,
150 // START_ADDRESS, END_ADDRESS,
151 // ACTUAL_PCI_ACCESS_WIDTH,
152 //
153
154 //
155 // Sample Device
156 //
157 //DEVICE_INF_TAG,
158 //PCI_DEVICE_ID(0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
159 //DEVICE_RES_TAG,
160 //PCI_REGISTER_READ,
161 //EfiPciWidthUint8,
162 //0,
163 //0xFF,
164 //EfiPciWidthUint32,
165 //
166
167 //
168 // The end of the list
169 //
170 LIST_END_TAG
171 };
172
173 #endif