linux/include/uapi/linux/pci_regs.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 *	PCI standard defines
 *	Copyright 1994, Drew Eckhardt
 *	Copyright 1997--1999 Martin Mares <[email protected]>
 *
 *	For more information, please consult the following manuals (look at
 *	http://www.pcisig.com/ for how to get them):
 *
 *	PCI BIOS Specification
 *	PCI Local Bus Specification
 *	PCI to PCI Bridge Specification
 *	PCI System Design Guide
 *
 *	For HyperTransport information, please consult the following manuals
 *	from http://www.hypertransport.org :
 *
 *	The HyperTransport I/O Link Specification
 */

#ifndef LINUX_PCI_REGS_H
#define LINUX_PCI_REGS_H

/*
 * Conventional PCI and PCI-X Mode 1 devices have 256 bytes of
 * configuration space.  PCI-X Mode 2 and PCIe devices have 4096 bytes of
 * configuration space.
 */
#define PCI_CFG_SPACE_SIZE
#define PCI_CFG_SPACE_EXP_SIZE

/*
 * Under PCI, each device has 256 bytes of configuration address space,
 * of which the first 64 bytes are standardized as follows:
 */
#define PCI_STD_HEADER_SIZEOF
#define PCI_STD_NUM_BARS
#define PCI_VENDOR_ID
#define PCI_DEVICE_ID
#define PCI_COMMAND
#define PCI_COMMAND_IO
#define PCI_COMMAND_MEMORY
#define PCI_COMMAND_MASTER
#define PCI_COMMAND_SPECIAL
#define PCI_COMMAND_INVALIDATE
#define PCI_COMMAND_VGA_PALETTE
#define PCI_COMMAND_PARITY
#define PCI_COMMAND_WAIT
#define PCI_COMMAND_SERR
#define PCI_COMMAND_FAST_BACK
#define PCI_COMMAND_INTX_DISABLE

#define PCI_STATUS
#define PCI_STATUS_IMM_READY
#define PCI_STATUS_INTERRUPT
#define PCI_STATUS_CAP_LIST
#define PCI_STATUS_66MHZ
#define PCI_STATUS_UDF
#define PCI_STATUS_FAST_BACK
#define PCI_STATUS_PARITY
#define PCI_STATUS_DEVSEL_MASK
#define PCI_STATUS_DEVSEL_FAST
#define PCI_STATUS_DEVSEL_MEDIUM
#define PCI_STATUS_DEVSEL_SLOW
#define PCI_STATUS_SIG_TARGET_ABORT
#define PCI_STATUS_REC_TARGET_ABORT
#define PCI_STATUS_REC_MASTER_ABORT
#define PCI_STATUS_SIG_SYSTEM_ERROR
#define PCI_STATUS_DETECTED_PARITY

#define PCI_CLASS_REVISION
#define PCI_REVISION_ID
#define PCI_CLASS_PROG
#define PCI_CLASS_DEVICE

#define PCI_CACHE_LINE_SIZE
#define PCI_LATENCY_TIMER
#define PCI_HEADER_TYPE
#define PCI_HEADER_TYPE_MASK
#define PCI_HEADER_TYPE_NORMAL
#define PCI_HEADER_TYPE_BRIDGE
#define PCI_HEADER_TYPE_CARDBUS
#define PCI_HEADER_TYPE_MFD

#define PCI_BIST
#define PCI_BIST_CODE_MASK
#define PCI_BIST_START
#define PCI_BIST_CAPABLE

/*
 * Base addresses specify locations in memory or I/O space.
 * Decoded size can be determined by writing a value of
 * 0xffffffff to the register, and reading it back.  Only
 * 1 bits are decoded.
 */
#define PCI_BASE_ADDRESS_0
#define PCI_BASE_ADDRESS_1
#define PCI_BASE_ADDRESS_2
#define PCI_BASE_ADDRESS_3
#define PCI_BASE_ADDRESS_4
#define PCI_BASE_ADDRESS_5
#define PCI_BASE_ADDRESS_SPACE
#define PCI_BASE_ADDRESS_SPACE_IO
#define PCI_BASE_ADDRESS_SPACE_MEMORY
#define PCI_BASE_ADDRESS_MEM_TYPE_MASK
#define PCI_BASE_ADDRESS_MEM_TYPE_32
#define PCI_BASE_ADDRESS_MEM_TYPE_1M
#define PCI_BASE_ADDRESS_MEM_TYPE_64
#define PCI_BASE_ADDRESS_MEM_PREFETCH
#define PCI_BASE_ADDRESS_MEM_MASK
#define PCI_BASE_ADDRESS_IO_MASK
/* bit 1 is reserved if address_space = 1 */

/* Header type 0 (normal devices) */
#define PCI_CARDBUS_CIS
#define PCI_SUBSYSTEM_VENDOR_ID
#define PCI_SUBSYSTEM_ID
#define PCI_ROM_ADDRESS
#define PCI_ROM_ADDRESS_ENABLE
#define PCI_ROM_ADDRESS_MASK

#define PCI_CAPABILITY_LIST

/* 0x35-0x3b are reserved */
#define PCI_INTERRUPT_LINE
#define PCI_INTERRUPT_PIN
#define PCI_MIN_GNT
#define PCI_MAX_LAT

/* Header type 1 (PCI-to-PCI bridges) */
#define PCI_PRIMARY_BUS
#define PCI_SECONDARY_BUS
#define PCI_SUBORDINATE_BUS
#define PCI_SEC_LATENCY_TIMER
#define PCI_IO_BASE
#define PCI_IO_LIMIT
#define PCI_IO_RANGE_TYPE_MASK
#define PCI_IO_RANGE_TYPE_16
#define PCI_IO_RANGE_TYPE_32
#define PCI_IO_RANGE_MASK
#define PCI_IO_1K_RANGE_MASK
#define PCI_SEC_STATUS
#define PCI_MEMORY_BASE
#define PCI_MEMORY_LIMIT
#define PCI_MEMORY_RANGE_TYPE_MASK
#define PCI_MEMORY_RANGE_MASK
#define PCI_PREF_MEMORY_BASE
#define PCI_PREF_MEMORY_LIMIT
#define PCI_PREF_RANGE_TYPE_MASK
#define PCI_PREF_RANGE_TYPE_32
#define PCI_PREF_RANGE_TYPE_64
#define PCI_PREF_RANGE_MASK
#define PCI_PREF_BASE_UPPER32
#define PCI_PREF_LIMIT_UPPER32
#define PCI_IO_BASE_UPPER16
#define PCI_IO_LIMIT_UPPER16
/* 0x34 same as for htype 0 */
/* 0x35-0x3b is reserved */
#define PCI_ROM_ADDRESS1
/* 0x3c-0x3d are same as for htype 0 */
#define PCI_BRIDGE_CONTROL
#define PCI_BRIDGE_CTL_PARITY
#define PCI_BRIDGE_CTL_SERR
#define PCI_BRIDGE_CTL_ISA
#define PCI_BRIDGE_CTL_VGA
#define PCI_BRIDGE_CTL_MASTER_ABORT
#define PCI_BRIDGE_CTL_BUS_RESET
#define PCI_BRIDGE_CTL_FAST_BACK

/* Header type 2 (CardBus bridges) */
#define PCI_CB_CAPABILITY_LIST
/* 0x15 reserved */
#define PCI_CB_SEC_STATUS
#define PCI_CB_PRIMARY_BUS
#define PCI_CB_CARD_BUS
#define PCI_CB_SUBORDINATE_BUS
#define PCI_CB_LATENCY_TIMER
#define PCI_CB_MEMORY_BASE_0
#define PCI_CB_MEMORY_LIMIT_0
#define PCI_CB_MEMORY_BASE_1
#define PCI_CB_MEMORY_LIMIT_1
#define PCI_CB_IO_BASE_0
#define PCI_CB_IO_BASE_0_HI
#define PCI_CB_IO_LIMIT_0
#define PCI_CB_IO_LIMIT_0_HI
#define PCI_CB_IO_BASE_1
#define PCI_CB_IO_BASE_1_HI
#define PCI_CB_IO_LIMIT_1
#define PCI_CB_IO_LIMIT_1_HI
#define PCI_CB_IO_RANGE_MASK
/* 0x3c-0x3d are same as for htype 0 */
#define PCI_CB_BRIDGE_CONTROL
#define PCI_CB_BRIDGE_CTL_PARITY
#define PCI_CB_BRIDGE_CTL_SERR
#define PCI_CB_BRIDGE_CTL_ISA
#define PCI_CB_BRIDGE_CTL_VGA
#define PCI_CB_BRIDGE_CTL_MASTER_ABORT
#define PCI_CB_BRIDGE_CTL_CB_RESET
#define PCI_CB_BRIDGE_CTL_16BIT_INT
#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM0
#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM1
#define PCI_CB_BRIDGE_CTL_POST_WRITES
#define PCI_CB_SUBSYSTEM_VENDOR_ID
#define PCI_CB_SUBSYSTEM_ID
#define PCI_CB_LEGACY_MODE_BASE
/* 0x48-0x7f reserved */

/* Capability lists */

#define PCI_CAP_LIST_ID
#define PCI_CAP_ID_PM
#define PCI_CAP_ID_AGP
#define PCI_CAP_ID_VPD
#define PCI_CAP_ID_SLOTID
#define PCI_CAP_ID_MSI
#define PCI_CAP_ID_CHSWP
#define PCI_CAP_ID_PCIX
#define PCI_CAP_ID_HT
#define PCI_CAP_ID_VNDR
#define PCI_CAP_ID_DBG
#define PCI_CAP_ID_CCRC
#define PCI_CAP_ID_SHPC
#define PCI_CAP_ID_SSVID
#define PCI_CAP_ID_AGP3
#define PCI_CAP_ID_SECDEV
#define PCI_CAP_ID_EXP
#define PCI_CAP_ID_MSIX
#define PCI_CAP_ID_SATA
#define PCI_CAP_ID_AF
#define PCI_CAP_ID_EA
#define PCI_CAP_ID_MAX
#define PCI_CAP_LIST_NEXT
#define PCI_CAP_FLAGS
#define PCI_CAP_SIZEOF

/* Power Management Registers */

#define PCI_PM_PMC
#define PCI_PM_CAP_VER_MASK
#define PCI_PM_CAP_PME_CLOCK
#define PCI_PM_CAP_RESERVED
#define PCI_PM_CAP_DSI
#define PCI_PM_CAP_AUX_POWER
#define PCI_PM_CAP_D1
#define PCI_PM_CAP_D2
#define PCI_PM_CAP_PME
#define PCI_PM_CAP_PME_MASK
#define PCI_PM_CAP_PME_D0
#define PCI_PM_CAP_PME_D1
#define PCI_PM_CAP_PME_D2
#define PCI_PM_CAP_PME_D3hot
#define PCI_PM_CAP_PME_D3cold
#define PCI_PM_CAP_PME_SHIFT
#define PCI_PM_CTRL
#define PCI_PM_CTRL_STATE_MASK
#define PCI_PM_CTRL_NO_SOFT_RESET
#define PCI_PM_CTRL_PME_ENABLE
#define PCI_PM_CTRL_DATA_SEL_MASK
#define PCI_PM_CTRL_DATA_SCALE_MASK
#define PCI_PM_CTRL_PME_STATUS
#define PCI_PM_PPB_EXTENSIONS
#define PCI_PM_PPB_B2_B3
#define PCI_PM_BPCC_ENABLE
#define PCI_PM_DATA_REGISTER
#define PCI_PM_SIZEOF

/* AGP registers */

#define PCI_AGP_VERSION
#define PCI_AGP_RFU
#define PCI_AGP_STATUS
#define PCI_AGP_STATUS_RQ_MASK
#define PCI_AGP_STATUS_SBA
#define PCI_AGP_STATUS_64BIT
#define PCI_AGP_STATUS_FW
#define PCI_AGP_STATUS_RATE4
#define PCI_AGP_STATUS_RATE2
#define PCI_AGP_STATUS_RATE1
#define PCI_AGP_COMMAND
#define PCI_AGP_COMMAND_RQ_MASK
#define PCI_AGP_COMMAND_SBA
#define PCI_AGP_COMMAND_AGP
#define PCI_AGP_COMMAND_64BIT
#define PCI_AGP_COMMAND_FW
#define PCI_AGP_COMMAND_RATE4
#define PCI_AGP_COMMAND_RATE2
#define PCI_AGP_COMMAND_RATE1
#define PCI_AGP_SIZEOF

/* Vital Product Data */

#define PCI_VPD_ADDR
#define PCI_VPD_ADDR_MASK
#define PCI_VPD_ADDR_F
#define PCI_VPD_DATA
#define PCI_CAP_VPD_SIZEOF

/* Slot Identification */

#define PCI_SID_ESR
#define PCI_SID_ESR_NSLOTS
#define PCI_SID_ESR_FIC
#define PCI_SID_CHASSIS_NR

/* Message Signaled Interrupt registers */

#define PCI_MSI_FLAGS
#define PCI_MSI_FLAGS_ENABLE
#define PCI_MSI_FLAGS_QMASK
#define PCI_MSI_FLAGS_QSIZE
#define PCI_MSI_FLAGS_64BIT
#define PCI_MSI_FLAGS_MASKBIT
#define PCI_MSI_RFU
#define PCI_MSI_ADDRESS_LO
#define PCI_MSI_ADDRESS_HI
#define PCI_MSI_DATA_32
#define PCI_MSI_MASK_32
#define PCI_MSI_PENDING_32
#define PCI_MSI_DATA_64
#define PCI_MSI_MASK_64
#define PCI_MSI_PENDING_64

/* MSI-X registers (in MSI-X capability) */
#define PCI_MSIX_FLAGS
#define PCI_MSIX_FLAGS_QSIZE
#define PCI_MSIX_FLAGS_MASKALL
#define PCI_MSIX_FLAGS_ENABLE
#define PCI_MSIX_TABLE
#define PCI_MSIX_TABLE_BIR
#define PCI_MSIX_TABLE_OFFSET
#define PCI_MSIX_PBA
#define PCI_MSIX_PBA_BIR
#define PCI_MSIX_PBA_OFFSET
#define PCI_MSIX_FLAGS_BIRMASK
#define PCI_CAP_MSIX_SIZEOF

/* MSI-X Table entry format (in memory mapped by a BAR) */
#define PCI_MSIX_ENTRY_SIZE
#define PCI_MSIX_ENTRY_LOWER_ADDR
#define PCI_MSIX_ENTRY_UPPER_ADDR
#define PCI_MSIX_ENTRY_DATA
#define PCI_MSIX_ENTRY_VECTOR_CTRL
#define PCI_MSIX_ENTRY_CTRL_MASKBIT

/* CompactPCI Hotswap Register */

#define PCI_CHSWP_CSR
#define PCI_CHSWP_DHA
#define PCI_CHSWP_EIM
#define PCI_CHSWP_PIE
#define PCI_CHSWP_LOO
#define PCI_CHSWP_PI
#define PCI_CHSWP_EXT
#define PCI_CHSWP_INS

/* PCI Advanced Feature registers */

#define PCI_AF_LENGTH
#define PCI_AF_CAP
#define PCI_AF_CAP_TP
#define PCI_AF_CAP_FLR
#define PCI_AF_CTRL
#define PCI_AF_CTRL_FLR
#define PCI_AF_STATUS
#define PCI_AF_STATUS_TP
#define PCI_CAP_AF_SIZEOF

/* PCI Enhanced Allocation registers */

#define PCI_EA_NUM_ENT
#define PCI_EA_NUM_ENT_MASK
#define PCI_EA_FIRST_ENT
#define PCI_EA_FIRST_ENT_BRIDGE
#define PCI_EA_ES
#define PCI_EA_BEI

/* EA fixed Secondary and Subordinate bus numbers for Bridge */
#define PCI_EA_SEC_BUS_MASK
#define PCI_EA_SUB_BUS_MASK
#define PCI_EA_SUB_BUS_SHIFT

/* 0-5 map to BARs 0-5 respectively */
#define PCI_EA_BEI_BAR0
#define PCI_EA_BEI_BAR5
#define PCI_EA_BEI_BRIDGE
#define PCI_EA_BEI_ENI
#define PCI_EA_BEI_ROM
/* 9-14 map to VF BARs 0-5 respectively */
#define PCI_EA_BEI_VF_BAR0
#define PCI_EA_BEI_VF_BAR5
#define PCI_EA_BEI_RESERVED
#define PCI_EA_PP
#define PCI_EA_SP
#define PCI_EA_P_MEM
#define PCI_EA_P_MEM_PREFETCH
#define PCI_EA_P_IO
#define PCI_EA_P_VF_MEM_PREFETCH
#define PCI_EA_P_VF_MEM
#define PCI_EA_P_BRIDGE_MEM
#define PCI_EA_P_BRIDGE_MEM_PREFETCH
#define PCI_EA_P_BRIDGE_IO
/* 0x08-0xfc reserved */
#define PCI_EA_P_MEM_RESERVED
#define PCI_EA_P_IO_RESERVED
#define PCI_EA_P_UNAVAILABLE
#define PCI_EA_WRITABLE
#define PCI_EA_ENABLE
#define PCI_EA_BASE
#define PCI_EA_MAX_OFFSET
/* bit 0 is reserved */
#define PCI_EA_IS_64
#define PCI_EA_FIELD_MASK

/* PCI-X registers (Type 0 (non-bridge) devices) */

#define PCI_X_CMD
#define PCI_X_CMD_DPERR_E
#define PCI_X_CMD_ERO
#define PCI_X_CMD_READ_512
#define PCI_X_CMD_READ_1K
#define PCI_X_CMD_READ_2K
#define PCI_X_CMD_READ_4K
#define PCI_X_CMD_MAX_READ
				/* Max # of outstanding split transactions */
#define PCI_X_CMD_SPLIT_1
#define PCI_X_CMD_SPLIT_2
#define PCI_X_CMD_SPLIT_3
#define PCI_X_CMD_SPLIT_4
#define PCI_X_CMD_SPLIT_8
#define PCI_X_CMD_SPLIT_12
#define PCI_X_CMD_SPLIT_16
#define PCI_X_CMD_SPLIT_32
#define PCI_X_CMD_MAX_SPLIT
#define PCI_X_CMD_VERSION(x)
#define PCI_X_STATUS
#define PCI_X_STATUS_DEVFN
#define PCI_X_STATUS_BUS
#define PCI_X_STATUS_64BIT
#define PCI_X_STATUS_133MHZ
#define PCI_X_STATUS_SPL_DISC
#define PCI_X_STATUS_UNX_SPL
#define PCI_X_STATUS_COMPLEX
#define PCI_X_STATUS_MAX_READ
#define PCI_X_STATUS_MAX_SPLIT
#define PCI_X_STATUS_MAX_CUM
#define PCI_X_STATUS_SPL_ERR
#define PCI_X_STATUS_266MHZ
#define PCI_X_STATUS_533MHZ
#define PCI_X_ECC_CSR
#define PCI_CAP_PCIX_SIZEOF_V0
#define PCI_CAP_PCIX_SIZEOF_V1
#define PCI_CAP_PCIX_SIZEOF_V2

/* PCI-X registers (Type 1 (bridge) devices) */

#define PCI_X_BRIDGE_SSTATUS
#define PCI_X_SSTATUS_64BIT
#define PCI_X_SSTATUS_133MHZ
#define PCI_X_SSTATUS_FREQ
#define PCI_X_SSTATUS_VERS
#define PCI_X_SSTATUS_V1
#define PCI_X_SSTATUS_V2
#define PCI_X_SSTATUS_266MHZ
#define PCI_X_SSTATUS_533MHZ
#define PCI_X_BRIDGE_STATUS

/* PCI Bridge Subsystem ID registers */

#define PCI_SSVID_VENDOR_ID
#define PCI_SSVID_DEVICE_ID

/* PCI Express capability registers */

#define PCI_EXP_FLAGS
#define PCI_EXP_FLAGS_VERS
#define PCI_EXP_FLAGS_TYPE
#define PCI_EXP_TYPE_ENDPOINT
#define PCI_EXP_TYPE_LEG_END
#define PCI_EXP_TYPE_ROOT_PORT
#define PCI_EXP_TYPE_UPSTREAM
#define PCI_EXP_TYPE_DOWNSTREAM
#define PCI_EXP_TYPE_PCI_BRIDGE
#define PCI_EXP_TYPE_PCIE_BRIDGE
#define PCI_EXP_TYPE_RC_END
#define PCI_EXP_TYPE_RC_EC
#define PCI_EXP_FLAGS_SLOT
#define PCI_EXP_FLAGS_IRQ
#define PCI_EXP_DEVCAP
#define PCI_EXP_DEVCAP_PAYLOAD
#define PCI_EXP_DEVCAP_PHANTOM
#define PCI_EXP_DEVCAP_EXT_TAG
#define PCI_EXP_DEVCAP_L0S
#define PCI_EXP_DEVCAP_L1
#define PCI_EXP_DEVCAP_ATN_BUT
#define PCI_EXP_DEVCAP_ATN_IND
#define PCI_EXP_DEVCAP_PWR_IND
#define PCI_EXP_DEVCAP_RBER
#define PCI_EXP_DEVCAP_PWR_VAL
#define PCI_EXP_DEVCAP_PWR_SCL
#define PCI_EXP_DEVCAP_FLR
#define PCI_EXP_DEVCTL
#define PCI_EXP_DEVCTL_CERE
#define PCI_EXP_DEVCTL_NFERE
#define PCI_EXP_DEVCTL_FERE
#define PCI_EXP_DEVCTL_URRE
#define PCI_EXP_DEVCTL_RELAX_EN
#define PCI_EXP_DEVCTL_PAYLOAD
#define PCI_EXP_DEVCTL_PAYLOAD_128B
#define PCI_EXP_DEVCTL_PAYLOAD_256B
#define PCI_EXP_DEVCTL_PAYLOAD_512B
#define PCI_EXP_DEVCTL_PAYLOAD_1024B
#define PCI_EXP_DEVCTL_PAYLOAD_2048B
#define PCI_EXP_DEVCTL_PAYLOAD_4096B
#define PCI_EXP_DEVCTL_EXT_TAG
#define PCI_EXP_DEVCTL_PHANTOM
#define PCI_EXP_DEVCTL_AUX_PME
#define PCI_EXP_DEVCTL_NOSNOOP_EN
#define PCI_EXP_DEVCTL_READRQ
#define PCI_EXP_DEVCTL_READRQ_128B
#define PCI_EXP_DEVCTL_READRQ_256B
#define PCI_EXP_DEVCTL_READRQ_512B
#define PCI_EXP_DEVCTL_READRQ_1024B
#define PCI_EXP_DEVCTL_READRQ_2048B
#define PCI_EXP_DEVCTL_READRQ_4096B
#define PCI_EXP_DEVCTL_BCR_FLR
#define PCI_EXP_DEVSTA
#define PCI_EXP_DEVSTA_CED
#define PCI_EXP_DEVSTA_NFED
#define PCI_EXP_DEVSTA_FED
#define PCI_EXP_DEVSTA_URD
#define PCI_EXP_DEVSTA_AUXPD
#define PCI_EXP_DEVSTA_TRPND
#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1
#define PCI_EXP_LNKCAP
#define PCI_EXP_LNKCAP_SLS
#define PCI_EXP_LNKCAP_SLS_2_5GB
#define PCI_EXP_LNKCAP_SLS_5_0GB
#define PCI_EXP_LNKCAP_SLS_8_0GB
#define PCI_EXP_LNKCAP_SLS_16_0GB
#define PCI_EXP_LNKCAP_SLS_32_0GB
#define PCI_EXP_LNKCAP_SLS_64_0GB
#define PCI_EXP_LNKCAP_MLW
#define PCI_EXP_LNKCAP_ASPMS
#define PCI_EXP_LNKCAP_ASPM_L0S
#define PCI_EXP_LNKCAP_ASPM_L1
#define PCI_EXP_LNKCAP_L0SEL
#define PCI_EXP_LNKCAP_L1EL
#define PCI_EXP_LNKCAP_CLKPM
#define PCI_EXP_LNKCAP_SDERC
#define PCI_EXP_LNKCAP_DLLLARC
#define PCI_EXP_LNKCAP_LBNC
#define PCI_EXP_LNKCAP_PN
#define PCI_EXP_LNKCTL
#define PCI_EXP_LNKCTL_ASPMC
#define PCI_EXP_LNKCTL_ASPM_L0S
#define PCI_EXP_LNKCTL_ASPM_L1
#define PCI_EXP_LNKCTL_RCB
#define PCI_EXP_LNKCTL_LD
#define PCI_EXP_LNKCTL_RL
#define PCI_EXP_LNKCTL_CCC
#define PCI_EXP_LNKCTL_ES
#define PCI_EXP_LNKCTL_CLKREQ_EN
#define PCI_EXP_LNKCTL_HAWD
#define PCI_EXP_LNKCTL_LBMIE
#define PCI_EXP_LNKCTL_LABIE
#define PCI_EXP_LNKSTA
#define PCI_EXP_LNKSTA_CLS
#define PCI_EXP_LNKSTA_CLS_2_5GB
#define PCI_EXP_LNKSTA_CLS_5_0GB
#define PCI_EXP_LNKSTA_CLS_8_0GB
#define PCI_EXP_LNKSTA_CLS_16_0GB
#define PCI_EXP_LNKSTA_CLS_32_0GB
#define PCI_EXP_LNKSTA_CLS_64_0GB
#define PCI_EXP_LNKSTA_NLW
#define PCI_EXP_LNKSTA_NLW_X1
#define PCI_EXP_LNKSTA_NLW_X2
#define PCI_EXP_LNKSTA_NLW_X4
#define PCI_EXP_LNKSTA_NLW_X8
#define PCI_EXP_LNKSTA_NLW_SHIFT
#define PCI_EXP_LNKSTA_LT
#define PCI_EXP_LNKSTA_SLC
#define PCI_EXP_LNKSTA_DLLLA
#define PCI_EXP_LNKSTA_LBMS
#define PCI_EXP_LNKSTA_LABS
#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V1
#define PCI_EXP_SLTCAP
#define PCI_EXP_SLTCAP_ABP
#define PCI_EXP_SLTCAP_PCP
#define PCI_EXP_SLTCAP_MRLSP
#define PCI_EXP_SLTCAP_AIP
#define PCI_EXP_SLTCAP_PIP
#define PCI_EXP_SLTCAP_HPS
#define PCI_EXP_SLTCAP_HPC
#define PCI_EXP_SLTCAP_SPLV
#define PCI_EXP_SLTCAP_SPLS
#define PCI_EXP_SLTCAP_EIP
#define PCI_EXP_SLTCAP_NCCS
#define PCI_EXP_SLTCAP_PSN
#define PCI_EXP_SLTCTL
#define PCI_EXP_SLTCTL_ABPE
#define PCI_EXP_SLTCTL_PFDE
#define PCI_EXP_SLTCTL_MRLSCE
#define PCI_EXP_SLTCTL_PDCE
#define PCI_EXP_SLTCTL_CCIE
#define PCI_EXP_SLTCTL_HPIE
#define PCI_EXP_SLTCTL_AIC
#define PCI_EXP_SLTCTL_ATTN_IND_SHIFT
#define PCI_EXP_SLTCTL_ATTN_IND_ON
#define PCI_EXP_SLTCTL_ATTN_IND_BLINK
#define PCI_EXP_SLTCTL_ATTN_IND_OFF
#define PCI_EXP_SLTCTL_PIC
#define PCI_EXP_SLTCTL_PWR_IND_ON
#define PCI_EXP_SLTCTL_PWR_IND_BLINK
#define PCI_EXP_SLTCTL_PWR_IND_OFF
#define PCI_EXP_SLTCTL_PCC
#define PCI_EXP_SLTCTL_PWR_ON
#define PCI_EXP_SLTCTL_PWR_OFF
#define PCI_EXP_SLTCTL_EIC
#define PCI_EXP_SLTCTL_DLLSCE
#define PCI_EXP_SLTCTL_ASPL_DISABLE
#define PCI_EXP_SLTCTL_IBPD_DISABLE
#define PCI_EXP_SLTSTA
#define PCI_EXP_SLTSTA_ABP
#define PCI_EXP_SLTSTA_PFD
#define PCI_EXP_SLTSTA_MRLSC
#define PCI_EXP_SLTSTA_PDC
#define PCI_EXP_SLTSTA_CC
#define PCI_EXP_SLTSTA_MRLSS
#define PCI_EXP_SLTSTA_PDS
#define PCI_EXP_SLTSTA_EIS
#define PCI_EXP_SLTSTA_DLLSC
#define PCI_EXP_RTCTL
#define PCI_EXP_RTCTL_SECEE
#define PCI_EXP_RTCTL_SENFEE
#define PCI_EXP_RTCTL_SEFEE
#define PCI_EXP_RTCTL_PMEIE
#define PCI_EXP_RTCTL_CRSSVE
#define PCI_EXP_RTCAP
#define PCI_EXP_RTCAP_CRSVIS
#define PCI_EXP_RTSTA
#define PCI_EXP_RTSTA_PME_RQ_ID
#define PCI_EXP_RTSTA_PME
#define PCI_EXP_RTSTA_PENDING
/*
 * The Device Capabilities 2, Device Status 2, Device Control 2,
 * Link Capabilities 2, Link Status 2, Link Control 2,
 * Slot Capabilities 2, Slot Status 2, and Slot Control 2 registers
 * are only present on devices with PCIe Capability version 2.
 * Use pcie_capability_read_word() and similar interfaces to use them
 * safely.
 */
#define PCI_EXP_DEVCAP2
#define PCI_EXP_DEVCAP2_COMP_TMOUT_DIS
#define PCI_EXP_DEVCAP2_ARI
#define PCI_EXP_DEVCAP2_ATOMIC_ROUTE
#define PCI_EXP_DEVCAP2_ATOMIC_COMP32
#define PCI_EXP_DEVCAP2_ATOMIC_COMP64
#define PCI_EXP_DEVCAP2_ATOMIC_COMP128
#define PCI_EXP_DEVCAP2_LTR
#define PCI_EXP_DEVCAP2_OBFF_MASK
#define PCI_EXP_DEVCAP2_OBFF_MSG
#define PCI_EXP_DEVCAP2_OBFF_WAKE
#define PCI_EXP_DEVCAP2_EE_PREFIX
#define PCI_EXP_DEVCTL2
#define PCI_EXP_DEVCTL2_COMP_TIMEOUT
#define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS
#define PCI_EXP_DEVCTL2_ARI
#define PCI_EXP_DEVCTL2_ATOMIC_REQ
#define PCI_EXP_DEVCTL2_ATOMIC_EGRESS_BLOCK
#define PCI_EXP_DEVCTL2_IDO_REQ_EN
#define PCI_EXP_DEVCTL2_IDO_CMP_EN
#define PCI_EXP_DEVCTL2_LTR_EN
#define PCI_EXP_DEVCTL2_OBFF_MSGA_EN
#define PCI_EXP_DEVCTL2_OBFF_MSGB_EN
#define PCI_EXP_DEVCTL2_OBFF_WAKE_EN
#define PCI_EXP_DEVSTA2
#define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2
#define PCI_EXP_LNKCAP2
#define PCI_EXP_LNKCAP2_SLS_2_5GB
#define PCI_EXP_LNKCAP2_SLS_5_0GB
#define PCI_EXP_LNKCAP2_SLS_8_0GB
#define PCI_EXP_LNKCAP2_SLS_16_0GB
#define PCI_EXP_LNKCAP2_SLS_32_0GB
#define PCI_EXP_LNKCAP2_SLS_64_0GB
#define PCI_EXP_LNKCAP2_CROSSLINK
#define PCI_EXP_LNKCTL2
#define PCI_EXP_LNKCTL2_TLS
#define PCI_EXP_LNKCTL2_TLS_2_5GT
#define PCI_EXP_LNKCTL2_TLS_5_0GT
#define PCI_EXP_LNKCTL2_TLS_8_0GT
#define PCI_EXP_LNKCTL2_TLS_16_0GT
#define PCI_EXP_LNKCTL2_TLS_32_0GT
#define PCI_EXP_LNKCTL2_TLS_64_0GT
#define PCI_EXP_LNKCTL2_ENTER_COMP
#define PCI_EXP_LNKCTL2_TX_MARGIN
#define PCI_EXP_LNKCTL2_HASD
#define PCI_EXP_LNKSTA2
#define PCI_EXP_LNKSTA2_FLIT
#define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2
#define PCI_EXP_SLTCAP2
#define PCI_EXP_SLTCAP2_IBPD
#define PCI_EXP_SLTCTL2
#define PCI_EXP_SLTSTA2

/* Extended Capabilities (PCI-X 2.0 and Express) */
#define PCI_EXT_CAP_ID(header)
#define PCI_EXT_CAP_VER(header)
#define PCI_EXT_CAP_NEXT(header)

#define PCI_EXT_CAP_ID_ERR
#define PCI_EXT_CAP_ID_VC
#define PCI_EXT_CAP_ID_DSN
#define PCI_EXT_CAP_ID_PWR
#define PCI_EXT_CAP_ID_RCLD
#define PCI_EXT_CAP_ID_RCILC
#define PCI_EXT_CAP_ID_RCEC
#define PCI_EXT_CAP_ID_MFVC
#define PCI_EXT_CAP_ID_VC9
#define PCI_EXT_CAP_ID_RCRB
#define PCI_EXT_CAP_ID_VNDR
#define PCI_EXT_CAP_ID_CAC
#define PCI_EXT_CAP_ID_ACS
#define PCI_EXT_CAP_ID_ARI
#define PCI_EXT_CAP_ID_ATS
#define PCI_EXT_CAP_ID_SRIOV
#define PCI_EXT_CAP_ID_MRIOV
#define PCI_EXT_CAP_ID_MCAST
#define PCI_EXT_CAP_ID_PRI
#define PCI_EXT_CAP_ID_AMD_XXX
#define PCI_EXT_CAP_ID_REBAR
#define PCI_EXT_CAP_ID_DPA
#define PCI_EXT_CAP_ID_TPH
#define PCI_EXT_CAP_ID_LTR
#define PCI_EXT_CAP_ID_SECPCI
#define PCI_EXT_CAP_ID_PMUX
#define PCI_EXT_CAP_ID_PASID
#define PCI_EXT_CAP_ID_DPC
#define PCI_EXT_CAP_ID_L1SS
#define PCI_EXT_CAP_ID_PTM
#define PCI_EXT_CAP_ID_DVSEC
#define PCI_EXT_CAP_ID_DLF
#define PCI_EXT_CAP_ID_PL_16GT
#define PCI_EXT_CAP_ID_PL_32GT
#define PCI_EXT_CAP_ID_DOE
#define PCI_EXT_CAP_ID_MAX

#define PCI_EXT_CAP_DSN_SIZEOF
#define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF

/* Advanced Error Reporting */
#define PCI_ERR_UNCOR_STATUS
#define PCI_ERR_UNC_UND
#define PCI_ERR_UNC_DLP
#define PCI_ERR_UNC_SURPDN
#define PCI_ERR_UNC_POISON_TLP
#define PCI_ERR_UNC_FCP
#define PCI_ERR_UNC_COMP_TIME
#define PCI_ERR_UNC_COMP_ABORT
#define PCI_ERR_UNC_UNX_COMP
#define PCI_ERR_UNC_RX_OVER
#define PCI_ERR_UNC_MALF_TLP
#define PCI_ERR_UNC_ECRC
#define PCI_ERR_UNC_UNSUP
#define PCI_ERR_UNC_ACSV
#define PCI_ERR_UNC_INTN
#define PCI_ERR_UNC_MCBTLP
#define PCI_ERR_UNC_ATOMEG
#define PCI_ERR_UNC_TLPPRE
#define PCI_ERR_UNCOR_MASK
	/* Same bits as above */
#define PCI_ERR_UNCOR_SEVER
	/* Same bits as above */
#define PCI_ERR_COR_STATUS
#define PCI_ERR_COR_RCVR
#define PCI_ERR_COR_BAD_TLP
#define PCI_ERR_COR_BAD_DLLP
#define PCI_ERR_COR_REP_ROLL
#define PCI_ERR_COR_REP_TIMER
#define PCI_ERR_COR_ADV_NFAT
#define PCI_ERR_COR_INTERNAL
#define PCI_ERR_COR_LOG_OVER
#define PCI_ERR_COR_MASK
	/* Same bits as above */
#define PCI_ERR_CAP
#define PCI_ERR_CAP_FEP(x)
#define PCI_ERR_CAP_ECRC_GENC
#define PCI_ERR_CAP_ECRC_GENE
#define PCI_ERR_CAP_ECRC_CHKC
#define PCI_ERR_CAP_ECRC_CHKE
#define PCI_ERR_HEADER_LOG
#define PCI_ERR_ROOT_COMMAND
#define PCI_ERR_ROOT_CMD_COR_EN
#define PCI_ERR_ROOT_CMD_NONFATAL_EN
#define PCI_ERR_ROOT_CMD_FATAL_EN
#define PCI_ERR_ROOT_STATUS
#define PCI_ERR_ROOT_COR_RCV
#define PCI_ERR_ROOT_MULTI_COR_RCV
#define PCI_ERR_ROOT_UNCOR_RCV
#define PCI_ERR_ROOT_MULTI_UNCOR_RCV
#define PCI_ERR_ROOT_FIRST_FATAL
#define PCI_ERR_ROOT_NONFATAL_RCV
#define PCI_ERR_ROOT_FATAL_RCV
#define PCI_ERR_ROOT_AER_IRQ
#define PCI_ERR_ROOT_ERR_SRC

/* Virtual Channel */
#define PCI_VC_PORT_CAP1
#define PCI_VC_CAP1_EVCC
#define PCI_VC_CAP1_LPEVCC
#define PCI_VC_CAP1_ARB_SIZE
#define PCI_VC_PORT_CAP2
#define PCI_VC_CAP2_32_PHASE
#define PCI_VC_CAP2_64_PHASE
#define PCI_VC_CAP2_128_PHASE
#define PCI_VC_CAP2_ARB_OFF
#define PCI_VC_PORT_CTRL
#define PCI_VC_PORT_CTRL_LOAD_TABLE
#define PCI_VC_PORT_STATUS
#define PCI_VC_PORT_STATUS_TABLE
#define PCI_VC_RES_CAP
#define PCI_VC_RES_CAP_32_PHASE
#define PCI_VC_RES_CAP_64_PHASE
#define PCI_VC_RES_CAP_128_PHASE
#define PCI_VC_RES_CAP_128_PHASE_TB
#define PCI_VC_RES_CAP_256_PHASE
#define PCI_VC_RES_CAP_ARB_OFF
#define PCI_VC_RES_CTRL
#define PCI_VC_RES_CTRL_LOAD_TABLE
#define PCI_VC_RES_CTRL_ARB_SELECT
#define PCI_VC_RES_CTRL_ID
#define PCI_VC_RES_CTRL_ENABLE
#define PCI_VC_RES_STATUS
#define PCI_VC_RES_STATUS_TABLE
#define PCI_VC_RES_STATUS_NEGO
#define PCI_CAP_VC_BASE_SIZEOF
#define PCI_CAP_VC_PER_VC_SIZEOF

/* Power Budgeting */
#define PCI_PWR_DSR
#define PCI_PWR_DATA
#define PCI_PWR_DATA_BASE(x)
#define PCI_PWR_DATA_SCALE(x)
#define PCI_PWR_DATA_PM_SUB(x)
#define PCI_PWR_DATA_PM_STATE(x)
#define PCI_PWR_DATA_TYPE(x)
#define PCI_PWR_DATA_RAIL(x)
#define PCI_PWR_CAP
#define PCI_PWR_CAP_BUDGET(x)
#define PCI_EXT_CAP_PWR_SIZEOF

/* Root Complex Event Collector Endpoint Association  */
#define PCI_RCEC_RCIEP_BITMAP
#define PCI_RCEC_BUSN
#define PCI_RCEC_BUSN_REG_VER
#define PCI_RCEC_BUSN_NEXT(x)
#define PCI_RCEC_BUSN_LAST(x)

/* Vendor-Specific (VSEC, PCI_EXT_CAP_ID_VNDR) */
#define PCI_VNDR_HEADER
#define PCI_VNDR_HEADER_ID(x)
#define PCI_VNDR_HEADER_REV(x)
#define PCI_VNDR_HEADER_LEN(x)

/*
 * HyperTransport sub capability types
 *
 * Unfortunately there are both 3 bit and 5 bit capability types defined
 * in the HT spec, catering for that is a little messy. You probably don't
 * want to use these directly, just use pci_find_ht_capability() and it
 * will do the right thing for you.
 */
#define HT_3BIT_CAP_MASK
#define HT_CAPTYPE_SLAVE
#define HT_CAPTYPE_HOST

#define HT_5BIT_CAP_MASK
#define HT_CAPTYPE_IRQ
#define HT_CAPTYPE_REMAPPING_40
#define HT_CAPTYPE_REMAPPING_64
#define HT_CAPTYPE_UNITID_CLUMP
#define HT_CAPTYPE_EXTCONF
#define HT_CAPTYPE_MSI_MAPPING
#define HT_MSI_FLAGS
#define HT_MSI_FLAGS_ENABLE
#define HT_MSI_FLAGS_FIXED
#define HT_MSI_FIXED_ADDR
#define HT_MSI_ADDR_LO
#define HT_MSI_ADDR_LO_MASK
#define HT_MSI_ADDR_HI
#define HT_CAPTYPE_DIRECT_ROUTE
#define HT_CAPTYPE_VCSET
#define HT_CAPTYPE_ERROR_RETRY
#define HT_CAPTYPE_GEN3
#define HT_CAPTYPE_PM
#define HT_CAP_SIZEOF_LONG
#define HT_CAP_SIZEOF_SHORT

/* Alternative Routing-ID Interpretation */
#define PCI_ARI_CAP
#define PCI_ARI_CAP_MFVC
#define PCI_ARI_CAP_ACS
#define PCI_ARI_CAP_NFN(x)
#define PCI_ARI_CTRL
#define PCI_ARI_CTRL_MFVC
#define PCI_ARI_CTRL_ACS
#define PCI_ARI_CTRL_FG(x)
#define PCI_EXT_CAP_ARI_SIZEOF

/* Address Translation Service */
#define PCI_ATS_CAP
#define PCI_ATS_CAP_QDEP(x)
#define PCI_ATS_MAX_QDEP
#define PCI_ATS_CAP_PAGE_ALIGNED
#define PCI_ATS_CTRL
#define PCI_ATS_CTRL_ENABLE
#define PCI_ATS_CTRL_STU(x)
#define PCI_ATS_MIN_STU
#define PCI_EXT_CAP_ATS_SIZEOF

/* Page Request Interface */
#define PCI_PRI_CTRL
#define PCI_PRI_CTRL_ENABLE
#define PCI_PRI_CTRL_RESET
#define PCI_PRI_STATUS
#define PCI_PRI_STATUS_RF
#define PCI_PRI_STATUS_UPRGI
#define PCI_PRI_STATUS_STOPPED
#define PCI_PRI_STATUS_PASID
#define PCI_PRI_MAX_REQ
#define PCI_PRI_ALLOC_REQ
#define PCI_EXT_CAP_PRI_SIZEOF

/* Process Address Space ID */
#define PCI_PASID_CAP
#define PCI_PASID_CAP_EXEC
#define PCI_PASID_CAP_PRIV
#define PCI_PASID_CAP_WIDTH
#define PCI_PASID_CTRL
#define PCI_PASID_CTRL_ENABLE
#define PCI_PASID_CTRL_EXEC
#define PCI_PASID_CTRL_PRIV
#define PCI_EXT_CAP_PASID_SIZEOF

/* Single Root I/O Virtualization */
#define PCI_SRIOV_CAP
#define PCI_SRIOV_CAP_VFM
#define PCI_SRIOV_CAP_INTR(x)
#define PCI_SRIOV_CTRL
#define PCI_SRIOV_CTRL_VFE
#define PCI_SRIOV_CTRL_VFM
#define PCI_SRIOV_CTRL_INTR
#define PCI_SRIOV_CTRL_MSE
#define PCI_SRIOV_CTRL_ARI
#define PCI_SRIOV_STATUS
#define PCI_SRIOV_STATUS_VFM
#define PCI_SRIOV_INITIAL_VF
#define PCI_SRIOV_TOTAL_VF
#define PCI_SRIOV_NUM_VF
#define PCI_SRIOV_FUNC_LINK
#define PCI_SRIOV_VF_OFFSET
#define PCI_SRIOV_VF_STRIDE
#define PCI_SRIOV_VF_DID
#define PCI_SRIOV_SUP_PGSIZE
#define PCI_SRIOV_SYS_PGSIZE
#define PCI_SRIOV_BAR
#define PCI_SRIOV_NUM_BARS
#define PCI_SRIOV_VFM
#define PCI_SRIOV_VFM_BIR(x)
#define PCI_SRIOV_VFM_OFFSET(x)
#define PCI_SRIOV_VFM_UA
#define PCI_SRIOV_VFM_MI
#define PCI_SRIOV_VFM_MO
#define PCI_SRIOV_VFM_AV
#define PCI_EXT_CAP_SRIOV_SIZEOF

#define PCI_LTR_MAX_SNOOP_LAT
#define PCI_LTR_MAX_NOSNOOP_LAT
#define PCI_LTR_VALUE_MASK
#define PCI_LTR_SCALE_MASK
#define PCI_LTR_SCALE_SHIFT
#define PCI_LTR_NOSNOOP_VALUE
#define PCI_LTR_NOSNOOP_SCALE
#define PCI_EXT_CAP_LTR_SIZEOF

/* Access Control Service */
#define PCI_ACS_CAP
#define PCI_ACS_SV
#define PCI_ACS_TB
#define PCI_ACS_RR
#define PCI_ACS_CR
#define PCI_ACS_UF
#define PCI_ACS_EC
#define PCI_ACS_DT
#define PCI_ACS_EGRESS_BITS
#define PCI_ACS_CTRL
#define PCI_ACS_EGRESS_CTL_V

#define PCI_VSEC_HDR
#define PCI_VSEC_HDR_LEN_SHIFT

/* SATA capability */
#define PCI_SATA_REGS
#define PCI_SATA_REGS_MASK
#define PCI_SATA_REGS_INLINE
#define PCI_SATA_SIZEOF_SHORT
#define PCI_SATA_SIZEOF_LONG

/* Resizable BARs */
#define PCI_REBAR_CAP
#define PCI_REBAR_CAP_SIZES
#define PCI_REBAR_CTRL
#define PCI_REBAR_CTRL_BAR_IDX
#define PCI_REBAR_CTRL_NBAR_MASK
#define PCI_REBAR_CTRL_NBAR_SHIFT
#define PCI_REBAR_CTRL_BAR_SIZE
#define PCI_REBAR_CTRL_BAR_SHIFT

/* Dynamic Power Allocation */
#define PCI_DPA_CAP
#define PCI_DPA_CAP_SUBSTATE_MASK
#define PCI_DPA_BASE_SIZEOF

/* TPH Requester */
#define PCI_TPH_CAP
#define PCI_TPH_CAP_LOC_MASK
#define PCI_TPH_LOC_NONE
#define PCI_TPH_LOC_CAP
#define PCI_TPH_LOC_MSIX
#define PCI_TPH_CAP_ST_MASK
#define PCI_TPH_CAP_ST_SHIFT
#define PCI_TPH_BASE_SIZEOF

/* Downstream Port Containment */
#define PCI_EXP_DPC_CAP
#define PCI_EXP_DPC_IRQ
#define PCI_EXP_DPC_CAP_RP_EXT
#define PCI_EXP_DPC_CAP_POISONED_TLP
#define PCI_EXP_DPC_CAP_SW_TRIGGER
#define PCI_EXP_DPC_RP_PIO_LOG_SIZE
#define PCI_EXP_DPC_CAP_DL_ACTIVE

#define PCI_EXP_DPC_CTL
#define PCI_EXP_DPC_CTL_EN_FATAL
#define PCI_EXP_DPC_CTL_EN_NONFATAL
#define PCI_EXP_DPC_CTL_INT_EN

#define PCI_EXP_DPC_STATUS
#define PCI_EXP_DPC_STATUS_TRIGGER
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_UNCOR
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_NFE
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_FE
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_IN_EXT
#define PCI_EXP_DPC_STATUS_INTERRUPT
#define PCI_EXP_DPC_RP_BUSY
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_RP_PIO
#define PCI_EXP_DPC_STATUS_TRIGGER_RSN_SW_TRIGGER
#define PCI_EXP_DPC_RP_PIO_FEP

#define PCI_EXP_DPC_SOURCE_ID

#define PCI_EXP_DPC_RP_PIO_STATUS
#define PCI_EXP_DPC_RP_PIO_MASK
#define PCI_EXP_DPC_RP_PIO_SEVERITY
#define PCI_EXP_DPC_RP_PIO_SYSERROR
#define PCI_EXP_DPC_RP_PIO_EXCEPTION
#define PCI_EXP_DPC_RP_PIO_HEADER_LOG
#define PCI_EXP_DPC_RP_PIO_IMPSPEC_LOG
#define PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG

/* Precision Time Measurement */
#define PCI_PTM_CAP
#define PCI_PTM_CAP_REQ
#define PCI_PTM_CAP_RES
#define PCI_PTM_CAP_ROOT
#define PCI_PTM_GRANULARITY_MASK
#define PCI_PTM_CTRL
#define PCI_PTM_CTRL_ENABLE
#define PCI_PTM_CTRL_ROOT

/* ASPM L1 PM Substates */
#define PCI_L1SS_CAP
#define PCI_L1SS_CAP_PCIPM_L1_2
#define PCI_L1SS_CAP_PCIPM_L1_1
#define PCI_L1SS_CAP_ASPM_L1_2
#define PCI_L1SS_CAP_ASPM_L1_1
#define PCI_L1SS_CAP_L1_PM_SS
#define PCI_L1SS_CAP_CM_RESTORE_TIME
#define PCI_L1SS_CAP_P_PWR_ON_SCALE
#define PCI_L1SS_CAP_P_PWR_ON_VALUE
#define PCI_L1SS_CTL1
#define PCI_L1SS_CTL1_PCIPM_L1_2
#define PCI_L1SS_CTL1_PCIPM_L1_1
#define PCI_L1SS_CTL1_ASPM_L1_2
#define PCI_L1SS_CTL1_ASPM_L1_1
#define PCI_L1SS_CTL1_L1_2_MASK
#define PCI_L1SS_CTL1_L1SS_MASK
#define PCI_L1SS_CTL1_CM_RESTORE_TIME
#define PCI_L1SS_CTL1_LTR_L12_TH_VALUE
#define PCI_L1SS_CTL1_LTR_L12_TH_SCALE
#define PCI_L1SS_CTL2
#define PCI_L1SS_CTL2_T_PWR_ON_SCALE
#define PCI_L1SS_CTL2_T_PWR_ON_VALUE

/* Designated Vendor-Specific (DVSEC, PCI_EXT_CAP_ID_DVSEC) */
#define PCI_DVSEC_HEADER1
#define PCI_DVSEC_HEADER1_VID(x)
#define PCI_DVSEC_HEADER1_REV(x)
#define PCI_DVSEC_HEADER1_LEN(x)
#define PCI_DVSEC_HEADER2
#define PCI_DVSEC_HEADER2_ID(x)

/* Data Link Feature */
#define PCI_DLF_CAP
#define PCI_DLF_EXCHANGE_ENABLE

/* Physical Layer 16.0 GT/s */
#define PCI_PL_16GT_LE_CTRL
#define PCI_PL_16GT_LE_CTRL_DSP_TX_PRESET_MASK
#define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK
#define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT

/* Data Object Exchange */
#define PCI_DOE_CAP
#define PCI_DOE_CAP_INT_SUP
#define PCI_DOE_CAP_INT_MSG_NUM
#define PCI_DOE_CTRL
#define PCI_DOE_CTRL_ABORT
#define PCI_DOE_CTRL_INT_EN
#define PCI_DOE_CTRL_GO
#define PCI_DOE_STATUS
#define PCI_DOE_STATUS_BUSY
#define PCI_DOE_STATUS_INT_STATUS
#define PCI_DOE_STATUS_ERROR
#define PCI_DOE_STATUS_DATA_OBJECT_READY
#define PCI_DOE_WRITE
#define PCI_DOE_READ
#define PCI_DOE_CAP_SIZEOF

/* DOE Data Object - note not actually registers */
#define PCI_DOE_DATA_OBJECT_HEADER_1_VID
#define PCI_DOE_DATA_OBJECT_HEADER_1_TYPE
#define PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH

#define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX
#define PCI_DOE_DATA_OBJECT_DISC_REQ_3_VER
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX

/* Compute Express Link (CXL r3.1, sec 8.1.5) */
#define PCI_DVSEC_CXL_PORT
#define PCI_DVSEC_CXL_PORT_CTL
#define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR

#endif /* LINUX_PCI_REGS_H */