summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/PciIncompatibleDeviceSupportLib/IncompatiblePciDeviceList.h
blob: 629c5f546950abbb018c1ddb10f723f427831cf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/** @file
  The incompatible PCI device list

Copyright (c) 2006 - 2007, Intel Corporation                                                         
All rights reserved. This program and the accompanying materials                          
are licensed and made available under the terms and conditions of the BSD License         
which accompanies this distribution.  The full text of the license may be found at        
http://opensource.org/licenses/bsd-license.php                                            
                                                                                          
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.  

**/

#ifndef _EFI_INCOMPATIBLE_PCI_DEVICE_LIST_H
#define _EFI_INCOMPATIBLE_PCI_DEVICE_LIST_H

#include <Library/PciIncompatibleDeviceSupportLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>

#include <IndustryStandard/Pci22.h>
#include <IndustryStandard/Acpi.h>


#define PCI_DEVICE_ID(VendorId, DeviceId, Revision, SubVendorId, SubDeviceId) \
    VendorId, DeviceId, Revision, SubVendorId, SubDeviceId

#define PCI_BAR_TYPE_IO   ACPI_ADDRESS_SPACE_TYPE_IO
#define PCI_BAR_TYPE_MEM  ACPI_ADDRESS_SPACE_TYPE_MEM

#define DEVICE_INF_TAG    0xFFF2
#define DEVICE_RES_TAG    0xFFF1
#define LIST_END_TAG      0x0000

//
// descriptor for access width of incompatible PCI device
//
typedef struct {
  UINT64                         AccessType;
  UINT64                         AccessWidth;
  EFI_PCI_REGISTER_ACCESS_DATA   PciRegisterAccessData;
} EFI_PCI_REGISTER_ACCESS_DESCRIPTOR;

//
// descriptor for register value of incompatible PCI device
//
typedef struct {
  UINT64                         AccessType;
  UINT64                         Offset;
  EFI_PCI_REGISTER_VALUE_DATA    PciRegisterValueData;
} EFI_PCI_REGISTER_VALUE_DESCRIPTOR;


//
// the incompatible PCI devices list for ACPI resource
//
GLOBAL_REMOVE_IF_UNREFERENCED UINT64 IncompatiblePciDeviceListForResource[] = {
  //
  // DEVICE_INF_TAG,
  // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId),
  // DEVICE_RES_TAG,
  // ResType,  GFlag , SFlag,   Granularity,  RangeMin,
  // RangeMax, Offset, AddrLen
  //
  //
  // Device Adaptec 9004
  //
  DEVICE_INF_TAG,
  PCI_DEVICE_ID(0x9004, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
  DEVICE_RES_TAG,
  PCI_BAR_TYPE_IO,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_BAR_EVEN_ALIGN,
  PCI_BAR_ALL,
  PCI_BAR_NOCHANGE,
  //
  // Device Adaptec 9005
  //
  DEVICE_INF_TAG,
  PCI_DEVICE_ID(0x9005, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
  DEVICE_RES_TAG,
  PCI_BAR_TYPE_IO,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_BAR_EVEN_ALIGN,
  PCI_BAR_ALL,
  PCI_BAR_NOCHANGE,
  //
  // Device QLogic  1007
  //
  DEVICE_INF_TAG,
  PCI_DEVICE_ID(0x1077, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
  DEVICE_RES_TAG,
  PCI_BAR_TYPE_IO,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_BAR_EVEN_ALIGN,
  PCI_BAR_ALL,
  PCI_BAR_NOCHANGE,
  //
  // Device Agilent 103C
  //
  DEVICE_INF_TAG,
  PCI_DEVICE_ID(0x103C, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
  DEVICE_RES_TAG,
  PCI_BAR_TYPE_IO,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_BAR_EVEN_ALIGN,
  PCI_BAR_ALL,
  PCI_BAR_NOCHANGE,
  //
  // Device Agilent 15BC
  //
  DEVICE_INF_TAG,
  PCI_DEVICE_ID(0x15BC, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
  DEVICE_RES_TAG,
  PCI_BAR_TYPE_IO,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_ACPI_UNUSED,
  PCI_BAR_EVEN_ALIGN,
  PCI_BAR_ALL,
  PCI_BAR_NOCHANGE,
  //
  // The end of the list
  //
  LIST_END_TAG
};

//
// the incompatible PCI devices list for the values of configuration registers
//
GLOBAL_REMOVE_IF_UNREFERENCED UINT64 IncompatiblePciDeviceListForRegister[] = {
  //
  // DEVICE_INF_TAG,
  // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId),
  // PCI_RES_TAG,
  // PCI_ACCESS_TYPE, PCI_CONFIG_ADDRESS,
  // AND_VALUE, OR_VALUE

  //
  // Device Lava 0x1407, DeviceId 0x0110
  //
  DEVICE_INF_TAG,
  PCI_DEVICE_ID(0x1407, 0x0110, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
  DEVICE_RES_TAG,
  PCI_REGISTER_READ,
  PCI_CAPBILITY_POINTER_OFFSET,
  0xffffff00,
  VALUE_NOCARE,

  //
  // Device Lava 0x1407, DeviceId 0x0111
  //
  DEVICE_INF_TAG,
  PCI_DEVICE_ID(0x1407, 0x0111, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
  DEVICE_RES_TAG,
  PCI_REGISTER_READ,
  PCI_CAPBILITY_POINTER_OFFSET,
  0xffffff00,
  VALUE_NOCARE,

  //
  // The end of the list
  //
  LIST_END_TAG
};

//
// the incompatible PCI devices list for the access width of configuration registers
//
GLOBAL_REMOVE_IF_UNREFERENCED UINT64 DeviceListForAccessWidth[] = {
  //
  // DEVICE_INF_TAG,
  // PCI_DEVICE_ID (VendorID, DeviceID, Revision, SubVendorId, SubDeviceId),
  // DEVICE_RES_TAG,
  // PCI_ACCESS_TYPE, PCI_ACCESS_WIDTH,
  // START_ADDRESS, END_ADDRESS,
  // ACTUAL_PCI_ACCESS_WIDTH,
  //

  //
  // Sample Device
  //
  //DEVICE_INF_TAG,
  //PCI_DEVICE_ID(0xXXXX, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE, DEVICE_ID_NOCARE),
  //DEVICE_RES_TAG,
  //PCI_REGISTER_READ,
  //EfiPciWidthUint8,
  //0,
  //0xFF,
  //EfiPciWidthUint32,
  //

  //
  // The end of the list
  //
  LIST_END_TAG
};

#endif