Jungo WinDriver  
Official Documentation
pci_regs.h
Go to the documentation of this file.
1 /* @JUNGO_COPYRIGHT@ */
2 
3 #ifndef _PCI_REGS_H_
4 #define _PCI_REGS_H_
5 
6 /*****************************************************************************
7 * File - pci_regs.h - PCI configuration space and address spaces definitions *
8 ******************************************************************************/
9 
10 /* -------------------------
11  * Register type definitions
12  * ------------------------- */
13 
14 typedef enum
15 {
25 
26 /* -----------------------------------------------
27  PCI configuration registers offsets
28  ----------------------------------------------- */
29 typedef enum {
30  PCI_VID = 0x00,
31  PCI_DID = 0x02,
32  PCI_CR = 0x04,
33  PCI_SR = 0x06,
34  PCI_REV = 0x08,
35  PCI_CCR = 0x09,
36  PCI_CCSC = 0x0a,
37  PCI_CCBC = 0x0b,
38  PCI_CLSR = 0x0c,
39  PCI_LTR = 0x0d,
40  PCI_HDR = 0x0e,
41  PCI_BISTR = 0x0f,
42  PCI_BAR0 = 0x10,
43  PCI_BAR1 = 0x14,
44  PCI_BAR2 = 0x18,
45  PCI_BAR3 = 0x1c,
46  PCI_BAR4 = 0x20,
47  PCI_BAR5 = 0x24,
48  PCI_CIS = 0x28,
49  PCI_SVID = 0x2c,
50  PCI_SDID = 0x2e,
51  PCI_EROM = 0x30,
52  PCI_CAP = 0x34,
53  PCI_ILR = 0x3c,
54  PCI_IPR = 0x3d,
55  PCI_MGR = 0x3e,
56  PCI_MLR = 0x3f
59 
60 typedef enum
61 {
62  PCIE_CAP_ID = 0x0,
63  NEXT_CAP_PTR = 0x1,
64  CAP_REG = 0x2,
65  DEV_CAPS = 0x4,
66  DEV_CTL = 0x8,
67  DEV_STS = 0xa,
68  LNK_CAPS = 0xc,
69  LNK_CTL = 0x10,
70  LNK_STS = 0x12,
71  SLOT_CAPS = 0x14,
72  SLOT_CTL = 0x18,
73  SLOT_STS = 0x1a,
74  ROOT_CAPS = 0x1c,
75  ROOT_CTL = 0x1e,
76  ROOT_STS = 0x20,
77  DEV_CAPS2 = 0x24,
78  DEV_CTL2 = 0x28,
79  DEV_STS2 = 0x2a,
80  LNK_CAPS2 = 0x2c,
81  LNK_CTL2 = 0x30,
82  LNK_STS2 = 0x32,
83  SLOT_CAPS2 = 0x34,
84  SLOT_CTL2 = 0x38,
85  SLOT_STS2 = 0x3a
87 
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
92 
93 #define PCI_SR_CAP_LIST_BIT 0x00000010
94 
96 typedef enum {
103  AD_PCI_BARS = 6
105 
106 /* PCI basic and extended capability lists last updated from-
107  * PCI Code and ID Assignment Specification Revision 1.5 */
108 /* Some of the following strings and macros are taken from
109  * include/uapi/linux/pci_regs.h in Linux Kernel source */
110 /* Capability lists */
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
133 /* Extended Capabilities (PCI-X 2.0 and Express) */
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)
137 
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" : \
194  "Unknown"
195 
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" : \
232  "Unknown"
233 
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
252 
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
284 #
285 /* PCI Express capability registers */
286 
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
528 #endif /* _PCI_REGS_H_ */
529 
PCIE_CONFIG_REGS_OFFSET
Definition: pci_regs.h:61
@ CAP_REG
Definition: pci_regs.h:64
@ SLOT_CTL2
Definition: pci_regs.h:84
@ SLOT_STS
Definition: pci_regs.h:73
@ DEV_CAPS2
Definition: pci_regs.h:77
@ DEV_STS2
Definition: pci_regs.h:79
@ DEV_STS
Definition: pci_regs.h:67
@ ROOT_STS
Definition: pci_regs.h:76
@ SLOT_STS2
Definition: pci_regs.h:85
@ ROOT_CAPS
Definition: pci_regs.h:74
@ LNK_CAPS
Definition: pci_regs.h:68
@ LNK_CAPS2
Definition: pci_regs.h:80
@ LNK_CTL2
Definition: pci_regs.h:81
@ LNK_STS2
Definition: pci_regs.h:82
@ SLOT_CAPS
Definition: pci_regs.h:71
@ DEV_CAPS
Definition: pci_regs.h:65
@ ROOT_CTL
Definition: pci_regs.h:75
@ LNK_STS
Definition: pci_regs.h:70
@ DEV_CTL
Definition: pci_regs.h:66
@ LNK_CTL
Definition: pci_regs.h:69
@ PCIE_CAP_ID
Definition: pci_regs.h:62
@ DEV_CTL2
Definition: pci_regs.h:78
@ SLOT_CTL
Definition: pci_regs.h:72
@ SLOT_CAPS2
Definition: pci_regs.h:83
@ NEXT_CAP_PTR
Definition: pci_regs.h:63
AD_PCI_BAR
PCI base address spaces (BARs)
Definition: pci_regs.h:96
@ AD_PCI_BARS
Definition: pci_regs.h:103
@ AD_PCI_BAR1
Definition: pci_regs.h:98
@ AD_PCI_BAR3
Definition: pci_regs.h:100
@ AD_PCI_BAR5
Definition: pci_regs.h:102
@ AD_PCI_BAR0
Definition: pci_regs.h:97
@ AD_PCI_BAR2
Definition: pci_regs.h:99
@ AD_PCI_BAR4
Definition: pci_regs.h:101
PCI_CONFIG_REGS_OFFSET
Definition: pci_regs.h:29
@ PCI_SDID
Sub-system device ID.
Definition: pci_regs.h:50
@ PCI_MGR
Minimum required burst period.
Definition: pci_regs.h:55
@ PCI_MLR
Maximum latency - How often device must gain PCI bus access.
Definition: pci_regs.h:56
@ PCI_CCBC
Base class code.
Definition: pci_regs.h:37
@ PCI_CR
Command register.
Definition: pci_regs.h:32
@ PCI_CIS
CardBus CIS pointer.
Definition: pci_regs.h:48
@ PCI_IPR
Interrupt pin.
Definition: pci_regs.h:54
@ PCI_CAP
New capability pointer.
Definition: pci_regs.h:52
@ PCI_HDR
Header type.
Definition: pci_regs.h:40
@ PCI_REV
Revision ID.
Definition: pci_regs.h:34
@ PCI_CCR
Class code.
Definition: pci_regs.h:35
@ PCI_BAR5
Base address register.
Definition: pci_regs.h:47
@ PCI_VID
Vendor ID.
Definition: pci_regs.h:30
@ PCI_SR
Status register.
Definition: pci_regs.h:33
@ PCI_BAR3
Base address register.
Definition: pci_regs.h:45
@ PCI_BISTR
Built-in self test.
Definition: pci_regs.h:41
@ PCI_CLSR
Cache line size.
Definition: pci_regs.h:38
@ PCI_DID
Device ID.
Definition: pci_regs.h:31
@ PCI_BAR2
Base address register.
Definition: pci_regs.h:44
@ PCI_BAR4
Base address register.
Definition: pci_regs.h:46
@ PCI_SVID
Sub-system vendor ID.
Definition: pci_regs.h:49
@ PCI_EROM
Expansion ROM base address.
Definition: pci_regs.h:51
@ PCI_BAR0
Base address register.
Definition: pci_regs.h:42
@ PCI_BAR1
Base address register.
Definition: pci_regs.h:43
@ PCI_ILR
Interrupt line.
Definition: pci_regs.h:53
@ PCI_CCSC
Sub class code.
Definition: pci_regs.h:36
@ PCI_LTR
Latency timer.
Definition: pci_regs.h:39
WDC_PCI_HEADER_TYPE
Definition: pci_regs.h:15
@ HEADER_TYPE_BRIDGE
Definition: pci_regs.h:17
@ HEADER_TYPE_NRML_CARDBUS
Definition: pci_regs.h:20
@ HEADER_TYPE_ALL
Definition: pci_regs.h:22
@ HEADER_TYPE_NRML_BRIDGE
Definition: pci_regs.h:19
@ HEADER_TYPE_NORMAL
Definition: pci_regs.h:16
@ HEADER_TYPE_CARDBUS
Definition: pci_regs.h:18
@ HEADER_TYPE_BRIDGE_CARDBUS
Definition: pci_regs.h:21