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