88 #define PCI_HEADER_TYPE 0x0e
89 #define PCI_HEADER_TYPE_NORMAL 0
90 #define PCI_HEADER_TYPE_BRIDGE 1
91 #define PCI_HEADER_TYPE_CARDBUS 2
93 #define PCI_SR_CAP_LIST_BIT 0x00000010
111 #define PCI_CAP_LIST_ID 0
112 #define PCI_CAP_ID_PM 0x01
113 #define PCI_CAP_ID_AGP 0x02
114 #define PCI_CAP_ID_VPD 0x03
115 #define PCI_CAP_ID_SLOTID 0x04
116 #define PCI_CAP_ID_MSI 0x05
117 #define PCI_CAP_ID_CHSWP 0x06
118 #define PCI_CAP_ID_PCIX 0x07
119 #define PCI_CAP_ID_HT 0x08
120 #define PCI_CAP_ID_VNDR 0x09
121 #define PCI_CAP_ID_DBG 0x0A
122 #define PCI_CAP_ID_CCRC 0x0B
123 #define PCI_CAP_ID_SHPC 0x0C
124 #define PCI_CAP_ID_SSVID 0x0D
125 #define PCI_CAP_ID_AGP3 0x0E
126 #define PCI_CAP_ID_SECDEV 0x0F
127 #define PCI_CAP_ID_EXP 0x10
128 #define PCI_CAP_ID_MSIX 0x11
129 #define PCI_CAP_ID_SATA 0x12
130 #define PCI_CAP_ID_AF 0x13
131 #define PCI_CAP_LIST_NEXT 1
134 #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff)
135 #define PCI_EXT_CAP_VER(header) ((header >> 16) & 0xf)
136 #define PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc)
138 #define PCI_EXT_CAP_ID_ERR 0x0001
139 #define PCI_EXT_CAP_ID_VC 0x0002
140 #define PCI_EXT_CAP_ID_DSN 0x0003
141 #define PCI_EXT_CAP_ID_PWR 0x0004
142 #define PCI_EXT_CAP_ID_RCLD 0x0005
143 #define PCI_EXT_CAP_ID_RCILC 0x0006
144 #define PCI_EXT_CAP_ID_RCEC 0x0007
145 #define PCI_EXT_CAP_ID_MFVC 0x0008
146 #define PCI_EXT_CAP_ID_VC9 0x0009
147 #define PCI_EXT_CAP_ID_RCRB 0x000A
148 #define PCI_EXT_CAP_ID_VNDR 0x000B
149 #define PCI_EXT_CAP_ID_CAC 0x000C
150 #define PCI_EXT_CAP_ID_ACS 0x000D
151 #define PCI_EXT_CAP_ID_ARI 0x000E
152 #define PCI_EXT_CAP_ID_ATS 0x000F
153 #define PCI_EXT_CAP_ID_SRIOV 0x0010
154 #define PCI_EXT_CAP_ID_MRIOV 0x0011
155 #define PCI_EXT_CAP_ID_MCAST 0x0012
156 #define PCI_EXT_CAP_ID_PRI 0x0013
157 #define PCI_EXT_CAP_ID_AMD_XXX 0x0014
158 #define PCI_EXT_CAP_ID_REBAR 0x0015
159 #define PCI_EXT_CAP_ID_DPA 0x0016
160 #define PCI_EXT_CAP_ID_TPH 0x0017
161 #define PCI_EXT_CAP_ID_LTR 0x0018
162 #define PCI_EXT_CAP_ID_SECPCI 0x0019
163 #define PCI_EXT_CAP_ID_PMUX 0x001A
164 #define PCI_EXT_CAP_ID_PASID 0x001B
165 #define PCI_EXT_CAP_ID_LNR 0x001C
166 #define PCI_EXT_CAP_ID_DPC 0x001D
167 #define PCI_EXT_CAP_ID_L1PMS 0x001E
168 #define PCI_EXT_CAP_ID_PTM 0x001F
169 #define PCI_EXT_CAP_ID_MPHY 0x0020
170 #define PCI_EXT_CAP_ID_FRSQ 0x0021
171 #define PCI_EXT_CAP_ID_RTR 0x0022
173 #define GET_CAPABILITY_STR(cap_id) \
174 (cap_id) == 0x00 ? "Null Capability" : \
175 (cap_id) == PCI_CAP_ID_PM ? "Power Management" : \
176 (cap_id) == PCI_CAP_ID_AGP ? "Accelerated Graphics Port" : \
177 (cap_id) == PCI_CAP_ID_VPD ? "Vital Product Data" : \
178 (cap_id) == PCI_CAP_ID_SLOTID ? "Slot Identification" : \
179 (cap_id) == PCI_CAP_ID_MSI ? "Message Signalled Interrupts (MSI)" : \
180 (cap_id) == PCI_CAP_ID_CHSWP ? "CompactPCI HotSwap" : \
181 (cap_id) == PCI_CAP_ID_PCIX ? "PCI-X" : \
182 (cap_id) == PCI_CAP_ID_HT ? "HyperTransport" : \
183 (cap_id) == PCI_CAP_ID_VNDR ? "Vendor-Specific" : \
184 (cap_id) == PCI_CAP_ID_DBG ? "Debug port" : \
185 (cap_id) == PCI_CAP_ID_CCRC ? "CompactPCI Central Resource Control" : \
186 (cap_id) == PCI_CAP_ID_SHPC ? "PCI Standard Hot-Plug Controller" : \
187 (cap_id) == PCI_CAP_ID_SSVID ? "Bridge subsystem vendor/device ID" : \
188 (cap_id) == PCI_CAP_ID_AGP3 ? "AGP Target PCI-PCI bridge" : \
189 (cap_id) == PCI_CAP_ID_SECDEV ? "Secure Device" : \
190 (cap_id) == PCI_CAP_ID_EXP ? "PCI Express" : \
191 (cap_id) == PCI_CAP_ID_MSIX ? "Extended Message Signalled Interrupts (MSI-X)" : \
192 (cap_id) == PCI_CAP_ID_SATA ? "SATA Data/Index Conf." : \
193 (cap_id) == PCI_CAP_ID_AF ? "PCI Advanced Features" : \
196 #define GET_EXTENDED_CAPABILITY_STR(cap_id) \
197 (cap_id) == 0x0000 ? "Null Capability" : \
198 (cap_id) == PCI_EXT_CAP_ID_ERR ? "Advanced Error Reporting (AER)" : \
199 (cap_id) == PCI_EXT_CAP_ID_VC ? "Virtual Channel (VC)" : \
200 (cap_id) == PCI_EXT_CAP_ID_DSN ? "Device Serial Number" : \
201 (cap_id) == PCI_EXT_CAP_ID_PWR ? "Power Budgeting" : \
202 (cap_id) == PCI_EXT_CAP_ID_RCLD ? "Root Complex Link Declaration" : \
203 (cap_id) == PCI_EXT_CAP_ID_RCILC ? "Root Complex Internal Link Control" : \
204 (cap_id) == PCI_EXT_CAP_ID_RCEC ? "Root Complex Event Collector Endpoint Association" : \
205 (cap_id) == PCI_EXT_CAP_ID_MFVC ? "Multi-Function Virtual Channel (MFVC)" : \
206 (cap_id) == PCI_EXT_CAP_ID_VC9 ? "Virtual Channel (VC)" : \
207 (cap_id) == PCI_EXT_CAP_ID_RCRB ? "Root Complex Register Block (RCRB) Header" : \
208 (cap_id) == PCI_EXT_CAP_ID_VNDR ? "Vendor-Specific Extended Capability (VSEC)" : \
209 (cap_id) == PCI_EXT_CAP_ID_CAC ? "Configuration Access Correlation (CAC)" : \
210 (cap_id) == PCI_EXT_CAP_ID_ACS ? "Access Control Services (ACS)" : \
211 (cap_id) == PCI_EXT_CAP_ID_ARI ? "Alternative Routing-ID Interpretation (ARI)" : \
212 (cap_id) == PCI_EXT_CAP_ID_ATS ? "Address Translation Services (ATS)" : \
213 (cap_id) == PCI_EXT_CAP_ID_SRIOV ? "Single Root I/O Virtualization (SR-IOV)" : \
214 (cap_id) == PCI_EXT_CAP_ID_MRIOV ? "Multi-Root I/O Virtualization (MR-IOV)" : \
215 (cap_id) == PCI_EXT_CAP_ID_MCAST ? "Multicast" : \
216 (cap_id) == PCI_EXT_CAP_ID_PRI ? "Page Request" : \
217 (cap_id) == PCI_EXT_CAP_ID_AMD_XXX ? "Reserved for AMD" : \
218 (cap_id) == PCI_EXT_CAP_ID_REBAR ? "Resizable BAR" : \
219 (cap_id) == PCI_EXT_CAP_ID_DPA ? "Dynamic Power Allocation (DPA)" : \
220 (cap_id) == PCI_EXT_CAP_ID_TPH ? "TLP Processing Hints (TPH)" : \
221 (cap_id) == PCI_EXT_CAP_ID_LTR ? "Latency Tolerance Reporting (LTR)" : \
222 (cap_id) == PCI_EXT_CAP_ID_SECPCI ? "Secondary PCI Express" : \
223 (cap_id) == PCI_EXT_CAP_ID_PMUX ? "Protocol Multiplexing (PMUX)" : \
224 (cap_id) == PCI_EXT_CAP_ID_PASID ? "Process Address Space ID (PASID)" : \
225 (cap_id) == PCI_EXT_CAP_ID_LNR ? "LN Requester (LNR)" : \
226 (cap_id) == PCI_EXT_CAP_ID_L1PMS ? "Downstream Port Containment (DPC)" : \
227 (cap_id) == PCI_EXT_CAP_ID_L1PMS ? "L1 PM Substates" : \
228 (cap_id) == PCI_EXT_CAP_ID_PTM ? "Precision Time Measurement (PTM)" : \
229 (cap_id) == PCI_EXT_CAP_ID_MPHY ? "PCI Express over M-PHY (M-PCIe)" : \
230 (cap_id) == PCI_EXT_CAP_ID_FRSQ ? "FRS Queueing" : \
231 (cap_id) == PCI_EXT_CAP_ID_RTR ? "Readiness Time Reporting" : \
234 #define PCI_EXP_DEVCAP_PHANTOM_SHIFT 3
235 #define PCI_STATUS_DEVSEL_SHIFT 9
236 #define PCI_EXP_DEVCTL_READRQ_SHIFT 12
237 #define PCI_EXP_SLTCAP_SPLV_SHIFT 7
238 #define PCI_EXP_FLAGS_TYPE_SHIFT 9
239 #define PCI_EXP_DEVCAP_L1_SHIFT 9
240 #define PCI_EXP_DEVCAP_PWD_SCL_SHIFT 26
241 #define PCI_EXP_DEVCAP_PWR_VAL_SHIFT 18
242 #define PCI_EXP_DEVCTL_PAYLOAD_SHIFT 5
243 #define PCI_EXP_LNKCAP_MLW_SHIFT 4
244 #define PCI_EXP_LNKCAP_ASPMS_SHIFT 10
245 #define PCI_EXP_LNKCAP_L0SEL_SHIFT 12
246 #define PCI_EXP_LNKCAP_L1EL_SHIFT 15
247 #define PCI_EXP_SLTCAP_SPLS_SHIFT 15
248 #define PCI_EXP_SLTCAP_AIC_SHIFT 6
249 #define PCI_EXP_SLTCTL_PIC_SHIFT 8
250 #define PCI_EXP_DEVCAP2_EE_TLP_PREFIX_SUPP_SHIFT 22
251 #define PCI_EXP_LNKCTL2_TRANS_MARGIN_MASK_SHIFT 22
253 #define PCI_COMMAND 0x04
254 #define PCI_COMMAND_IO 0x1
255 #define PCI_COMMAND_MEMORY 0x2
256 #define PCI_COMMAND_MASTER 0x4
257 #define PCI_COMMAND_SPECIAL 0x8
258 #define PCI_COMMAND_INVALIDATE 0x10
259 #define PCI_COMMAND_VGA_PALETTE 0x20
260 #define PCI_COMMAND_PARITY 0x40
261 #define PCI_COMMAND_WAIT 0x80
262 #define PCI_COMMAND_SERR 0x100
263 #define PCI_COMMAND_FAST_BACK 0x200
264 #define PCI_COMMAND_INTX_DISABLE 0x400
266 #define PCI_STATUS 0x06
267 #define PCI_STATUS_INTERRUPT 0x08
268 #define PCI_STATUS_CAP_LIST 0x10
269 #define PCI_STATUS_66MHZ 0x20
270 #define PCI_STATUS_UDF 0x40
272 #define PCI_STATUS_FAST_BACK 0x80
273 #define PCI_STATUS_PARITY 0x100
274 #define PCI_STATUS_DEVSEL_MASK 0x600
275 #define PCI_STATUS_DEVSEL_FAST 0x000
276 #define PCI_STATUS_DEVSEL_MEDIUM 0x200
277 #define PCI_STATUS_DEVSEL_SLOW 0x400
278 #define PCI_STATUS_SIG_TARGET_ABORT 0x800
279 #define PCI_STATUS_REC_TARGET_ABORT 0x1000
280 #define PCI_STATUS_REC_MASTER_ABORT 0x2000
281 #define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000
282 #define PCI_STATUS_DETECTED_PARITY 0x8000
287 #define PCI_EXP_FLAGS 2
288 #define PCI_EXP_FLAGS_VERS 0x000f
289 #define PCI_EXP_FLAGS_TYPE 0x00f0
290 #define PCI_EXP_TYPE_ENDPOINT 0x0
291 #define PCI_EXP_TYPE_LEG_END 0x1
292 #define PCI_EXP_TYPE_ROOT_PORT 0x4
293 #define PCI_EXP_TYPE_UPSTREAM 0x5
294 #define PCI_EXP_TYPE_DOWNSTREAM 0x6
295 #define PCI_EXP_TYPE_PCI_BRIDGE 0x7
296 #define PCI_EXP_TYPE_PCIE_BRIDGE 0x8
297 #define PCI_EXP_TYPE_RC_END 0x9
298 #define PCI_EXP_TYPE_RC_EC 0xa
299 #define PCI_EXP_FLAGS_SLOT 0x0100
300 #define PCI_EXP_FLAGS_IRQ 0x3e00
301 #define PCI_EXP_DEVCAP 4
302 #define PCI_EXP_DEVCAP_PAYLOAD 0x00000007
303 #define PCI_EXP_DEVCAP_PHANTOM 0x00000018
304 #define PCI_EXP_DEVCAP_EXT_TAG 0x00000020
305 #define PCI_EXP_DEVCAP_L0S 0x000001c0
306 #define PCI_EXP_DEVCAP_L1 0x00000e00
307 #define PCI_EXP_DEVCAP_ATN_BUT 0x00001000
308 #define PCI_EXP_DEVCAP_ATN_IND 0x00002000
309 #define PCI_EXP_DEVCAP_PWR_IND 0x00004000
310 #define PCI_EXP_DEVCAP_RBER 0x00008000
311 #define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000
312 #define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000
313 #define PCI_EXP_DEVCAP_FLR 0x10000000
314 #define PCI_EXP_DEVCTL 8
315 #define PCI_EXP_DEVCTL_CERE 0x0001
316 #define PCI_EXP_DEVCTL_NFERE 0x0002
317 #define PCI_EXP_DEVCTL_FERE 0x0004
318 #define PCI_EXP_DEVCTL_URRE 0x0008
319 #define PCI_EXP_DEVCTL_RELAX_EN 0x0010
320 #define PCI_EXP_DEVCTL_PAYLOAD 0x00e0
321 #define PCI_EXP_DEVCTL_EXT_TAG 0x0100
322 #define PCI_EXP_DEVCTL_PHANTOM 0x0200
323 #define PCI_EXP_DEVCTL_AUX_PME 0x0400
324 #define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800
325 #define PCI_EXP_DEVCTL_READRQ 0x7000
326 #define PCI_EXP_DEVCTL_READRQ_128B 0x0000
327 #define PCI_EXP_DEVCTL_READRQ_256B 0x1000
328 #define PCI_EXP_DEVCTL_READRQ_512B 0x2000
329 #define PCI_EXP_DEVCTL_READRQ_1024B 0x3000
330 #define PCI_EXP_DEVCTL_BCR_FLR 0x8000
331 #define PCI_EXP_DEVSTA 10
332 #define PCI_EXP_DEVSTA_CED 0x0001
333 #define PCI_EXP_DEVSTA_NFED 0x0002
334 #define PCI_EXP_DEVSTA_FED 0x0004
335 #define PCI_EXP_DEVSTA_URD 0x0008
336 #define PCI_EXP_DEVSTA_AUXPD 0x0010
337 #define PCI_EXP_DEVSTA_TRPND 0x0020
338 #define PCI_EXP_LNKCAP 12
339 #define PCI_EXP_LNKCAP_SLS 0x0000000f
340 #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001
341 #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002
342 #define PCI_EXP_LNKCAP_MLW 0x000003f0
343 #define PCI_EXP_LNKCAP_ASPMS 0x00000c00
344 #define PCI_EXP_LNKCAP_L0SEL 0x00007000
345 #define PCI_EXP_LNKCAP_L1EL 0x00038000
346 #define PCI_EXP_LNKCAP_CLKPM 0x00040000
347 #define PCI_EXP_LNKCAP_SDERC 0x00080000
349 #define PCI_EXP_LNKCAP_DLLLARC 0x00100000
351 #define PCI_EXP_LNKCAP_LBNC 0x00200000
353 #define PCI_EXP_LNKCAP_PN 0xff000000
354 #define PCI_EXP_LNKCTL 16
355 #define PCI_EXP_LNKCTL_ASPMC 0x0003
356 #define PCI_EXP_LNKCTL_ASPM_L0S 0x0001
357 #define PCI_EXP_LNKCTL_ASPM_L1 0x0002
358 #define PCI_EXP_LNKCTL_RCB 0x0008
359 #define PCI_EXP_LNKCTL_LD 0x0010
360 #define PCI_EXP_LNKCTL_RL 0x0020
361 #define PCI_EXP_LNKCTL_CCC 0x0040
362 #define PCI_EXP_LNKCTL_ES 0x0080
363 #define PCI_EXP_LNKCTL_CLKREQ_EN 0x0100
364 #define PCI_EXP_LNKCTL_HAWD 0x0200
365 #define PCI_EXP_LNKCTL_LBMIE 0x0400
367 #define PCI_EXP_LNKCTL_LABIE 0x0800
369 #define PCI_EXP_LNKSTA 18
370 #define PCI_EXP_LNKSTA_CLS 0x000f
371 #define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001
372 #define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002
373 #define PCI_EXP_LNKSTA_CLS_8_0GB 0x0003
374 #define PCI_EXP_LNKSTA_NLW 0x03f0
375 #define PCI_EXP_LNKSTA_NLW_X1 0x0010
376 #define PCI_EXP_LNKSTA_NLW_X2 0x0020
377 #define PCI_EXP_LNKSTA_NLW_X4 0x0040
378 #define PCI_EXP_LNKSTA_NLW_X8 0x0080
379 #define PCI_EXP_LNKSTA_NLW_SHIFT 4
380 #define PCI_EXP_LNKSTA_LT 0x0800
381 #define PCI_EXP_LNKSTA_SLC 0x1000
382 #define PCI_EXP_LNKSTA_DLLLA 0x2000
383 #define PCI_EXP_LNKSTA_LBMS 0x4000
384 #define PCI_EXP_LNKSTA_LABS 0x8000
385 #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V1 20
386 #define PCI_EXP_SLTCAP 20
387 #define PCI_EXP_SLTCAP_ABP 0x00000001
388 #define PCI_EXP_SLTCAP_PCP 0x00000002
389 #define PCI_EXP_SLTCAP_MRLSP 0x00000004
390 #define PCI_EXP_SLTCAP_AIP 0x00000008
391 #define PCI_EXP_SLTCAP_PIP 0x00000010
392 #define PCI_EXP_SLTCAP_HPS 0x00000020
393 #define PCI_EXP_SLTCAP_HPC 0x00000040
394 #define PCI_EXP_SLTCAP_SPLV 0x00007f80
395 #define PCI_EXP_SLTCAP_SPLS 0x00018000
396 #define PCI_EXP_SLTCAP_EIP 0x00020000
397 #define PCI_EXP_SLTCAP_NCCS 0x00040000
398 #define PCI_EXP_SLTCAP_PSN 0xfff80000
399 #define PCI_EXP_SLTCTL 24
400 #define PCI_EXP_SLTCTL_ABPE 0x0001
401 #define PCI_EXP_SLTCTL_PFDE 0x0002
402 #define PCI_EXP_SLTCTL_MRLSCE 0x0004
403 #define PCI_EXP_SLTCTL_PDCE 0x0008
404 #define PCI_EXP_SLTCTL_CCIE 0x0010
405 #define PCI_EXP_SLTCTL_HPIE 0x0020
406 #define PCI_EXP_SLTCTL_AIC 0x00c0
407 #define PCI_EXP_SLTCTL_ATTN_IND_ON 0x0040
408 #define PCI_EXP_SLTCTL_ATTN_IND_BLINK 0x0080
409 #define PCI_EXP_SLTCTL_ATTN_IND_OFF 0x00c0
410 #define PCI_EXP_SLTCTL_PIC 0x0300
411 #define PCI_EXP_SLTCTL_PWR_IND_ON 0x0100
412 #define PCI_EXP_SLTCTL_PWR_IND_BLINK 0x0200
413 #define PCI_EXP_SLTCTL_PWR_IND_OFF 0x0300
414 #define PCI_EXP_SLTCTL_PCC 0x0400
415 #define PCI_EXP_SLTCTL_PWR_ON 0x0000
416 #define PCI_EXP_SLTCTL_PWR_OFF 0x0400
417 #define PCI_EXP_SLTCTL_EIC 0x0800
418 #define PCI_EXP_SLTCTL_DLLSCE 0x1000
420 #define PCI_EXP_SLTSTA 26
421 #define PCI_EXP_SLTSTA_ABP 0x0001
422 #define PCI_EXP_SLTSTA_PFD 0x0002
423 #define PCI_EXP_SLTSTA_MRLSC 0x0004
424 #define PCI_EXP_SLTSTA_PDC 0x0008
425 #define PCI_EXP_SLTSTA_CC 0x0010
426 #define PCI_EXP_SLTSTA_MRLSS 0x0020
427 #define PCI_EXP_SLTSTA_PDS 0x0040
428 #define PCI_EXP_SLTSTA_EIS 0x0080
429 #define PCI_EXP_SLTSTA_DLLSC 0x0100
430 #define PCI_EXP_RTCTL 28
431 #define PCI_EXP_RTCTL_SECEE 0x0001
432 #define PCI_EXP_RTCTL_SENFEE 0x0002
433 #define PCI_EXP_RTCTL_SEFEE 0x0004
434 #define PCI_EXP_RTCTL_PMEIE 0x0008
435 #define PCI_EXP_RTCTL_CRSSVE 0x0010
436 #define PCI_EXP_RTCAP 30
437 #define PCI_EXP_RTCAP_CRSVIS 0x0001
438 #define PCI_EXP_RTSTA 32
439 #define PCI_EXP_RTSTA_PME 0x00010000
440 #define PCI_EXP_RTSTA_PENDING 0x00020000
442 #define PCI_EXP_DEVCAP2 36
443 #define PCI_EXP_DEVCAP2_RANGE_A 0x1
444 #define PCI_EXP_DEVCAP2_RANGE_B 0x2
445 #define PCI_EXP_DEVCAP2_RANGE_C 0x4
446 #define PCI_EXP_DEVCAP2_RANGE_D 0x8
447 #define PCI_EXP_DEVCAP2_COMP_TO_RANGES_SUPP 0xF
449 #define PCI_EXP_DEVCAP2_COMP_TO_DIS_SUPP 0x000010
451 #define PCI_EXP_DEVCAP2_ARI 0x00000020
452 #define PCI_EXP_DEVCAP2_ATOMIC_ROUTE 0x00000040
453 #define PCI_EXP_DEVCAP2_ATOMIC_COMP32 0x000080
455 #define PCI_EXP_DEVCAP2_ATOMIC_COMP64 0x00000100
456 #define PCI_EXP_DEVCAP2_128_CAS_COMP_SUPP 0x000200
458 #define PCI_EXP_DEVCAP2_NO_RO_ENABLED_PR 0x000400
460 #define PCI_EXP_DEVCAP2_LTR 0x00000800
461 #define PCI_EXP_DEVCAP2_TPH_COMP_SUPP 0x001000
463 #define PCI_EXP_DEVCAP2_EXT_TPH_COMP_SUPP 0x002000
465 #define PCI_EXP_DEVCAP2_OBFF_MASK 0x000c0000
466 #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000
467 #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000
468 #define PCI_EXP_DEVCAP2_EXT_FMT_FIELD_SUPP 0x100000
470 #define PCI_EXP_DEVCAP2_EE_TLP_PREFIX_SUPP 0x200000
472 #define PCI_EXP_DEVCAP2_MAX_EE_TLP_PREFIXES 0xC00000
475 #define PCI_EXP_DEVCTL2 40
476 #define PCI_EXP_DEVCTL2_COMP_TIMEOUT_DISABLE 0x0010
478 #define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f
479 #define PCI_EXP_DEVCTL2_ARI 0x0020
480 #define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040
481 #define PCI_EXP_DEVCTL2_ATOMIC_EGRESS_BLOCK 0x0080
482 #define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100
483 #define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200
484 #define PCI_EXP_DEVCTL2_LTR_EN 0x0400
485 #define PCI_EXP_DEVCTL2_OBFF_MSGA_EN 0x2000
486 #define PCI_EXP_DEVCTL2_OBFF_MSGB_EN 0x4000
487 #define PCI_EXP_DEVCTL2_OBFF_WAKE_EN 0x6000
488 #define PCI_EXP_DEVCTL2_EE_TLP_PREFIX_BLOCK 0x8000
490 #define PCI_EXP_DEVSTA2 42
491 #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 44
492 #define PCI_EXP_LNKCAP2 44
493 #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002
494 #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004
495 #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x00000008
496 #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100
497 #define PCI_EXP_LNKCTL2 48
498 #define PCI_EXP_LNKCTL2_LNK_SPEED_2_5 0x00000001
499 #define PCI_EXP_LNKCTL2_LNK_SPEED_5_0 0x00000002
500 #define PCI_EXP_LNKCTL2_LNK_SPEED_8_0 0x00000003
501 #define PCI_EXP_LNKCTL2_TRGT_LNK_SPEED_MASK 0x0000000f
503 #define PCI_EXP_LNKCTL2_ENTER_COMP 0x00000010
504 #define PCI_EXP_LNKCTL2_HW_AUTO_SPEED_DIS 0x00000020
506 #define PCI_EXP_LNKCTL2_SELECTABLE_DEEMPH 0x00000040
508 #define PCI_EXP_LNKCTL2_TRANS_MARGIN_MASK 0x00000380
509 #define PCI_EXP_LNKCTL2_ENTER_MOD_COMP 0x00000400
511 #define PCI_EXP_LNKCTL2_COMP_SOS 0x00000800
512 #define PCI_EXP_LNKCTL2_DEEMPH_LVL_POLL 0x00001000
514 #define PCI_EXP_LNKCTL2_TRANS_PRESENT_POLL 0x0000f000
516 #define PCI_EXP_LNKSTA2 50
517 #define PCI_EXP_LNKSTA2_CDL 0x00000001
519 #define PCI_EXP_LNKSTA2_EQUALIZ_COMP 0x00000002
520 #define PCI_EXP_LNKSTA2_EQUALIZ_PH1 0x00000004
521 #define PCI_EXP_LNKSTA2_EQUALIZ_PH2 0x00000008
522 #define PCI_EXP_LNKSTA2_EQUALIZ_PH3 0x00000010
523 #define PCI_EXP_LNKSTA2_LINE_EQ_REQ 0x00000020
524 #define PCI_EXP_SLTCAP2 52
525 #define PCI_EXP_SLTCTL2 56
526 #define PCI_EXP_SLTSTA2 58
AD_PCI_BAR
PCI base address spaces (BARs)
@ PCI_SDID
Sub-system device ID.
@ PCI_MGR
Minimum required burst period.
@ PCI_MLR
Maximum latency - How often device must gain PCI bus access.
@ PCI_CCBC
Base class code.
@ PCI_CR
Command register.
@ PCI_CIS
CardBus CIS pointer.
@ PCI_CAP
New capability pointer.
@ PCI_BAR5
Base address register.
@ PCI_BAR3
Base address register.
@ PCI_BISTR
Built-in self test.
@ PCI_CLSR
Cache line size.
@ PCI_BAR2
Base address register.
@ PCI_BAR4
Base address register.
@ PCI_SVID
Sub-system vendor ID.
@ PCI_EROM
Expansion ROM base address.
@ PCI_BAR0
Base address register.
@ PCI_BAR1
Base address register.
@ PCI_CCSC
Sub class code.
@ HEADER_TYPE_NRML_CARDBUS
@ HEADER_TYPE_NRML_BRIDGE
@ HEADER_TYPE_BRIDGE_CARDBUS