diff options
| author | Alex Williamson <alex.williamson@redhat.com> | 2012-06-11 01:27:45 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-12 11:21:42 -0400 |
| commit | a0dee2ed0cdc666b5622f1fc74979355a6b36850 (patch) | |
| tree | a0c04b0b305f99d962797f730abc1e0aec91a87a /include/linux | |
| parent | a6961651408afa9387d6df43c4a1dc4fd35dcb1b (diff) | |
PCI: misc pci_reg additions
Fill in many missing definitions and add sizeof fields for many
sections allowing for more extensive config parsing.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci_regs.h | 113 |
1 files changed, 101 insertions, 12 deletions
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 4b608f543412..526d2c4bc3a6 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | * Under PCI, each device has 256 bytes of configuration address space, | 26 | * Under PCI, each device has 256 bytes of configuration address space, |
| 27 | * of which the first 64 bytes are standardized as follows: | 27 | * of which the first 64 bytes are standardized as follows: |
| 28 | */ | 28 | */ |
| 29 | #define PCI_STD_HEADER_SIZEOF 64 | ||
| 29 | #define PCI_VENDOR_ID 0x00 /* 16 bits */ | 30 | #define PCI_VENDOR_ID 0x00 /* 16 bits */ |
| 30 | #define PCI_DEVICE_ID 0x02 /* 16 bits */ | 31 | #define PCI_DEVICE_ID 0x02 /* 16 bits */ |
| 31 | #define PCI_COMMAND 0x04 /* 16 bits */ | 32 | #define PCI_COMMAND 0x04 /* 16 bits */ |
| @@ -209,9 +210,12 @@ | |||
| 209 | #define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */ | 210 | #define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */ |
| 210 | #define PCI_CAP_ID_SSVID 0x0D /* Bridge subsystem vendor/device ID */ | 211 | #define PCI_CAP_ID_SSVID 0x0D /* Bridge subsystem vendor/device ID */ |
| 211 | #define PCI_CAP_ID_AGP3 0x0E /* AGP Target PCI-PCI bridge */ | 212 | #define PCI_CAP_ID_AGP3 0x0E /* AGP Target PCI-PCI bridge */ |
| 213 | #define PCI_CAP_ID_SECDEV 0x0F /* Secure Device */ | ||
| 212 | #define PCI_CAP_ID_EXP 0x10 /* PCI Express */ | 214 | #define PCI_CAP_ID_EXP 0x10 /* PCI Express */ |
| 213 | #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ | 215 | #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ |
| 216 | #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ | ||
| 214 | #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ | 217 | #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ |
| 218 | #define PCI_CAP_ID_MAX PCI_CAP_ID_AF | ||
| 215 | #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ | 219 | #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ |
| 216 | #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ | 220 | #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ |
| 217 | #define PCI_CAP_SIZEOF 4 | 221 | #define PCI_CAP_SIZEOF 4 |
| @@ -276,6 +280,7 @@ | |||
| 276 | #define PCI_VPD_ADDR_MASK 0x7fff /* Address mask */ | 280 | #define PCI_VPD_ADDR_MASK 0x7fff /* Address mask */ |
| 277 | #define PCI_VPD_ADDR_F 0x8000 /* Write 0, 1 indicates completion */ | 281 | #define PCI_VPD_ADDR_F 0x8000 /* Write 0, 1 indicates completion */ |
| 278 | #define PCI_VPD_DATA 4 /* 32-bits of data returned here */ | 282 | #define PCI_VPD_DATA 4 /* 32-bits of data returned here */ |
| 283 | #define PCI_CAP_VPD_SIZEOF 8 | ||
| 279 | 284 | ||
| 280 | /* Slot Identification */ | 285 | /* Slot Identification */ |
| 281 | 286 | ||
| @@ -297,8 +302,10 @@ | |||
| 297 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ | 302 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ |
| 298 | #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ | 303 | #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ |
| 299 | #define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */ | 304 | #define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */ |
| 305 | #define PCI_MSI_PENDING_32 16 /* Pending intrs for 32-bit devices */ | ||
| 300 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ | 306 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ |
| 301 | #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ | 307 | #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ |
| 308 | #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ | ||
| 302 | 309 | ||
| 303 | /* MSI-X registers */ | 310 | /* MSI-X registers */ |
| 304 | #define PCI_MSIX_FLAGS 2 | 311 | #define PCI_MSIX_FLAGS 2 |
| @@ -308,6 +315,7 @@ | |||
| 308 | #define PCI_MSIX_TABLE 4 | 315 | #define PCI_MSIX_TABLE 4 |
| 309 | #define PCI_MSIX_PBA 8 | 316 | #define PCI_MSIX_PBA 8 |
| 310 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | 317 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) |
| 318 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ | ||
| 311 | 319 | ||
| 312 | /* MSI-X entry's format */ | 320 | /* MSI-X entry's format */ |
| 313 | #define PCI_MSIX_ENTRY_SIZE 16 | 321 | #define PCI_MSIX_ENTRY_SIZE 16 |
| @@ -338,6 +346,7 @@ | |||
| 338 | #define PCI_AF_CTRL_FLR 0x01 | 346 | #define PCI_AF_CTRL_FLR 0x01 |
| 339 | #define PCI_AF_STATUS 5 | 347 | #define PCI_AF_STATUS 5 |
| 340 | #define PCI_AF_STATUS_TP 0x01 | 348 | #define PCI_AF_STATUS_TP 0x01 |
| 349 | #define PCI_CAP_AF_SIZEOF 6 /* size of AF registers */ | ||
| 341 | 350 | ||
| 342 | /* PCI-X registers */ | 351 | /* PCI-X registers */ |
| 343 | 352 | ||
| @@ -374,6 +383,10 @@ | |||
| 374 | #define PCI_X_STATUS_SPL_ERR 0x20000000 /* Rcvd Split Completion Error Msg */ | 383 | #define PCI_X_STATUS_SPL_ERR 0x20000000 /* Rcvd Split Completion Error Msg */ |
| 375 | #define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ | 384 | #define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ |
| 376 | #define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ | 385 | #define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ |
| 386 | #define PCI_X_ECC_CSR 8 /* ECC control and status */ | ||
| 387 | #define PCI_CAP_PCIX_SIZEOF_V0 8 /* size of registers for Version 0 */ | ||
| 388 | #define PCI_CAP_PCIX_SIZEOF_V1 24 /* size for Version 1 */ | ||
| 389 | #define PCI_CAP_PCIX_SIZEOF_V2 PCI_CAP_PCIX_SIZEOF_V1 /* Same for v2 */ | ||
| 377 | 390 | ||
| 378 | /* PCI Bridge Subsystem ID registers */ | 391 | /* PCI Bridge Subsystem ID registers */ |
| 379 | 392 | ||
| @@ -462,6 +475,7 @@ | |||
| 462 | #define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */ | 475 | #define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */ |
| 463 | #define PCI_EXP_LNKSTA_LBMS 0x4000 /* Link Bandwidth Management Status */ | 476 | #define PCI_EXP_LNKSTA_LBMS 0x4000 /* Link Bandwidth Management Status */ |
| 464 | #define PCI_EXP_LNKSTA_LABS 0x8000 /* Link Autonomous Bandwidth Status */ | 477 | #define PCI_EXP_LNKSTA_LABS 0x8000 /* Link Autonomous Bandwidth Status */ |
| 478 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V1 20 /* v1 endpoints end here */ | ||
| 465 | #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ | 479 | #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ |
| 466 | #define PCI_EXP_SLTCAP_ABP 0x00000001 /* Attention Button Present */ | 480 | #define PCI_EXP_SLTCAP_ABP 0x00000001 /* Attention Button Present */ |
| 467 | #define PCI_EXP_SLTCAP_PCP 0x00000002 /* Power Controller Present */ | 481 | #define PCI_EXP_SLTCAP_PCP 0x00000002 /* Power Controller Present */ |
| @@ -521,6 +535,7 @@ | |||
| 521 | #define PCI_EXP_OBFF_MSGA_EN 0x2000 /* OBFF enable with Message type A */ | 535 | #define PCI_EXP_OBFF_MSGA_EN 0x2000 /* OBFF enable with Message type A */ |
| 522 | #define PCI_EXP_OBFF_MSGB_EN 0x4000 /* OBFF enable with Message type B */ | 536 | #define PCI_EXP_OBFF_MSGB_EN 0x4000 /* OBFF enable with Message type B */ |
| 523 | #define PCI_EXP_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ | 537 | #define PCI_EXP_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ |
| 538 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints end here */ | ||
| 524 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ | 539 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ |
| 525 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ | 540 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ |
| 526 | 541 | ||
| @@ -529,23 +544,43 @@ | |||
| 529 | #define PCI_EXT_CAP_VER(header) ((header >> 16) & 0xf) | 544 | #define PCI_EXT_CAP_VER(header) ((header >> 16) & 0xf) |
| 530 | #define PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc) | 545 | #define PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc) |
| 531 | 546 | ||
| 532 | #define PCI_EXT_CAP_ID_ERR 1 | 547 | #define PCI_EXT_CAP_ID_ERR 0x01 /* Advanced Error Reporting */ |
| 533 | #define PCI_EXT_CAP_ID_VC 2 | 548 | #define PCI_EXT_CAP_ID_VC 0x02 /* Virtual Channel Capability */ |
| 534 | #define PCI_EXT_CAP_ID_DSN 3 | 549 | #define PCI_EXT_CAP_ID_DSN 0x03 /* Device Serial Number */ |
| 535 | #define PCI_EXT_CAP_ID_PWR 4 | 550 | #define PCI_EXT_CAP_ID_PWR 0x04 /* Power Budgeting */ |
| 536 | #define PCI_EXT_CAP_ID_VNDR 11 | 551 | #define PCI_EXT_CAP_ID_RCLD 0x05 /* Root Complex Link Declaration */ |
| 537 | #define PCI_EXT_CAP_ID_ACS 13 | 552 | #define PCI_EXT_CAP_ID_RCILC 0x06 /* Root Complex Internal Link Control */ |
| 538 | #define PCI_EXT_CAP_ID_ARI 14 | 553 | #define PCI_EXT_CAP_ID_RCEC 0x07 /* Root Complex Event Collector */ |
| 539 | #define PCI_EXT_CAP_ID_ATS 15 | 554 | #define PCI_EXT_CAP_ID_MFVC 0x08 /* Multi-Function VC Capability */ |
| 540 | #define PCI_EXT_CAP_ID_SRIOV 16 | 555 | #define PCI_EXT_CAP_ID_VC9 0x09 /* same as _VC */ |
| 541 | #define PCI_EXT_CAP_ID_PRI 19 | 556 | #define PCI_EXT_CAP_ID_RCRB 0x0A /* Root Complex RB? */ |
| 542 | #define PCI_EXT_CAP_ID_LTR 24 | 557 | #define PCI_EXT_CAP_ID_VNDR 0x0B /* Vendor Specific */ |
| 543 | #define PCI_EXT_CAP_ID_PASID 27 | 558 | #define PCI_EXT_CAP_ID_CAC 0x0C /* Config Access - obsolete */ |
| 559 | #define PCI_EXT_CAP_ID_ACS 0x0D /* Access Control Services */ | ||
| 560 | #define PCI_EXT_CAP_ID_ARI 0x0E /* Alternate Routing ID */ | ||
| 561 | #define PCI_EXT_CAP_ID_ATS 0x0F /* Address Translation Services */ | ||
| 562 | #define PCI_EXT_CAP_ID_SRIOV 0x10 /* Single Root I/O Virtualization */ | ||
| 563 | #define PCI_EXT_CAP_ID_MRIOV 0x11 /* Multi Root I/O Virtualization */ | ||
| 564 | #define PCI_EXT_CAP_ID_MCAST 0x12 /* Multicast */ | ||
| 565 | #define PCI_EXT_CAP_ID_PRI 0x13 /* Page Request Interface */ | ||
| 566 | #define PCI_EXT_CAP_ID_AMD_XXX 0x14 /* reserved for AMD */ | ||
| 567 | #define PCI_EXT_CAP_ID_REBAR 0x15 /* resizable BAR */ | ||
| 568 | #define PCI_EXT_CAP_ID_DPA 0x16 /* dynamic power alloc */ | ||
| 569 | #define PCI_EXT_CAP_ID_TPH 0x17 /* TPH request */ | ||
| 570 | #define PCI_EXT_CAP_ID_LTR 0x18 /* latency tolerance reporting */ | ||
| 571 | #define PCI_EXT_CAP_ID_SECPCI 0x19 /* Secondary PCIe */ | ||
| 572 | #define PCI_EXT_CAP_ID_PMUX 0x1A /* Protocol Multiplexing */ | ||
| 573 | #define PCI_EXT_CAP_ID_PASID 0x1B /* Process Address Space ID */ | ||
| 574 | #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PASID | ||
| 575 | |||
| 576 | #define PCI_EXT_CAP_DSN_SIZEOF 12 | ||
| 577 | #define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40 | ||
| 544 | 578 | ||
| 545 | /* Advanced Error Reporting */ | 579 | /* Advanced Error Reporting */ |
| 546 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ | 580 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ |
| 547 | #define PCI_ERR_UNC_TRAIN 0x00000001 /* Training */ | 581 | #define PCI_ERR_UNC_TRAIN 0x00000001 /* Training */ |
| 548 | #define PCI_ERR_UNC_DLP 0x00000010 /* Data Link Protocol */ | 582 | #define PCI_ERR_UNC_DLP 0x00000010 /* Data Link Protocol */ |
| 583 | #define PCI_ERR_UNC_SURPDN 0x00000020 /* Surprise Down */ | ||
| 549 | #define PCI_ERR_UNC_POISON_TLP 0x00001000 /* Poisoned TLP */ | 584 | #define PCI_ERR_UNC_POISON_TLP 0x00001000 /* Poisoned TLP */ |
| 550 | #define PCI_ERR_UNC_FCP 0x00002000 /* Flow Control Protocol */ | 585 | #define PCI_ERR_UNC_FCP 0x00002000 /* Flow Control Protocol */ |
| 551 | #define PCI_ERR_UNC_COMP_TIME 0x00004000 /* Completion Timeout */ | 586 | #define PCI_ERR_UNC_COMP_TIME 0x00004000 /* Completion Timeout */ |
| @@ -555,6 +590,11 @@ | |||
| 555 | #define PCI_ERR_UNC_MALF_TLP 0x00040000 /* Malformed TLP */ | 590 | #define PCI_ERR_UNC_MALF_TLP 0x00040000 /* Malformed TLP */ |
| 556 | #define PCI_ERR_UNC_ECRC 0x00080000 /* ECRC Error Status */ | 591 | #define PCI_ERR_UNC_ECRC 0x00080000 /* ECRC Error Status */ |
| 557 | #define PCI_ERR_UNC_UNSUP 0x00100000 /* Unsupported Request */ | 592 | #define PCI_ERR_UNC_UNSUP 0x00100000 /* Unsupported Request */ |
| 593 | #define PCI_ERR_UNC_ACSV 0x00200000 /* ACS Violation */ | ||
| 594 | #define PCI_ERR_UNC_INTN 0x00400000 /* internal error */ | ||
| 595 | #define PCI_ERR_UNC_MCBTLP 0x00800000 /* MC blocked TLP */ | ||
| 596 | #define PCI_ERR_UNC_ATOMEG 0x01000000 /* Atomic egress blocked */ | ||
| 597 | #define PCI_ERR_UNC_TLPPRE 0x02000000 /* TLP prefix blocked */ | ||
| 558 | #define PCI_ERR_UNCOR_MASK 8 /* Uncorrectable Error Mask */ | 598 | #define PCI_ERR_UNCOR_MASK 8 /* Uncorrectable Error Mask */ |
| 559 | /* Same bits as above */ | 599 | /* Same bits as above */ |
| 560 | #define PCI_ERR_UNCOR_SEVER 12 /* Uncorrectable Error Severity */ | 600 | #define PCI_ERR_UNCOR_SEVER 12 /* Uncorrectable Error Severity */ |
| @@ -565,6 +605,9 @@ | |||
| 565 | #define PCI_ERR_COR_BAD_DLLP 0x00000080 /* Bad DLLP Status */ | 605 | #define PCI_ERR_COR_BAD_DLLP 0x00000080 /* Bad DLLP Status */ |
| 566 | #define PCI_ERR_COR_REP_ROLL 0x00000100 /* REPLAY_NUM Rollover */ | 606 | #define PCI_ERR_COR_REP_ROLL 0x00000100 /* REPLAY_NUM Rollover */ |
| 567 | #define PCI_ERR_COR_REP_TIMER 0x00001000 /* Replay Timer Timeout */ | 607 | #define PCI_ERR_COR_REP_TIMER 0x00001000 /* Replay Timer Timeout */ |
| 608 | #define PCI_ERR_COR_ADV_NFAT 0x00002000 /* Advisory Non-Fatal */ | ||
| 609 | #define PCI_ERR_COR_INTERNAL 0x00004000 /* Corrected Internal */ | ||
| 610 | #define PCI_ERR_COR_LOG_OVER 0x00008000 /* Header Log Overflow */ | ||
| 568 | #define PCI_ERR_COR_MASK 20 /* Correctable Error Mask */ | 611 | #define PCI_ERR_COR_MASK 20 /* Correctable Error Mask */ |
| 569 | /* Same bits as above */ | 612 | /* Same bits as above */ |
| 570 | #define PCI_ERR_CAP 24 /* Advanced Error Capabilities */ | 613 | #define PCI_ERR_CAP 24 /* Advanced Error Capabilities */ |
| @@ -596,12 +639,18 @@ | |||
| 596 | 639 | ||
| 597 | /* Virtual Channel */ | 640 | /* Virtual Channel */ |
| 598 | #define PCI_VC_PORT_REG1 4 | 641 | #define PCI_VC_PORT_REG1 4 |
| 642 | #define PCI_VC_REG1_EVCC 0x7 /* extended vc count */ | ||
| 599 | #define PCI_VC_PORT_REG2 8 | 643 | #define PCI_VC_PORT_REG2 8 |
| 644 | #define PCI_VC_REG2_32_PHASE 0x2 | ||
| 645 | #define PCI_VC_REG2_64_PHASE 0x4 | ||
| 646 | #define PCI_VC_REG2_128_PHASE 0x8 | ||
| 600 | #define PCI_VC_PORT_CTRL 12 | 647 | #define PCI_VC_PORT_CTRL 12 |
| 601 | #define PCI_VC_PORT_STATUS 14 | 648 | #define PCI_VC_PORT_STATUS 14 |
| 602 | #define PCI_VC_RES_CAP 16 | 649 | #define PCI_VC_RES_CAP 16 |
| 603 | #define PCI_VC_RES_CTRL 20 | 650 | #define PCI_VC_RES_CTRL 20 |
| 604 | #define PCI_VC_RES_STATUS 26 | 651 | #define PCI_VC_RES_STATUS 26 |
| 652 | #define PCI_CAP_VC_BASE_SIZEOF 0x10 | ||
| 653 | #define PCI_CAP_VC_PER_VC_SIZEOF 0x0C | ||
| 605 | 654 | ||
| 606 | /* Power Budgeting */ | 655 | /* Power Budgeting */ |
| 607 | #define PCI_PWR_DSR 4 /* Data Select Register */ | 656 | #define PCI_PWR_DSR 4 /* Data Select Register */ |
| @@ -614,6 +663,7 @@ | |||
| 614 | #define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7) /* Power Rail */ | 663 | #define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7) /* Power Rail */ |
| 615 | #define PCI_PWR_CAP 12 /* Capability */ | 664 | #define PCI_PWR_CAP 12 /* Capability */ |
| 616 | #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ | 665 | #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ |
| 666 | #define PCI_EXT_CAP_PWR_SIZEOF 16 | ||
| 617 | 667 | ||
| 618 | /* | 668 | /* |
| 619 | * Hypertransport sub capability types | 669 | * Hypertransport sub capability types |
| @@ -646,6 +696,8 @@ | |||
| 646 | #define HT_CAPTYPE_ERROR_RETRY 0xC0 /* Retry on error configuration */ | 696 | #define HT_CAPTYPE_ERROR_RETRY 0xC0 /* Retry on error configuration */ |
| 647 | #define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */ | 697 | #define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */ |
| 648 | #define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */ | 698 | #define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */ |
| 699 | #define HT_CAP_SIZEOF_LONG 28 /* slave & primary */ | ||
| 700 | #define HT_CAP_SIZEOF_SHORT 24 /* host & secondary */ | ||
| 649 | 701 | ||
| 650 | /* Alternative Routing-ID Interpretation */ | 702 | /* Alternative Routing-ID Interpretation */ |
| 651 | #define PCI_ARI_CAP 0x04 /* ARI Capability Register */ | 703 | #define PCI_ARI_CAP 0x04 /* ARI Capability Register */ |
| @@ -656,6 +708,7 @@ | |||
| 656 | #define PCI_ARI_CTRL_MFVC 0x0001 /* MFVC Function Groups Enable */ | 708 | #define PCI_ARI_CTRL_MFVC 0x0001 /* MFVC Function Groups Enable */ |
| 657 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ | 709 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ |
| 658 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ | 710 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ |
| 711 | #define PCI_EXT_CAP_ARI_SIZEOF 8 | ||
| 659 | 712 | ||
| 660 | /* Address Translation Service */ | 713 | /* Address Translation Service */ |
| 661 | #define PCI_ATS_CAP 0x04 /* ATS Capability Register */ | 714 | #define PCI_ATS_CAP 0x04 /* ATS Capability Register */ |
| @@ -665,6 +718,7 @@ | |||
| 665 | #define PCI_ATS_CTRL_ENABLE 0x8000 /* ATS Enable */ | 718 | #define PCI_ATS_CTRL_ENABLE 0x8000 /* ATS Enable */ |
| 666 | #define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */ | 719 | #define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */ |
| 667 | #define PCI_ATS_MIN_STU 12 /* shift of minimum STU block */ | 720 | #define PCI_ATS_MIN_STU 12 /* shift of minimum STU block */ |
| 721 | #define PCI_EXT_CAP_ATS_SIZEOF 8 | ||
| 668 | 722 | ||
| 669 | /* Page Request Interface */ | 723 | /* Page Request Interface */ |
| 670 | #define PCI_PRI_CTRL 0x04 /* PRI control register */ | 724 | #define PCI_PRI_CTRL 0x04 /* PRI control register */ |
| @@ -676,6 +730,7 @@ | |||
| 676 | #define PCI_PRI_STATUS_STOPPED 0x100 /* PRI Stopped */ | 730 | #define PCI_PRI_STATUS_STOPPED 0x100 /* PRI Stopped */ |
| 677 | #define PCI_PRI_MAX_REQ 0x08 /* PRI max reqs supported */ | 731 | #define PCI_PRI_MAX_REQ 0x08 /* PRI max reqs supported */ |
| 678 | #define PCI_PRI_ALLOC_REQ 0x0c /* PRI max reqs allowed */ | 732 | #define PCI_PRI_ALLOC_REQ 0x0c /* PRI max reqs allowed */ |
| 733 | #define PCI_EXT_CAP_PRI_SIZEOF 16 | ||
| 679 | 734 | ||
| 680 | /* PASID capability */ | 735 | /* PASID capability */ |
| 681 | #define PCI_PASID_CAP 0x04 /* PASID feature register */ | 736 | #define PCI_PASID_CAP 0x04 /* PASID feature register */ |
| @@ -685,6 +740,7 @@ | |||
| 685 | #define PCI_PASID_CTRL_ENABLE 0x01 /* Enable bit */ | 740 | #define PCI_PASID_CTRL_ENABLE 0x01 /* Enable bit */ |
| 686 | #define PCI_PASID_CTRL_EXEC 0x02 /* Exec permissions Enable */ | 741 | #define PCI_PASID_CTRL_EXEC 0x02 /* Exec permissions Enable */ |
| 687 | #define PCI_PASID_CTRL_PRIV 0x04 /* Priviledge Mode Enable */ | 742 | #define PCI_PASID_CTRL_PRIV 0x04 /* Priviledge Mode Enable */ |
| 743 | #define PCI_EXT_CAP_PASID_SIZEOF 8 | ||
| 688 | 744 | ||
| 689 | /* Single Root I/O Virtualization */ | 745 | /* Single Root I/O Virtualization */ |
| 690 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ | 746 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ |
| @@ -716,12 +772,14 @@ | |||
| 716 | #define PCI_SRIOV_VFM_MI 0x1 /* Dormant.MigrateIn */ | 772 | #define PCI_SRIOV_VFM_MI 0x1 /* Dormant.MigrateIn */ |
| 717 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ | 773 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ |
| 718 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ | 774 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ |
| 775 | #define PCI_EXT_CAP_SRIOV_SIZEOF 64 | ||
| 719 | 776 | ||
| 720 | #define PCI_LTR_MAX_SNOOP_LAT 0x4 | 777 | #define PCI_LTR_MAX_SNOOP_LAT 0x4 |
| 721 | #define PCI_LTR_MAX_NOSNOOP_LAT 0x6 | 778 | #define PCI_LTR_MAX_NOSNOOP_LAT 0x6 |
| 722 | #define PCI_LTR_VALUE_MASK 0x000003ff | 779 | #define PCI_LTR_VALUE_MASK 0x000003ff |
| 723 | #define PCI_LTR_SCALE_MASK 0x00001c00 | 780 | #define PCI_LTR_SCALE_MASK 0x00001c00 |
| 724 | #define PCI_LTR_SCALE_SHIFT 10 | 781 | #define PCI_LTR_SCALE_SHIFT 10 |
| 782 | #define PCI_EXT_CAP_LTR_SIZEOF 8 | ||
| 725 | 783 | ||
| 726 | /* Access Control Service */ | 784 | /* Access Control Service */ |
| 727 | #define PCI_ACS_CAP 0x04 /* ACS Capability Register */ | 785 | #define PCI_ACS_CAP 0x04 /* ACS Capability Register */ |
| @@ -732,7 +790,38 @@ | |||
| 732 | #define PCI_ACS_UF 0x10 /* Upstream Forwarding */ | 790 | #define PCI_ACS_UF 0x10 /* Upstream Forwarding */ |
| 733 | #define PCI_ACS_EC 0x20 /* P2P Egress Control */ | 791 | #define PCI_ACS_EC 0x20 /* P2P Egress Control */ |
| 734 | #define PCI_ACS_DT 0x40 /* Direct Translated P2P */ | 792 | #define PCI_ACS_DT 0x40 /* Direct Translated P2P */ |
| 793 | #define PCI_ACS_EGRESS_BITS 0x05 /* ACS Egress Control Vector Size */ | ||
| 735 | #define PCI_ACS_CTRL 0x06 /* ACS Control Register */ | 794 | #define PCI_ACS_CTRL 0x06 /* ACS Control Register */ |
| 736 | #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */ | 795 | #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */ |
| 737 | 796 | ||
| 797 | #define PCI_VSEC_HDR 4 /* extended cap - vendor specific */ | ||
| 798 | #define PCI_VSEC_HDR_LEN_SHIFT 20 /* shift for length field */ | ||
| 799 | |||
| 800 | /* sata capability */ | ||
| 801 | #define PCI_SATA_REGS 4 /* SATA REGs specifier */ | ||
| 802 | #define PCI_SATA_REGS_MASK 0xF /* location - BAR#/inline */ | ||
| 803 | #define PCI_SATA_REGS_INLINE 0xF /* REGS in config space */ | ||
| 804 | #define PCI_SATA_SIZEOF_SHORT 8 | ||
| 805 | #define PCI_SATA_SIZEOF_LONG 16 | ||
| 806 | |||
| 807 | /* resizable BARs */ | ||
| 808 | #define PCI_REBAR_CTRL 8 /* control register */ | ||
| 809 | #define PCI_REBAR_CTRL_NBAR_MASK (7 << 5) /* mask for # bars */ | ||
| 810 | #define PCI_REBAR_CTRL_NBAR_SHIFT 5 /* shift for # bars */ | ||
| 811 | |||
| 812 | /* dynamic power allocation */ | ||
| 813 | #define PCI_DPA_CAP 4 /* capability register */ | ||
| 814 | #define PCI_DPA_CAP_SUBSTATE_MASK 0x1F /* # substates - 1 */ | ||
| 815 | #define PCI_DPA_BASE_SIZEOF 16 /* size with 0 substates */ | ||
| 816 | |||
| 817 | /* TPH Requester */ | ||
| 818 | #define PCI_TPH_CAP 4 /* capability register */ | ||
| 819 | #define PCI_TPH_CAP_LOC_MASK 0x600 /* location mask */ | ||
| 820 | #define PCI_TPH_LOC_NONE 0x000 /* no location */ | ||
| 821 | #define PCI_TPH_LOC_CAP 0x200 /* in capability */ | ||
| 822 | #define PCI_TPH_LOC_MSIX 0x400 /* in MSI-X */ | ||
| 823 | #define PCI_TPH_CAP_ST_MASK 0x07FF0000 /* st table mask */ | ||
| 824 | #define PCI_TPH_CAP_ST_SHIFT 16 /* st table shift */ | ||
| 825 | #define PCI_TPH_BASE_SIZEOF 12 /* size with no st table */ | ||
| 826 | |||
| 738 | #endif /* LINUX_PCI_REGS_H */ | 827 | #endif /* LINUX_PCI_REGS_H */ |
