Changeset 32764 in vbox
- Timestamp:
- Sep 24, 2010 4:10:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pci.h
r32734 r32764 229 229 #define VBOX_PCI_CAP_ID_SSVID 0x0D /* Bridge subsystem vendor/device ID */ 230 230 #define VBOX_PCI_CAP_ID_AGP3 0x0E /* AGP Target PCI-PCI bridge */ 231 #define VBOX_PCI_CAP_ID_SECURE 0x0F /* Secure device (?) */ 231 232 #define VBOX_PCI_CAP_ID_EXP 0x10 /* PCI Express */ 232 233 #define VBOX_PCI_CAP_ID_MSIX 0x11 /* MSI-X */ 234 #define VBOX_PCI_CAP_ID_SATA 0x12 /* Serial-ATA HBA */ 233 235 #define VBOX_PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ 234 236 235 /* Extended Capabilities (PCI-X 2.0 and Express)*/ 236 #define VBOX_PCI_EXT_CAP_ID_ERR 0x01 237 #define VBOX_PCI_EXT_CAP_ID_VC 0x02 238 #define VBOX_PCI_EXT_CAP_ID_DSN 0x03 239 #define VBOX_PCI_EXT_CAP_ID_PWR 0x04 237 /* Extended Capabilities (PCI-X 2.0 and Express), start at 0x100, next - bits [20..32] */ 238 #define VBOX_PCI_EXT_CAP_ID_ERR 0x01 /* Advanced Error Reporting */ 239 #define VBOX_PCI_EXT_CAP_ID_VC 0x02 /* Virtual Channel */ 240 #define VBOX_PCI_EXT_CAP_ID_DSN 0x03 /* Device Serial Number */ 241 #define VBOX_PCI_EXT_CAP_ID_PWR 0x04 /* Power Budgeting */ 242 #define VBOX_PCI_EXT_CAP_ID_RCLINK 0x05 /* Root Complex Link Declaration */ 243 #define VBOX_PCI_EXT_CAP_ID_RCILINK 0x06 /* Root Complex Internal Link Declaration */ 244 #define VBOX_PCI_EXT_CAP_ID_RCECOLL 0x07 /* Root Complex Event Collector */ 245 #define VBOX_PCI_EXT_CAP_ID_MFVC 0x08 /* Multi-Function Virtual Channel */ 246 #define VBOX_PCI_EXT_CAP_ID_RBCB 0x0a /* Root Bridge Control Block */ 247 #define VBOX_PCI_EXT_CAP_ID_VNDR 0x0b /* Vendor specific */ 248 #define VBOX_PCI_EXT_CAP_ID_ACS 0x0d /* Access Controls */ 240 249 #define VBOX_PCI_EXT_CAP_ID_ARI 0x0e 241 250 #define VBOX_PCI_EXT_CAP_ID_ATS 0x0f … … 244 253 245 254 /* MSI flags (2 bytes, capability offset 2) */ 246 #define VBOX_PCI_MSI_FLAGS_64BIT 0x 80/* 64-bit addresses allowed */247 #define VBOX_PCI_MSI_FLAGS_QSIZE 0x 70/* Message queue size configured */248 #define VBOX_PCI_MSI_FLAGS_QMASK 0x0 e/* Maximum queue size available */249 #define VBOX_PCI_MSI_FLAGS_ENABLE 0x0 1/* MSI feature enabled */255 #define VBOX_PCI_MSI_FLAGS_64BIT 0x0080 /* 64-bit addresses allowed */ 256 #define VBOX_PCI_MSI_FLAGS_QSIZE 0x0070 /* Message queue size configured */ 257 #define VBOX_PCI_MSI_FLAGS_QMASK 0x000e /* Maximum queue size available */ 258 #define VBOX_PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */ 250 259 #define VBOX_PCI_MSI_FLAGS_MASKBIT 0x100 /* 64-bit mask bits allowed */ 251 260 252 261 /* MSI-X flags (2 bytes, capability offset 2) */ 253 262 #define VBOX_PCI_MSIX_FLAGS_ENABLE 0x8000 254 #define VBOX_PCI_MSIX_FLAGS_MASKALL 0x4000255 #define VBOX_PCI_MSIX_FLAGS_BIRMASK 0x0007256 263 257 264 /* Power management flags (2 bytes, capability offset 2) */ … … 272 279 273 280 /* Power management control flags (2 bytes, capability offset 4) */ 274 #define VBOX_PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */281 #define VBOX_PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ 275 282 #define VBOX_PCI_PM_CTRL_NO_SOFT_RESET 0x0008 /* No reset for D3hot->D0 */ 276 #define VBOX_PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */283 #define VBOX_PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ 277 284 #define VBOX_PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ 278 285 #define VBOX_PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ 279 #define VBOX_PCI_PM_CTRL_PME_STATUS 0x8000 /* PME pin status */286 #define VBOX_PCI_PM_CTRL_PME_STATUS 0x8000 /* PME pin status */ 280 287 281 288 /* PCI-X config flags (2 bytes, capability offset 2) */ 282 289 #define VBOX_PCI_X_CMD_DPERR_E 0x0001 /* Data Parity Error Recovery Enable */ 283 290 #define VBOX_PCI_X_CMD_ERO 0x0002 /* Enable Relaxed Ordering */ 291 #define VBOX_PCI_X_CMD_MAX_OUTSTANDING_SPLIT_TRANS 0x0070 284 292 #define VBOX_PCI_X_CMD_READ_512 0x0000 /* 512 byte maximum read byte count */ 285 293 #define VBOX_PCI_X_CMD_READ_1K 0x0004 /* 1Kbyte maximum read byte count */ … … 295 303 #define VBOX_PCI_X_STATUS_SPL_DISC 0x00040000 /* Split Completion Discarded */ 296 304 #define VBOX_PCI_X_STATUS_UNX_SPL 0x00080000 /* Unexpected Split Completion */ 297 #define VBOX_PCI_X_STATUS_COMPLEX 0x00100000 /* Device Complexity */298 #define VBOX_PCI_X_STATUS_MAX_READ 0x00600000 /* Designed Max Memory Read Count */305 #define VBOX_PCI_X_STATUS_COMPLEX 0x00100000 /* Device Complexity, 0 = simple device, 1 = bridge device */ 306 #define VBOX_PCI_X_STATUS_MAX_READ 0x00600000 /* Designed Max Memory Read Count, 0 = 512 bytes, 1 = 1024, 2 = 2048, 3 = 4096 */ 299 307 #define VBOX_PCI_X_STATUS_MAX_SPLIT 0x03800000 /* Designed Max Outstanding Split Transactions */ 300 308 #define VBOX_PCI_X_STATUS_MAX_CUM 0x1c000000 /* Designed Max Cumulative Read Size */ … … 302 310 #define VBOX_PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ 303 311 #define VBOX_PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ 312 313 /* PCI Express config flags (2 bytes, capability offset 2) */ 314 #define VBOX_PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ 315 #define VBOX_PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ 316 #define VBOX_PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ 317 #define VBOX_PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */ 318 #define VBOX_PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ 319 #define VBOX_PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ 320 #define VBOX_PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ 321 #define VBOX_PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ 322 #define VBOX_PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIE Bridge */ 323 #define VBOX_PCI_EXP_TYPE_ROOT_INT_EP 0x9 /* Root Complex Integrated Endpoint */ 324 #define VBOX_PCI_EXP_TYPE_ROOT_EC 0xa /* Root Complex Event Collector */ 325 #define VBOX_PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ 326 #define VBOX_PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ 327 328 /* PCI Express device capabilities (4 bytes, capability offset 4) */ 329 #define VBOX_PCI_EXP_DEVCAP_PAYLOAD 0x07 /* Max_Payload_Size */ 330 #define VBOX_PCI_EXP_DEVCAP_PHANTOM 0x18 /* Phantom functions */ 331 #define VBOX_PCI_EXP_DEVCAP_EXT_TAG 0x20 /* Extended tags */ 332 #define VBOX_PCI_EXP_DEVCAP_L0S 0x1c0 /* L0s Acceptable Latency */ 333 #define VBOX_PCI_EXP_DEVCAP_L1 0xe00 /* L1 Acceptable Latency */ 334 #define VBOX_PCI_EXP_DEVCAP_ATN_BUT 0x1000 /* Attention Button Present */ 335 #define VBOX_PCI_EXP_DEVCAP_ATN_IND 0x2000 /* Attention Indicator Present */ 336 #define VBOX_PCI_EXP_DEVCAP_PWR_IND 0x4000 /* Power Indicator Present */ 337 #define VBOX_PCI_EXP_DEVCAP_RBE 0x8000 /* Role-Based Error Reporting */ 338 #define VBOX_PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */ 339 #define VBOX_PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */ 340 #define VBOX_PCI_EXP_DEVCAP_FLRESET 0x10000000 /* Function-Level Reset */ 341 342 /* PCI Express device control (2 bytes, capability offset 8) */ 343 #define VBOX_PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ 344 #define VBOX_PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ 345 #define VBOX_PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */ 346 #define VBOX_PCI_EXP_DEVCTL_URRE 0x0008 /* Unsupported Request Reporting En. */ 347 #define VBOX_PCI_EXP_DEVCTL_RELAXED 0x0010 /* Enable Relaxed Ordering */ 348 #define VBOX_PCI_EXP_DEVCTL_PAYLOAD 0x00e0 /* Max_Payload_Size */ 349 #define VBOX_PCI_EXP_DEVCTL_EXT_TAG 0x0100 /* Extended Tag Field Enable */ 350 #define VBOX_PCI_EXP_DEVCTL_PHANTOM 0x0200 /* Phantom Functions Enable */ 351 #define VBOX_PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ 352 #define VBOX_PCI_EXP_DEVCTL_NOSNOOP 0x0800 /* Enable No Snoop */ 353 #define VBOX_PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ 354 #define VBOX_PCI_EXP_DEVCTL_BCRE 0x8000 /* Bridge Configuration Retry Enable */ 355 #define VBOX_PCI_EXP_DEVCTL_FLRESET 0x8000 /* Function-Level Reset [bit shared with BCRE] */ 356 357 /* PCI Express device status (2 bytes, capability offset 10) */ 358 #define VBOX_PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */ 359 #define VBOX_PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */ 360 #define VBOX_PCI_EXP_DEVSTA_FED 0x04 /* Fatal Error Detected */ 361 #define VBOX_PCI_EXP_DEVSTA_URD 0x08 /* Unsupported Request Detected */ 362 #define VBOX_PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */ 363 #define VBOX_PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ 364 365 /* PCI Express link capabilities (4 bytes, capability offset 12) */ 366 #define VBOX_PCI_EXP_LNKCAP_SPEED 0x0000f /* Maximum Link Speed */ 367 #define VBOX_PCI_EXP_LNKCAP_WIDTH 0x003f0 /* Maximum Link Width */ 368 #define VBOX_PCI_EXP_LNKCAP_ASPM 0x00c00 /* Active State Power Management */ 369 #define VBOX_PCI_EXP_LNKCAP_L0S 0x07000 /* L0s Acceptable Latency */ 370 #define VBOX_PCI_EXP_LNKCAP_L1 0x38000 /* L1 Acceptable Latency */ 371 #define VBOX_PCI_EXP_LNKCAP_CLOCKPM 0x40000 /* Clock Power Management */ 372 #define VBOX_PCI_EXP_LNKCAP_SURPRISE 0x80000 /* Surprise Down Error Reporting */ 373 #define VBOX_PCI_EXP_LNKCAP_DLLA 0x100000 /* Data Link Layer Active Reporting */ 374 #define VBOX_PCI_EXP_LNKCAP_LBNC 0x200000 /* Link Bandwidth Notification Capability */ 375 #define VBOX_PCI_EXP_LNKCAP_PORT 0xff000000 /* Port Number */ 376 377 /* PCI Express link control (2 bytes, capability offset 16) */ 378 #define VBOX_PCI_EXP_LNKCTL_ASPM 0x0003 /* ASPM Control */ 379 #define VBOX_PCI_EXP_LNKCTL_RCB 0x0008 /* Read Completion Boundary */ 380 #define VBOX_PCI_EXP_LNKCTL_DISABLE 0x0010 /* Link Disable */ 381 #define VBOX_PCI_EXP_LNKCTL_RETRAIN 0x0020 /* Retrain Link */ 382 #define VBOX_PCI_EXP_LNKCTL_CLOCK 0x0040 /* Common Clock Configuration */ 383 #define VBOX_PCI_EXP_LNKCTL_XSYNCH 0x0080 /* Extended Synch */ 384 #define VBOX_PCI_EXP_LNKCTL_CLOCKPM 0x0100 /* Clock Power Management */ 385 #define VBOX_PCI_EXP_LNKCTL_HWAUTWD 0x0200 /* Hardware Autonomous Width Disable */ 386 #define VBOX_PCI_EXP_LNKCTL_BWMIE 0x0400 /* Bandwidth Mgmt Interrupt Enable */ 387 #define VBOX_PCI_EXP_LNKCTL_AUTBWIE 0x0800 /* Autonomous Bandwidth Mgmt Interrupt Enable */ 388 389 /* PCI Express link status (2 bytes, capability offset 18) */ 390 #define VBOX_PCI_EXP_LNKSTA_SPEED 0x000f /* Negotiated Link Speed */ 391 #define VBOX_PCI_EXP_LNKSTA_WIDTH 0x03f0 /* Negotiated Link Width */ 392 #define VBOX_PCI_EXP_LNKSTA_TR_ERR 0x0400 /* Training Error (obsolete) */ 393 #define VBOX_PCI_EXP_LNKSTA_TRAIN 0x0800 /* Link Training */ 394 #define VBOX_PCI_EXP_LNKSTA_SL_CLK 0x1000 /* Slot Clock Configuration */ 395 #define VBOX_PCI_EXP_LNKSTA_DL_ACT 0x2000 /* Data Link Layer in DL_Active State */ 396 #define VBOX_PCI_EXP_LNKSTA_BWMGMT 0x4000 /* Bandwidth Mgmt Status */ 397 #define VBOX_PCI_EXP_LNKSTA_AUTBW 0x8000 /* Autonomous Bandwidth Mgmt Status */ 398 399 /* PCI Express slot capabilities (4 bytes, capability offset 20) */ 400 #define VBOX_PCI_EXP_SLTCAP_ATNB 0x0001 /* Attention Button Present */ 401 #define VBOX_PCI_EXP_SLTCAP_PWRC 0x0002 /* Power Controller Present */ 402 #define VBOX_PCI_EXP_SLTCAP_MRL 0x0004 /* MRL Sensor Present */ 403 #define VBOX_PCI_EXP_SLTCAP_ATNI 0x0008 /* Attention Indicator Present */ 404 #define VBOX_PCI_EXP_SLTCAP_PWRI 0x0010 /* Power Indicator Present */ 405 #define VBOX_PCI_EXP_SLTCAP_HPS 0x0020 /* Hot-Plug Surprise */ 406 #define VBOX_PCI_EXP_SLTCAP_HPC 0x0040 /* Hot-Plug Capable */ 407 #define VBOX_PCI_EXP_SLTCAP_PWR_VAL 0x00007f80 /* Slot Power Limit Value */ 408 #define VBOX_PCI_EXP_SLTCAP_PWR_SCL 0x00018000 /* Slot Power Limit Scale */ 409 #define VBOX_PCI_EXP_SLTCAP_INTERLOCK 0x020000 /* Electromechanical Interlock Present */ 410 #define VBOX_PCI_EXP_SLTCAP_NOCMDCOMP 0x040000 /* No Command Completed Support */ 411 #define VBOX_PCI_EXP_SLTCAP_PSN 0xfff80000 /* Physical Slot Number */ 412 413 /* PCI Express slot control (2 bytes, capability offset 24) */ 414 #define VBOX_PCI_EXP_SLTCTL_ATNB 0x0001 /* Attention Button Pressed Enable */ 415 #define VBOX_PCI_EXP_SLTCTL_PWRF 0x0002 /* Power Fault Detected Enable */ 416 #define VBOX_PCI_EXP_SLTCTL_MRLS 0x0004 /* MRL Sensor Changed Enable */ 417 #define VBOX_PCI_EXP_SLTCTL_PRSD 0x0008 /* Presence Detect Changed Enable */ 418 #define VBOX_PCI_EXP_SLTCTL_CMDC 0x0010 /* Command Completed Interrupt Enable */ 419 #define VBOX_PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */ 420 #define VBOX_PCI_EXP_SLTCTL_ATNI 0x00c0 /* Attention Indicator Control */ 421 #define VBOX_PCI_EXP_SLTCTL_PWRI 0x0300 /* Power Indicator Control */ 422 #define VBOX_PCI_EXP_SLTCTL_PWRC 0x0400 /* Power Controller Control */ 423 #define VBOX_PCI_EXP_SLTCTL_INTERLOCK 0x0800 /* Electromechanical Interlock Control */ 424 #define VBOX_PCI_EXP_SLTCTL_LLCHG 0x1000 /* Data Link Layer State Changed Enable */ 425 426 /* PCI Express slot status (2 bytes, capability offset 26) */ 427 #define VBOX_PCI_EXP_SLTSTA_ATNB 0x0001 /* Attention Button Pressed */ 428 #define VBOX_PCI_EXP_SLTSTA_PWRF 0x0002 /* Power Fault Detected */ 429 #define VBOX_PCI_EXP_SLTSTA_MRLS 0x0004 /* MRL Sensor Changed */ 430 #define VBOX_PCI_EXP_SLTSTA_PRSD 0x0008 /* Presence Detect Changed */ 431 #define VBOX_PCI_EXP_SLTSTA_CMDC 0x0010 /* Command Completed */ 432 #define VBOX_PCI_EXP_SLTSTA_MRL_ST 0x0020 /* MRL Sensor State */ 433 #define VBOX_PCI_EXP_SLTSTA_PRES 0x0040 /* Presence Detect State */ 434 #define VBOX_PCI_EXP_SLTSTA_INTERLOCK 0x0080 /* Electromechanical Interlock Status */ 435 #define VBOX_PCI_EXP_SLTSTA_LLCHG 0x0100 /* Data Link Layer State Changed */ 436 437 /* PCI Express root control (2 bytes, capability offset 28) */ 438 #define VBOX_PCI_EXP_RTCTL_SECEE 0x0001 /* System Error on Correctable Error */ 439 #define VBOX_PCI_EXP_RTCTL_SENFEE 0x0002 /* System Error on Non-Fatal Error */ 440 #define VBOX_PCI_EXP_RTCTL_SEFEE 0x0004 /* System Error on Fatal Error */ 441 #define VBOX_PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */ 442 #define VBOX_PCI_EXP_RTCTL_CRSVIS 0x0010 /* Configuration Request Retry Status Visible to SW */ 443 444 /* PCI Express root capabilities (2 bytes, capability offset 30) */ 445 #define VBOX_PCI_EXP_RTCAP_CRSVIS 0x0010 /* Configuration Request Retry Status Visible to SW */ 446 447 /* PCI Express root status (4 bytes, capability offset 32) */ 448 #define VBOX_PCI_EXP_RTSTA_PME_REQID 0x0000ffff /* PME Requester ID */ 449 #define VBOX_PCI_EXP_RTSTA_PME_STATUS 0x00010000 /* PME Status */ 450 #define VBOX_PCI_EXP_RTSTA_PME_PENDING 0x00020000 /* PME is Pending */ 451 304 452 305 453 /**
Note:
See TracChangeset
for help on using the changeset viewer.