axipcie
Xilinx SDK Drivers API Documentation
Axipcie_v3_0

Data Structures

struct  XAxiPcie_Config
 This typedef contains IP hardware configuration information. More...
 
struct  XAxiPcie
 The XAxiPcie driver instance data. More...
 
struct  XAxiPcie_BarAddr
 The user is required to use this strucuture when reading or writing translation vector between local bus BARs and AXI PCIe BARs. More...
 

Macros

#define XAXIPCIE_VSEC1   0x00
 First VSEC Register. More...
 
#define XAXIPCIE_VSEC2   0x01
 Second VSEC Register. More...
 
#define XAxiPcie_IsLinkUp(InstancePtr)
 Check whether link is up or not. More...
 
#define XAxiPcie_IsEcamBusy(InstancePtr)
 Check whether ECAM is busy or not. More...
 
#define XAxiPcie_ReadReg(BaseAddress, RegOffset)   Xil_In32((BaseAddress) + (RegOffset))
 Macro to read register. More...
 
#define XAxiPcie_WriteReg(BaseAddress, RegOffset, Data)   Xil_Out32((BaseAddress) + (RegOffset), (Data))
 Macro to write register. More...
 

Functions

XAxiPcie_ConfigXAxiPcie_LookupConfig (u16 DeviceId)
 Lookup the device configuration based on the unique device ID. More...
 
int XAxiPcie_CfgInitialize (XAxiPcie *InstancePtr, XAxiPcie_Config *CfgPtr, UINTPTR EffectiveAddress)
 Initialize the XAxiPcie instance provided by the caller based on the given Config structure. More...
 
void XAxiPcie_GetVsecCapability (XAxiPcie *InstancePtr, u8 VsecNum, u16 *VsecIdPtr, u8 *VersionPtr, u16 *NextCapPtr)
 This API is used to read the VSEC Capability Register. More...
 
void XAxiPcie_GetVsecHeader (XAxiPcie *InstancePtr, u8 VsecNum, u16 *VsecIdPtr, u8 *RevisionPtr, u16 *LengthPtr)
 This API is used to read the VSEC Header Register. More...
 
void XAxiPcie_GetBridgeInfo (XAxiPcie *InstancePtr, u8 *Gen2Ptr, u8 *RootPortPtr, u8 *ECAMSizePtr)
 This API Reads the Bridge info register. More...
 
void XAxiPcie_GetRequesterId (XAxiPcie *InstancePtr, u8 *BusNumPtr, u8 *DevNumPtr, u8 *FunNumPtr, u8 *PortNumPtr)
 Read the Bus Location register. More...
 
void XAxiPcie_GetPhyStatusCtrl (XAxiPcie *InstancePtr, u32 *PhyState)
 This API is used to read the Phy Status/Control Register. More...
 
void XAxiPcie_GetRootPortStatusCtrl (XAxiPcie *InstancePtr, u32 *StatusPtr)
 Read Root Port Status/Control Register. More...
 
void XAxiPcie_SetRootPortStatusCtrl (XAxiPcie *InstancePtr, u32 StatusData)
 Write Value in Root Port Status/Control Register. More...
 
int XAxiPcie_SetRootPortMSIBase (XAxiPcie *InstancePtr, unsigned long long MsiBase)
 Write MSI Base Address to Root Port MSI Base Address Register. More...
 
void XAxiPcie_GetRootPortErrFIFOMsg (XAxiPcie *InstancePtr, u16 *ReqIdPtr, u8 *ErrType, u8 *ErrValid)
 Read Root Port Error FIFO Message. More...
 
void XAxiPcie_ClearRootPortErrFIFOMsg (XAxiPcie *InstancePtr)
 Clear Root Port Error FIFO Message. More...
 
int XAxiPcie_GetRootPortIntFIFOReg (XAxiPcie *InstancePtr, u16 *ReqIdPtr, u16 *MsiAddr, u8 *MsiInt, u8 *IntValid, u16 *MsiMsgData)
 Read Root Port Interrupt FIFO message Register 1 & 2. More...
 
void XAxiPcie_ClearRootPortIntFIFOReg (XAxiPcie *InstancePtr)
 Clear Root Port FIFO Interrupt message Register 1 & 2. More...
 
void XAxiPcie_GetLocalBusBar2PcieBar (XAxiPcie *InstancePtr, u8 BarNumber, XAxiPcie_BarAddr *BarAddrPtr)
 Read PCIe address translation vector that corresponds to one of AXI local bus bars passed by the caller. More...
 
void XAxiPcie_SetLocalBusBar2PcieBar (XAxiPcie *InstancePtr, u8 BarNumber, XAxiPcie_BarAddr *BarAddrPtr)
 Write PCIe address translation vector that corresponds to one of AXI local bus bars passed by the caller. More...
 
void XAxiPcie_ReadLocalConfigSpace (XAxiPcie *InstancePtr, u16 Offset, u32 *DataPtr)
 Read 32-bit value from one of this IP own configuration space. More...
 
void XAxiPcie_WriteLocalConfigSpace (XAxiPcie *InstancePtr, u16 Offset, u32 Data)
 Write 32-bit value to one of this IP own configuration space. More...
 
void XAxiPcie_ReadRemoteConfigSpace (XAxiPcie *InstancePtr, u8 Bus, u8 Device, u8 Function, u16 Offset, u32 *DataPtr)
 Read 32-bit value from external PCIe Function's configuration space. More...
 
void XAxiPcie_WriteRemoteConfigSpace (XAxiPcie *InstancePtr, u8 Bus, u8 Device, u8 Function, u16 Offset, u32 Data)
 Write 32-bit value to external PCIe function's configuration space. More...
 
void XAxiPcie_EnableGlobalInterrupt (XAxiPcie *InstancePtr)
 Enable the Global Interrupt. More...
 
void XAxiPcie_DisableGlobalInterrupt (XAxiPcie *InstancePtr)
 Disable the Global Interrupt. More...
 
void XAxiPcie_EnableInterrupts (XAxiPcie *InstancePtr, u32 EnableMask)
 Enable the IP interrupt bits passed into "EnableMask". More...
 
void XAxiPcie_DisableInterrupts (XAxiPcie *InstancePtr, u32 DisableMask)
 Disable the IP interrupt bits passed into "DisableMask". More...
 
void XAxiPcie_GetEnabledInterrupts (XAxiPcie *InstancePtr, u32 *EnabledMaskPtr)
 Get the currently enabled interrupt bits of the IP and pass them back to the caller into "EnabledMask". More...
 
void XAxiPcie_GetPendingInterrupts (XAxiPcie *InstancePtr, u32 *PendingMaskPtr)
 Get the currently pending interrupt bits of the IP and pass them back to the caller into "PendingMask". More...
 
void XAxiPcie_ClearPendingInterrupts (XAxiPcie *InstancePtr, u32 ClearMask)
 Clear the currently pending interrupt bits of the IP passed from the caller into "ClearMask". More...
 

Registers

Register offsets for this device.

Some of the registers are configurable at hardware build time such that may or may not exist in the hardware.

#define XAXIPCIE_PCIE_CORE_OFFSET   0x000
 PCI Express hard core configuration register offset. More...
 
#define XAXIPCIE_VSECC_OFFSET   0x128
 VSEC Capability Register. More...
 
#define XAXIPCIE_VSECH_OFFSET   0x12C
 VSEC Header Register. More...
 
#define XAXIPCIE_BI_OFFSET   0x130
 Bridge Info Register. More...
 
#define XAXIPCIE_BSC_OFFSET   0x134
 Bridge Status and Control Register. More...
 
#define XAXIPCIE_ID_OFFSET   0x138
 Interrupt Decode Register. More...
 
#define XAXIPCIE_IM_OFFSET   0x13C
 Interrupt Mask Register. More...
 
#define XAXIPCIE_BL_OFFSET   0x140
 Bus Location Register. More...
 
#define XAXIPCIE_PHYSC_OFFSET   0x144
 Physical status and Control Register. More...
 
#define XAXIPCIE_RPSC_OFFSET   0x148
 Root Port Status & Control Register. More...
 
#define XAXIPCIE_RPMSIB_UPPER_OFFSET   0x14C
 Root Port MSI Base 1 Register Upper 32 bits from 64 bit address are written. More...
 
#define XAXIPCIE_RPMSIB_LOWER_OFFSET   0x150
 Root Port MSI Base 2 Register Lower 32 bits from 64 bit address are written. More...
 
#define XAXIPCIE_RPEFR_OFFSET   0x154
 Root Port Error FIFO Read Register. More...
 
#define XAXIPCIE_RPIFR1_OFFSET   0x158
 Root Port Interrupt FIFO Read1 Register. More...
 
#define XAXIPCIE_RPIFR2_OFFSET   0x15C
 Root Port Interrupt FIFO Read2 Register. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_0U_OFFSET   0x208
 AXIBAR 2 PCIBAR translation 0 upper 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_0L_OFFSET   0x20C
 AXIBAR to PCIBAR translation 0 lower 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_1U_OFFSET   0x210
 AXIBAR to PCIBAR translation 1 upper 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_1L_OFFSET   0x214
 AXIBAR to PCIBAR translation 1 lower 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_2U_OFFSET   0x218
 AXIBAR to PCIBAR translation 2 upper 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_2L_OFFSET   0x21C
 AXIBAR to PCIBAR translation 2 lower 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_3U_OFFSET   0x220
 AXIBAR to PCIBAR translation 3 upper 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_3L_OFFSET   0x224
 AXIBAR to PCIBAR translation 3 lower 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_4U_OFFSET   0x228
 AXIBAR to PCIBAR translation 4 upper 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_4L_OFFSET   0x22C
 AXIBAR to PCIBAR translation 4 lower 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_5U_OFFSET   0x230
 AXIBAR to PCIBAR translation 5 upper 32 bits. More...
 
#define XAXIPCIE_AXIBAR2PCIBAR_5L_OFFSET   0x234
 AXIBAR to PCIBAR translation 5 lower 32 bits. More...
 

VSECC Register bitmaps and masks

#define XAXIPCIE_VSECC_ID_MASK   0x0000FFFF
 Vsec capability Id. More...
 
#define XAXIPCIE_VSECC_VER_MASK   0x000F0000
 Version of capability Structure. More...
 
#define XAXIPCIE_VSECC_NEXT_MASK   0xFFF00000
 Offset to next capability. More...
 
#define XAXIPCIE_VSECC_VER_SHIFT   16
 VSEC Version shift. More...
 
#define XAXIPCIE_VSECC_NEXT_SHIFT   20
 Next capability offset shift. More...
 

VSECH Register bitmaps and masks

#define XAXIPCIE_VSECH_ID_MASK   0x0000FFFF
 Vsec structure Id. More...
 
#define XAXIPCIE_VSECH_REV_MASK   0x000F0000
 Vsec header version. More...
 
#define XAXIPCIE_VSECH_LEN_MASK   0xFFF00000
 Length of Vsec capability structure. More...
 
#define XAXIPCIE_VSECH_REV_SHIFT   16
 Vsec version shift. More...
 
#define XAXIPCIE_VSECH_LEN_SHIFT   20
 Vsec length shift. More...
 

Bridge Info Register bitmaps and masks

#define XAXIPCIE_BI_GEN2_MASK   0x00000001
 PCIe Gen2 Speed Support Mask. More...
 
#define XAXIPCIE_BI_RP_MASK   0x00000002
 PCIe Root Port Support. More...
 
#define XAXIPCIE_UP_CONFIG_CAPABLE   0x00000004
 Up Config Capable. More...
 
#define XAXIPCIE_BI_ECAM_SIZE_MASK   0x00070000
 ECAM size. More...
 
#define XAXIPCIE_BI_RP_SHIFT   1
 PCIe Root Port Shift. More...
 
#define XAXIPCIE_BI_ECAM_SIZE_SHIFT   16
 PCIe ECAM Size Shift. More...
 

Bridge Status & Control Register bitmaps and masks

#define XAXIPCIE_BSC_ECAM_BUSY_MASK   0x00000001
 ECAM Busy Status. More...
 
#define XAXIPCIE_BSC_GI_MASK   0x00000100
 Global Interrupt Disable. More...
 
#define XAXIPCIE_BSC_RW1C_MASK   0x00010000
 RW Permissions to RW1C Registers. More...
 
#define XAXIPCIE_BSC_RO_MASK   0x00020000
 RW Permissions to RO Registers. More...
 
#define XAXIPCIE_BSC_GI_SHIFT   8
 Global Interrupt Disable Shift. More...
 
#define XAXIPCIE_BSC_RW1C_SHIFT   16
 RW1C Shift. More...
 
#define XAXIPCIE_BSC_RO_SHIFT   17
 RO as RW Shift. More...
 

Interrupt Decode Register bitmaps and masks

#define XAXIPCIE_ID_LINK_DOWN_MASK   0x00000001
 Link Down Mask. More...
 
#define XAXIPCIE_ID_ECRC_ERR_MASK   0x00000002
 Rx Packet CRC failed. More...
 
#define XAXIPCIE_ID_STR_ERR_MASK   0x00000004
 Streaming Error Mask. More...
 
#define XAXIPCIE_ID_HOT_RST_MASK   0x00000008
 Hot Reset Mask. More...
 
#define XAXIPCIE_ID_CFG_COMPL_STATE_MASK   0x000000E0
 Cfg Completion Status Mask. More...
 
#define XAXIPCIE_ID_CFG_TIMEOUT_MASK   0x00000100
 Cfg timeout Mask. More...
 
#define XAXIPCIE_ID_CORRECTABLE_ERR_MASK   0x00000200
 Correctable Error Mask. More...
 
#define XAXIPCIE_ID_NONFATAL_ERR_MASK   0x00000400
 Non-Fatal Error Mask. More...
 
#define XAXIPCIE_ID_FATAL_ERR_MASK   0x00000800
 Fatal Error Mask. More...
 
#define XAXIPCIE_ID_INTX_INTERRUPT   0x00010000
 INTX Interrupt. More...
 
#define XAXIPCIE_ID_MSI_INTERRUPT   0x00020000
 MSI Interrupt. More...
 
#define XAXIPCIE_ID_UNSUPP_CMPL_MASK   0x00100000
 Slave Unsupported Request Mask. More...
 
#define XAXIPCIE_ID_UNEXP_CMPL_MASK   0x00200000
 Slave Unexpected Completion Mask. More...
 
#define XAXIPCIE_ID_CMPL_TIMEOUT_MASK   0x00400000
 Slave completion Time Mask. More...
 
#define XAXIPCIE_ID_SLV_EP_MASK   0x00800000
 Slave Error Poison Mask. More...
 
#define XAXIPCIE_ID_CMPL_ABT_MASK   0x01000000
 Slave completion Abort Mask. More...
 
#define XAXIPCIE_ID_ILL_BURST_MASK   0x02000000
 Slave Illegal Burst Mask. More...
 
#define XAXIPCIE_ID_DECODE_ERR_MASK   0x04000000
 Master Decode Error Interrupt Mask. More...
 
#define XAXIPCIE_ID_SLAVE_ERR_MASK   0x08000000
 Master Slave Error Interrupt Mask. More...
 
#define XAXIPCIE_ID_MASTER_EP_MASK   0x10000000
 Master Error Poison Mask. More...
 
#define XAXIPCIE_ID_CLEAR_ALL_MASK   0xFFFFFFFF
 Mask of all Interrupts. More...
 

Interrupt Mask Register bitmaps and masks

#define XAXIPCIE_IM_ENABLE_ALL_MASK   0xFFFFFFFF
 Enable All Interrupts. More...
 
#define XAXIPCIE_IM_DISABLE_ALL_MASK   0x00000000
 Disable All Interrupts. More...
 

Bus Location Register bitmaps and masks

#define XAXIPCIE_BL_FUNC_MASK   0x00000007
 Requester ID Function Number. More...
 
#define XAXIPCIE_BL_DEV_MASK   0x000000F8
 Requester ID Device Number. More...
 
#define XAXIPCIE_BL_BUS_MASK   0x0000FF00
 Requester ID Bus Number. More...
 
#define XAXIPCIE_BL_PORT_MASK   0x00FF0000
 Requester ID Port Number. More...
 
#define XAXIPCIE_BL_DEV_SHIFT   3
 Requester ID Device Number Shift Value. More...
 
#define XAXIPCIE_BL_BUS_SHIFT   8
 Requester ID Bus Number Shift Value. More...
 
#define XAXIPCIE_BL_PORT_SHIFT   16
 Requester ID Bus Number Shift Value. More...
 

PHY Status & Control Register bitmaps and masks

#define XAXIPCIE_PHYSC_LINK_RATE_MASK   0x00000001
 Link Rate. More...
 
#define XAXIPCIE_PHYSC_LINK_WIDTH_MASK   0x00000006
 Link Width Mask. More...
 
#define XAXIPCIE_PHYSC_LTSSM_STATE_MASK   0x000001F8
 LTSSM State Mask. More...
 
#define XAXIPCIE_PHYSC_LANE_REV_MASK   0x00000600
 Lane Reversal Mask. More...
 
#define XAXIPCIE_PHYSC_LINK_UP_MASK   0x00000800
 Link Up Status Mask. More...
 
#define XAXIPCIE_PHYSC_DLW_MASK   0x00030000
 Directed Link Width to change Mask. More...
 
#define XAXIPCIE_PHYSC_DLWS_MASK   0x00040000
 Directed Link Width Speed to change Mask. More...
 
#define XAXIPCIE_PHYSC_DLA_MASK   0x00080000
 Directed Link Change change to reliability or Autonomus Mask. More...
 
#define XAXIPCIE_PHYSC_DLC_MASK   0x00300000
 Directed Link change Mask. More...
 
#define XAXIPCIE_PHYSC_LINK_WIDTH_SHIFT   1
 Link Status Shift. More...
 
#define XAXIPCIE_PHYSC_LTSSM_STATE_SHIFT   3
 LTSSM State Shift. More...
 
#define XAXIPCIE_PHYSC_LANE_REV_SHIFT   9
 Lane Reversal Shift. More...
 
#define XAXIPCIE_PHYSC_LINK_UP_SHIFT   11
 Link Up Status Shift. More...
 
#define XAXIPCIE_PHYSC_DLW_SHIFT   16
 Directed Link Width to change Shift. More...
 
#define XAXIPCIE_PHYSC_DLWS_SHIFT   18
 Directed Link Width Speed to change Shift. More...
 
#define XAXIPCIE_PHYSC_DLA_SHIFT   19
 Directed Link change to reliability or Autonomus Shift. More...
 
#define XAXIPCIE_PHYSC_DLC_SHIFT   20
 Directed Link change Shift. More...
 

Root Port Status/Control Register bitmaps and masks

#define XAXIPCIE_RPSC_MASK   0x0FFF0001
 Root Port Register mask. More...
 
#define XAXIPCIE_RPSC_BRIDGE_ENABLE_MASK   0x00000001
 Bridge Enable Mask. More...
 
#define XAXIPCIE_RPSC_ERR_FIFO_NOT_EMPTY_MASK   0x00010000
 Root Port Error FIFO Not Empty. More...
 
#define XAXIPCIE_RPSC_ERR_FIFO_OVERFLOW_MASK   0x00020000
 Root Port Error FIFO Overflow. More...
 
#define XAXIPCIE_RPSC_INT_FIFO_NOT_EMPTY_MASK   0x00040000
 Root Port Interrupt FIFO Not Empty. More...
 
#define XAXIPCIE_RPSC_INT_FIFO_OVERFLOW_MASK   0x00080000
 Root Port Interrupt FIFO Overflow. More...
 
#define XAXIPCIE_RPSC_COMP_TIMEOUT_MASK   0x0FF00000
 Root Port Completion Timeout. More...
 
#define XAXIPCIE_RPSC_ERR_FIFO_NOT_EMPTY_SHIFT   16
 Root Port Error FIFO Empty Shift. More...
 
#define XAXIPCIE_RPSC_ERR_FIFO_OVERFLOW_SHIFT   17
 Root Port Error FIFO Overflow Shift. More...
 
#define XAXIPCIE_RPSC_INT_FIFO_NOT_EMPTY_SHIFT   18
 Root Port Interrupt FIFO Empty Shift. More...
 
#define XAXIPCIE_RPSC_INT_FIFO_OVERFLOW_SHIFT   19
 Root Port Interrupt FIFO Overflow Shift. More...
 
#define XAXIPCIE_RPSC_COMP_TIMEOUT_SHIFT   20
 Root Port Completion Timeout Shift. More...
 

Root Port MSI Base Register bitmaps and masks

#define XAXIPCIE_RPMSIB_UPPER_MASK   0xFFFFFFFF
 Upper 32 bits of 64 bit MSI Base Address. More...
 
#define XAXIPCIE_RPMSIB_UPPER_SHIFT   32 /* Shift of Upper 32 bits */
 
#define XAXIPCIE_RPMSIB_LOWER_MASK   0xFFFFF000
 Lower 32 bits of 64 bit MSI Base Address. More...
 

Root Port Error FIFO Read Register bitmaps and masks

#define XAXIPCIE_RPEFR_REQ_ID_MASK   0x0000FFFF
 Requester of Error Msg. More...
 
#define XAXIPCIE_RPEFR_ERR_TYPE_MASK   0x00030000
 Type of Error. More...
 
#define XAXIPCIE_RPEFR_ERR_VALID_MASK   0x00040000
 Error Read Succeeded Status. More...
 
#define XAXIPCIE_RPEFR_ERR_TYPE_SHIFT   16
 Type of Error Shift. More...
 
#define XAXIPCIE_RPEFR_ERR_VALID_SHIFT   18
 Error Read Succeeded Status Shift. More...
 

Root Port Interrupt FIFO Read 1 Register bitmaps and masks

#define XAXIPCIE_RPIFR1_REQ_ID_MASK   0x0000FFFF
 Requester Id of Interrupt Message. More...
 
#define XAXIPCIE_RPIFR1_MSI_ADDR_MASK   0x07FF0000
 MSI Address. More...
 
#define XAXIPCIE_RPIFR1_INTR_LINE_MASK   0x18000000
 Intr Line Mask. More...
 
#define XAXIPCIE_RPIFR1_INTR_ASSERT_MASK   0x20000000
 Whether Interrupt INTx is asserted. More...
 
#define XAXIPCIE_RPIFR1_MSIINTR_VALID_MASK   0x40000000
 Whether Interrupt is MSI or INTx. More...
 
#define XAXIPCIE_RPIFR1_INTR_VALID_MASK   0x80000000
 Interrupt Read Succeeded Status. More...
 
#define XAXIPCIE_RPIFR1_MSI_ADDR_SHIFT   16
 MSI Address Shift. More...
 
#define XAXIPCIE_RPIFR1_MSIINTR_VALID_SHIFT   30
 MSI/INTx Interrupt Shift. More...
 
#define XAXIPCIE_RPIFR1_INTR_VALID_SHIFT   31
 Interrupt Read Valid Shift. More...
 

Root Port Interrupt FIFO Read 2 Register bitmaps and masks

#define XAXIPCIE_RPIFR2_MSG_DATA_MASK   0x0000FFFF
 Pay Load for MSI Message. More...
 

ECAM Address Register bitmaps and masks

#define XAXIPCIE_ECAM_MASK   0x0FFFFFFF
 Mask of all valid bits. More...
 
#define XAXIPCIE_ECAM_BUS_MASK   0x0FF00000
 Bus Number Mask. More...
 
#define XAXIPCIE_ECAM_DEV_MASK   0x000F8000
 Device Number Mask. More...
 
#define XAXIPCIE_ECAM_FUN_MASK   0x00007000
 Function Number Mask. More...
 
#define XAXIPCIE_ECAM_REG_MASK   0x00000FFC
 Register Number Mask. More...
 
#define XAXIPCIE_ECAM_BYT_MASK   0x00000003
 Byte Address Mask. More...
 
#define XAXIPCIE_ECAM_BUS_SHIFT   20
 Bus Number Shift Value. More...
 
#define XAXIPCIE_ECAM_DEV_SHIFT   15
 Device Number Shift Value. More...
 
#define XAXIPCIE_ECAM_FUN_SHIFT   12
 Function Number Shift Value. More...
 
#define XAXIPCIE_ECAM_REG_SHIFT   2
 Register Number Shift Value. More...
 
#define XAXIPCIE_ECAM_BYT_SHIFT   0
 Byte Offset Shift Value. More...
 

Macro Definition Documentation

◆ XAXIPCIE_AXIBAR2PCIBAR_0L_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_0L_OFFSET   0x20C

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 0 lower 32 bits.

Referenced by XAxiPcie_GetLocalBusBar2PcieBar(), and XAxiPcie_SetLocalBusBar2PcieBar().

◆ XAXIPCIE_AXIBAR2PCIBAR_0U_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_0U_OFFSET   0x208

#include <xaxipcie_hw.h>

AXIBAR 2 PCIBAR translation 0 upper 32 bits.

Referenced by XAxiPcie_GetLocalBusBar2PcieBar(), and XAxiPcie_SetLocalBusBar2PcieBar().

◆ XAXIPCIE_AXIBAR2PCIBAR_1L_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_1L_OFFSET   0x214

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 1 lower 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_1U_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_1U_OFFSET   0x210

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 1 upper 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_2L_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_2L_OFFSET   0x21C

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 2 lower 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_2U_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_2U_OFFSET   0x218

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 2 upper 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_3L_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_3L_OFFSET   0x224

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 3 lower 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_3U_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_3U_OFFSET   0x220

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 3 upper 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_4L_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_4L_OFFSET   0x22C

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 4 lower 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_4U_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_4U_OFFSET   0x228

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 4 upper 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_5L_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_5L_OFFSET   0x234

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 5 lower 32 bits.

◆ XAXIPCIE_AXIBAR2PCIBAR_5U_OFFSET

#define XAXIPCIE_AXIBAR2PCIBAR_5U_OFFSET   0x230

#include <xaxipcie_hw.h>

AXIBAR to PCIBAR translation 5 upper 32 bits.

◆ XAXIPCIE_BI_ECAM_SIZE_MASK

#define XAXIPCIE_BI_ECAM_SIZE_MASK   0x00070000

#include <xaxipcie_hw.h>

ECAM size.

Referenced by XAxiPcie_CfgInitialize(), and XAxiPcie_GetBridgeInfo().

◆ XAXIPCIE_BI_ECAM_SIZE_SHIFT

#define XAXIPCIE_BI_ECAM_SIZE_SHIFT   16

#include <xaxipcie_hw.h>

PCIe ECAM Size Shift.

Referenced by XAxiPcie_CfgInitialize(), and XAxiPcie_GetBridgeInfo().

◆ XAXIPCIE_BI_GEN2_MASK

#define XAXIPCIE_BI_GEN2_MASK   0x00000001

#include <xaxipcie_hw.h>

PCIe Gen2 Speed Support Mask.

Referenced by XAxiPcie_GetBridgeInfo().

◆ XAXIPCIE_BI_OFFSET

#define XAXIPCIE_BI_OFFSET   0x130

#include <xaxipcie_hw.h>

Bridge Info Register.

Referenced by XAxiPcie_CfgInitialize(), and XAxiPcie_GetBridgeInfo().

◆ XAXIPCIE_BI_RP_MASK

#define XAXIPCIE_BI_RP_MASK   0x00000002

#include <xaxipcie_hw.h>

PCIe Root Port Support.

Referenced by XAxiPcie_GetBridgeInfo().

◆ XAXIPCIE_BI_RP_SHIFT

#define XAXIPCIE_BI_RP_SHIFT   1

#include <xaxipcie_hw.h>

PCIe Root Port Shift.

Referenced by XAxiPcie_GetBridgeInfo().

◆ XAXIPCIE_BL_BUS_MASK

#define XAXIPCIE_BL_BUS_MASK   0x0000FF00

#include <xaxipcie_hw.h>

Requester ID Bus Number.

Referenced by XAxiPcie_GetRequesterId().

◆ XAXIPCIE_BL_BUS_SHIFT

#define XAXIPCIE_BL_BUS_SHIFT   8

#include <xaxipcie_hw.h>

Requester ID Bus Number Shift Value.

Referenced by XAxiPcie_GetRequesterId().

◆ XAXIPCIE_BL_DEV_MASK

#define XAXIPCIE_BL_DEV_MASK   0x000000F8

#include <xaxipcie_hw.h>

Requester ID Device Number.

Referenced by XAxiPcie_GetRequesterId().

◆ XAXIPCIE_BL_DEV_SHIFT

#define XAXIPCIE_BL_DEV_SHIFT   3

#include <xaxipcie_hw.h>

Requester ID Device Number Shift Value.

Referenced by XAxiPcie_GetRequesterId().

◆ XAXIPCIE_BL_FUNC_MASK

#define XAXIPCIE_BL_FUNC_MASK   0x00000007

#include <xaxipcie_hw.h>

Requester ID Function Number.

Referenced by XAxiPcie_GetRequesterId().

◆ XAXIPCIE_BL_OFFSET

#define XAXIPCIE_BL_OFFSET   0x140

#include <xaxipcie_hw.h>

Bus Location Register.

Referenced by XAxiPcie_GetRequesterId().

◆ XAXIPCIE_BL_PORT_MASK

#define XAXIPCIE_BL_PORT_MASK   0x00FF0000

#include <xaxipcie_hw.h>

Requester ID Port Number.

Referenced by XAxiPcie_GetRequesterId().

◆ XAXIPCIE_BL_PORT_SHIFT

#define XAXIPCIE_BL_PORT_SHIFT   16

#include <xaxipcie_hw.h>

Requester ID Bus Number Shift Value.

Referenced by XAxiPcie_GetRequesterId().

◆ XAXIPCIE_BSC_ECAM_BUSY_MASK

#define XAXIPCIE_BSC_ECAM_BUSY_MASK   0x00000001

#include <xaxipcie_hw.h>

ECAM Busy Status.

◆ XAXIPCIE_BSC_GI_MASK

#define XAXIPCIE_BSC_GI_MASK   0x00000100

#include <xaxipcie_hw.h>

Global Interrupt Disable.

Referenced by XAxiPcie_DisableGlobalInterrupt(), and XAxiPcie_EnableGlobalInterrupt().

◆ XAXIPCIE_BSC_GI_SHIFT

#define XAXIPCIE_BSC_GI_SHIFT   8

#include <xaxipcie_hw.h>

Global Interrupt Disable Shift.

Referenced by XAxiPcie_DisableGlobalInterrupt(), and XAxiPcie_EnableGlobalInterrupt().

◆ XAXIPCIE_BSC_OFFSET

#define XAXIPCIE_BSC_OFFSET   0x134

#include <xaxipcie_hw.h>

Bridge Status and Control Register.

Referenced by XAxiPcie_DisableGlobalInterrupt(), and XAxiPcie_EnableGlobalInterrupt().

◆ XAXIPCIE_BSC_RO_MASK

#define XAXIPCIE_BSC_RO_MASK   0x00020000

#include <xaxipcie_hw.h>

RW Permissions to RO Registers.

◆ XAXIPCIE_BSC_RO_SHIFT

#define XAXIPCIE_BSC_RO_SHIFT   17

#include <xaxipcie_hw.h>

RO as RW Shift.

◆ XAXIPCIE_BSC_RW1C_MASK

#define XAXIPCIE_BSC_RW1C_MASK   0x00010000

#include <xaxipcie_hw.h>

RW Permissions to RW1C Registers.

◆ XAXIPCIE_BSC_RW1C_SHIFT

#define XAXIPCIE_BSC_RW1C_SHIFT   16

#include <xaxipcie_hw.h>

RW1C Shift.

◆ XAXIPCIE_ECAM_BUS_MASK

#define XAXIPCIE_ECAM_BUS_MASK   0x0FF00000

#include <xaxipcie_hw.h>

Bus Number Mask.

◆ XAXIPCIE_ECAM_BUS_SHIFT

#define XAXIPCIE_ECAM_BUS_SHIFT   20

#include <xaxipcie_hw.h>

Bus Number Shift Value.

◆ XAXIPCIE_ECAM_BYT_MASK

#define XAXIPCIE_ECAM_BYT_MASK   0x00000003

#include <xaxipcie_hw.h>

Byte Address Mask.

◆ XAXIPCIE_ECAM_BYT_SHIFT

#define XAXIPCIE_ECAM_BYT_SHIFT   0

#include <xaxipcie_hw.h>

Byte Offset Shift Value.

◆ XAXIPCIE_ECAM_DEV_MASK

#define XAXIPCIE_ECAM_DEV_MASK   0x000F8000

#include <xaxipcie_hw.h>

Device Number Mask.

◆ XAXIPCIE_ECAM_DEV_SHIFT

#define XAXIPCIE_ECAM_DEV_SHIFT   15

#include <xaxipcie_hw.h>

Device Number Shift Value.

◆ XAXIPCIE_ECAM_FUN_MASK

#define XAXIPCIE_ECAM_FUN_MASK   0x00007000

#include <xaxipcie_hw.h>

Function Number Mask.

◆ XAXIPCIE_ECAM_FUN_SHIFT

#define XAXIPCIE_ECAM_FUN_SHIFT   12

#include <xaxipcie_hw.h>

Function Number Shift Value.

◆ XAXIPCIE_ECAM_MASK

#define XAXIPCIE_ECAM_MASK   0x0FFFFFFF

#include <xaxipcie_hw.h>

Mask of all valid bits.

◆ XAXIPCIE_ECAM_REG_MASK

#define XAXIPCIE_ECAM_REG_MASK   0x00000FFC

#include <xaxipcie_hw.h>

Register Number Mask.

◆ XAXIPCIE_ECAM_REG_SHIFT

#define XAXIPCIE_ECAM_REG_SHIFT   2

#include <xaxipcie_hw.h>

Register Number Shift Value.

◆ XAXIPCIE_ID_CFG_COMPL_STATE_MASK

#define XAXIPCIE_ID_CFG_COMPL_STATE_MASK   0x000000E0

#include <xaxipcie_hw.h>

Cfg Completion Status Mask.

◆ XAXIPCIE_ID_CFG_TIMEOUT_MASK

#define XAXIPCIE_ID_CFG_TIMEOUT_MASK   0x00000100

#include <xaxipcie_hw.h>

Cfg timeout Mask.

◆ XAXIPCIE_ID_CLEAR_ALL_MASK

#define XAXIPCIE_ID_CLEAR_ALL_MASK   0xFFFFFFFF

#include <xaxipcie_hw.h>

Mask of all Interrupts.

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAXIPCIE_ID_CMPL_ABT_MASK

#define XAXIPCIE_ID_CMPL_ABT_MASK   0x01000000

#include <xaxipcie_hw.h>

Slave completion Abort Mask.

◆ XAXIPCIE_ID_CMPL_TIMEOUT_MASK

#define XAXIPCIE_ID_CMPL_TIMEOUT_MASK   0x00400000

#include <xaxipcie_hw.h>

Slave completion Time Mask.

◆ XAXIPCIE_ID_CORRECTABLE_ERR_MASK

#define XAXIPCIE_ID_CORRECTABLE_ERR_MASK   0x00000200

#include <xaxipcie_hw.h>

Correctable Error Mask.

◆ XAXIPCIE_ID_DECODE_ERR_MASK

#define XAXIPCIE_ID_DECODE_ERR_MASK   0x04000000

#include <xaxipcie_hw.h>

Master Decode Error Interrupt Mask.

◆ XAXIPCIE_ID_ECRC_ERR_MASK

#define XAXIPCIE_ID_ECRC_ERR_MASK   0x00000002

#include <xaxipcie_hw.h>

Rx Packet CRC failed.

◆ XAXIPCIE_ID_FATAL_ERR_MASK

#define XAXIPCIE_ID_FATAL_ERR_MASK   0x00000800

#include <xaxipcie_hw.h>

Fatal Error Mask.

◆ XAXIPCIE_ID_HOT_RST_MASK

#define XAXIPCIE_ID_HOT_RST_MASK   0x00000008

#include <xaxipcie_hw.h>

Hot Reset Mask.

◆ XAXIPCIE_ID_ILL_BURST_MASK

#define XAXIPCIE_ID_ILL_BURST_MASK   0x02000000

#include <xaxipcie_hw.h>

Slave Illegal Burst Mask.

◆ XAXIPCIE_ID_INTX_INTERRUPT

#define XAXIPCIE_ID_INTX_INTERRUPT   0x00010000

#include <xaxipcie_hw.h>

INTX Interrupt.

◆ XAXIPCIE_ID_LINK_DOWN_MASK

#define XAXIPCIE_ID_LINK_DOWN_MASK   0x00000001

#include <xaxipcie_hw.h>

Link Down Mask.

◆ XAXIPCIE_ID_MASTER_EP_MASK

#define XAXIPCIE_ID_MASTER_EP_MASK   0x10000000

#include <xaxipcie_hw.h>

Master Error Poison Mask.

◆ XAXIPCIE_ID_MSI_INTERRUPT

#define XAXIPCIE_ID_MSI_INTERRUPT   0x00020000

#include <xaxipcie_hw.h>

MSI Interrupt.

◆ XAXIPCIE_ID_NONFATAL_ERR_MASK

#define XAXIPCIE_ID_NONFATAL_ERR_MASK   0x00000400

#include <xaxipcie_hw.h>

Non-Fatal Error Mask.

◆ XAXIPCIE_ID_OFFSET

#define XAXIPCIE_ID_OFFSET   0x138

#include <xaxipcie_hw.h>

Interrupt Decode Register.

Referenced by XAxiPcie_ClearPendingInterrupts(), and XAxiPcie_GetPendingInterrupts().

◆ XAXIPCIE_ID_SLAVE_ERR_MASK

#define XAXIPCIE_ID_SLAVE_ERR_MASK   0x08000000

#include <xaxipcie_hw.h>

Master Slave Error Interrupt Mask.

◆ XAXIPCIE_ID_SLV_EP_MASK

#define XAXIPCIE_ID_SLV_EP_MASK   0x00800000

#include <xaxipcie_hw.h>

Slave Error Poison Mask.

◆ XAXIPCIE_ID_STR_ERR_MASK

#define XAXIPCIE_ID_STR_ERR_MASK   0x00000004

#include <xaxipcie_hw.h>

Streaming Error Mask.

◆ XAXIPCIE_ID_UNEXP_CMPL_MASK

#define XAXIPCIE_ID_UNEXP_CMPL_MASK   0x00200000

#include <xaxipcie_hw.h>

Slave Unexpected Completion Mask.

◆ XAXIPCIE_ID_UNSUPP_CMPL_MASK

#define XAXIPCIE_ID_UNSUPP_CMPL_MASK   0x00100000

#include <xaxipcie_hw.h>

Slave Unsupported Request Mask.

◆ XAXIPCIE_IM_DISABLE_ALL_MASK

#define XAXIPCIE_IM_DISABLE_ALL_MASK   0x00000000

#include <xaxipcie_hw.h>

Disable All Interrupts.

Referenced by XAxiPcie_CfgInitialize().

◆ XAXIPCIE_IM_ENABLE_ALL_MASK

#define XAXIPCIE_IM_ENABLE_ALL_MASK   0xFFFFFFFF

#include <xaxipcie_hw.h>

Enable All Interrupts.

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAXIPCIE_IM_OFFSET

#define XAXIPCIE_IM_OFFSET   0x13C

◆ XAxiPcie_IsEcamBusy

#define XAxiPcie_IsEcamBusy (   InstancePtr)

#include <xaxipcie.h>

Value:
(XAxiPcie_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XAXIPCIE_BSC_ECAM_BUSY_MASK
ECAM Busy Status.
Definition: xaxipcie_hw.h:361
#define XAxiPcie_ReadReg(BaseAddress, RegOffset)
Macro to read register.
Definition: xaxipcie_hw.h:811
#define XAXIPCIE_BSC_OFFSET
Bridge Status and Control Register.
Definition: xaxipcie_hw.h:106

Check whether ECAM is busy or not.

Parameters
InstancePtris the XAxiPcie instance to operate on.
Returns
  • TRUE if ECAM is busy
  • FALSE if ECAM is idel
Note
This function is valid only when IP is configured as a root complex

◆ XAxiPcie_IsLinkUp

#define XAxiPcie_IsLinkUp (   InstancePtr)

#include <xaxipcie.h>

Value:
(XAxiPcie_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XAXIPCIE_PHYSC_LINK_UP_MASK
Link Up Status Mask.
Definition: xaxipcie_hw.h:508
#define XAxiPcie_ReadReg(BaseAddress, RegOffset)
Macro to read register.
Definition: xaxipcie_hw.h:811
#define XAXIPCIE_PHYSC_OFFSET
Physical status and Control Register.
Definition: xaxipcie_hw.h:132

Check whether link is up or not.

Parameters
InstancePtris the XAxiPcie instance to operate on.
Returns
  • TRUE if link is up
  • FALSE if link is down
Note
None

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAXIPCIE_PCIE_CORE_OFFSET

#define XAXIPCIE_PCIE_CORE_OFFSET   0x000

#include <xaxipcie_hw.h>

PCI Express hard core configuration register offset.

Referenced by XAxiPcie_ReadLocalConfigSpace().

◆ XAXIPCIE_PHYSC_DLA_MASK

#define XAXIPCIE_PHYSC_DLA_MASK   0x00080000

#include <xaxipcie_hw.h>

Directed Link Change change to reliability or Autonomus Mask.

◆ XAXIPCIE_PHYSC_DLA_SHIFT

#define XAXIPCIE_PHYSC_DLA_SHIFT   19

#include <xaxipcie_hw.h>

Directed Link change to reliability or Autonomus Shift.

◆ XAXIPCIE_PHYSC_DLC_MASK

#define XAXIPCIE_PHYSC_DLC_MASK   0x00300000

#include <xaxipcie_hw.h>

Directed Link change Mask.

◆ XAXIPCIE_PHYSC_DLC_SHIFT

#define XAXIPCIE_PHYSC_DLC_SHIFT   20

#include <xaxipcie_hw.h>

Directed Link change Shift.

◆ XAXIPCIE_PHYSC_DLW_MASK

#define XAXIPCIE_PHYSC_DLW_MASK   0x00030000

#include <xaxipcie_hw.h>

Directed Link Width to change Mask.

◆ XAXIPCIE_PHYSC_DLW_SHIFT

#define XAXIPCIE_PHYSC_DLW_SHIFT   16

#include <xaxipcie_hw.h>

Directed Link Width to change Shift.

◆ XAXIPCIE_PHYSC_DLWS_MASK

#define XAXIPCIE_PHYSC_DLWS_MASK   0x00040000

#include <xaxipcie_hw.h>

Directed Link Width Speed to change Mask.

◆ XAXIPCIE_PHYSC_DLWS_SHIFT

#define XAXIPCIE_PHYSC_DLWS_SHIFT   18

#include <xaxipcie_hw.h>

Directed Link Width Speed to change Shift.

◆ XAXIPCIE_PHYSC_LANE_REV_MASK

#define XAXIPCIE_PHYSC_LANE_REV_MASK   0x00000600

#include <xaxipcie_hw.h>

Lane Reversal Mask.

◆ XAXIPCIE_PHYSC_LANE_REV_SHIFT

#define XAXIPCIE_PHYSC_LANE_REV_SHIFT   9

#include <xaxipcie_hw.h>

Lane Reversal Shift.

◆ XAXIPCIE_PHYSC_LINK_RATE_MASK

#define XAXIPCIE_PHYSC_LINK_RATE_MASK   0x00000001

#include <xaxipcie_hw.h>

Link Rate.

◆ XAXIPCIE_PHYSC_LINK_UP_MASK

#define XAXIPCIE_PHYSC_LINK_UP_MASK   0x00000800

#include <xaxipcie_hw.h>

Link Up Status Mask.

◆ XAXIPCIE_PHYSC_LINK_UP_SHIFT

#define XAXIPCIE_PHYSC_LINK_UP_SHIFT   11

#include <xaxipcie_hw.h>

Link Up Status Shift.

◆ XAXIPCIE_PHYSC_LINK_WIDTH_MASK

#define XAXIPCIE_PHYSC_LINK_WIDTH_MASK   0x00000006

#include <xaxipcie_hw.h>

Link Width Mask.

◆ XAXIPCIE_PHYSC_LINK_WIDTH_SHIFT

#define XAXIPCIE_PHYSC_LINK_WIDTH_SHIFT   1

#include <xaxipcie_hw.h>

Link Status Shift.

◆ XAXIPCIE_PHYSC_LTSSM_STATE_MASK

#define XAXIPCIE_PHYSC_LTSSM_STATE_MASK   0x000001F8

#include <xaxipcie_hw.h>

LTSSM State Mask.

◆ XAXIPCIE_PHYSC_LTSSM_STATE_SHIFT

#define XAXIPCIE_PHYSC_LTSSM_STATE_SHIFT   3

#include <xaxipcie_hw.h>

LTSSM State Shift.

◆ XAXIPCIE_PHYSC_OFFSET

#define XAXIPCIE_PHYSC_OFFSET   0x144

#include <xaxipcie_hw.h>

Physical status and Control Register.

Referenced by XAxiPcie_GetPhyStatusCtrl().

◆ XAxiPcie_ReadReg

#define XAxiPcie_ReadReg (   BaseAddress,
  RegOffset 
)    Xil_In32((BaseAddress) + (RegOffset))

◆ XAXIPCIE_RPEFR_ERR_TYPE_MASK

#define XAXIPCIE_RPEFR_ERR_TYPE_MASK   0x00030000

#include <xaxipcie_hw.h>

Type of Error.

◆ XAXIPCIE_RPEFR_ERR_TYPE_SHIFT

#define XAXIPCIE_RPEFR_ERR_TYPE_SHIFT   16

#include <xaxipcie_hw.h>

Type of Error Shift.

◆ XAXIPCIE_RPEFR_ERR_VALID_MASK

#define XAXIPCIE_RPEFR_ERR_VALID_MASK   0x00040000

#include <xaxipcie_hw.h>

Error Read Succeeded Status.

◆ XAXIPCIE_RPEFR_ERR_VALID_SHIFT

#define XAXIPCIE_RPEFR_ERR_VALID_SHIFT   18

#include <xaxipcie_hw.h>

Error Read Succeeded Status Shift.

◆ XAXIPCIE_RPEFR_OFFSET

#define XAXIPCIE_RPEFR_OFFSET   0x154

#include <xaxipcie_hw.h>

Root Port Error FIFO Read Register.

◆ XAXIPCIE_RPEFR_REQ_ID_MASK

#define XAXIPCIE_RPEFR_REQ_ID_MASK   0x0000FFFF

#include <xaxipcie_hw.h>

Requester of Error Msg.

◆ XAXIPCIE_RPIFR1_INTR_ASSERT_MASK

#define XAXIPCIE_RPIFR1_INTR_ASSERT_MASK   0x20000000

#include <xaxipcie_hw.h>

Whether Interrupt INTx is asserted.

◆ XAXIPCIE_RPIFR1_INTR_LINE_MASK

#define XAXIPCIE_RPIFR1_INTR_LINE_MASK   0x18000000

#include <xaxipcie_hw.h>

Intr Line Mask.

◆ XAXIPCIE_RPIFR1_INTR_VALID_MASK

#define XAXIPCIE_RPIFR1_INTR_VALID_MASK   0x80000000

#include <xaxipcie_hw.h>

Interrupt Read Succeeded Status.

◆ XAXIPCIE_RPIFR1_INTR_VALID_SHIFT

#define XAXIPCIE_RPIFR1_INTR_VALID_SHIFT   31

#include <xaxipcie_hw.h>

Interrupt Read Valid Shift.

◆ XAXIPCIE_RPIFR1_MSI_ADDR_MASK

#define XAXIPCIE_RPIFR1_MSI_ADDR_MASK   0x07FF0000

#include <xaxipcie_hw.h>

MSI Address.

◆ XAXIPCIE_RPIFR1_MSI_ADDR_SHIFT

#define XAXIPCIE_RPIFR1_MSI_ADDR_SHIFT   16

#include <xaxipcie_hw.h>

MSI Address Shift.

◆ XAXIPCIE_RPIFR1_MSIINTR_VALID_MASK

#define XAXIPCIE_RPIFR1_MSIINTR_VALID_MASK   0x40000000

#include <xaxipcie_hw.h>

Whether Interrupt is MSI or INTx.

◆ XAXIPCIE_RPIFR1_MSIINTR_VALID_SHIFT

#define XAXIPCIE_RPIFR1_MSIINTR_VALID_SHIFT   30

#include <xaxipcie_hw.h>

MSI/INTx Interrupt Shift.

◆ XAXIPCIE_RPIFR1_OFFSET

#define XAXIPCIE_RPIFR1_OFFSET   0x158

#include <xaxipcie_hw.h>

Root Port Interrupt FIFO Read1 Register.

◆ XAXIPCIE_RPIFR1_REQ_ID_MASK

#define XAXIPCIE_RPIFR1_REQ_ID_MASK   0x0000FFFF

#include <xaxipcie_hw.h>

Requester Id of Interrupt Message.

◆ XAXIPCIE_RPIFR2_MSG_DATA_MASK

#define XAXIPCIE_RPIFR2_MSG_DATA_MASK   0x0000FFFF

#include <xaxipcie_hw.h>

Pay Load for MSI Message.

◆ XAXIPCIE_RPIFR2_OFFSET

#define XAXIPCIE_RPIFR2_OFFSET   0x15C

#include <xaxipcie_hw.h>

Root Port Interrupt FIFO Read2 Register.

◆ XAXIPCIE_RPMSIB_LOWER_MASK

#define XAXIPCIE_RPMSIB_LOWER_MASK   0xFFFFF000

#include <xaxipcie_hw.h>

Lower 32 bits of 64 bit MSI Base Address.

◆ XAXIPCIE_RPMSIB_LOWER_OFFSET

#define XAXIPCIE_RPMSIB_LOWER_OFFSET   0x150

#include <xaxipcie_hw.h>

Root Port MSI Base 2 Register Lower 32 bits from 64 bit address are written.

◆ XAXIPCIE_RPMSIB_UPPER_MASK

#define XAXIPCIE_RPMSIB_UPPER_MASK   0xFFFFFFFF

#include <xaxipcie_hw.h>

Upper 32 bits of 64 bit MSI Base Address.

◆ XAXIPCIE_RPMSIB_UPPER_OFFSET

#define XAXIPCIE_RPMSIB_UPPER_OFFSET   0x14C

#include <xaxipcie_hw.h>

Root Port MSI Base 1 Register Upper 32 bits from 64 bit address are written.

◆ XAXIPCIE_RPSC_BRIDGE_ENABLE_MASK

#define XAXIPCIE_RPSC_BRIDGE_ENABLE_MASK   0x00000001

#include <xaxipcie_hw.h>

Bridge Enable Mask.

◆ XAXIPCIE_RPSC_COMP_TIMEOUT_MASK

#define XAXIPCIE_RPSC_COMP_TIMEOUT_MASK   0x0FF00000

#include <xaxipcie_hw.h>

Root Port Completion Timeout.

◆ XAXIPCIE_RPSC_COMP_TIMEOUT_SHIFT

#define XAXIPCIE_RPSC_COMP_TIMEOUT_SHIFT   20

#include <xaxipcie_hw.h>

Root Port Completion Timeout Shift.

◆ XAXIPCIE_RPSC_ERR_FIFO_NOT_EMPTY_MASK

#define XAXIPCIE_RPSC_ERR_FIFO_NOT_EMPTY_MASK   0x00010000

#include <xaxipcie_hw.h>

Root Port Error FIFO Not Empty.

◆ XAXIPCIE_RPSC_ERR_FIFO_NOT_EMPTY_SHIFT

#define XAXIPCIE_RPSC_ERR_FIFO_NOT_EMPTY_SHIFT   16

#include <xaxipcie_hw.h>

Root Port Error FIFO Empty Shift.

◆ XAXIPCIE_RPSC_ERR_FIFO_OVERFLOW_MASK

#define XAXIPCIE_RPSC_ERR_FIFO_OVERFLOW_MASK   0x00020000

#include <xaxipcie_hw.h>

Root Port Error FIFO Overflow.

◆ XAXIPCIE_RPSC_ERR_FIFO_OVERFLOW_SHIFT

#define XAXIPCIE_RPSC_ERR_FIFO_OVERFLOW_SHIFT   17

#include <xaxipcie_hw.h>

Root Port Error FIFO Overflow Shift.

◆ XAXIPCIE_RPSC_INT_FIFO_NOT_EMPTY_MASK

#define XAXIPCIE_RPSC_INT_FIFO_NOT_EMPTY_MASK   0x00040000

#include <xaxipcie_hw.h>

Root Port Interrupt FIFO Not Empty.

◆ XAXIPCIE_RPSC_INT_FIFO_NOT_EMPTY_SHIFT

#define XAXIPCIE_RPSC_INT_FIFO_NOT_EMPTY_SHIFT   18

#include <xaxipcie_hw.h>

Root Port Interrupt FIFO Empty Shift.

◆ XAXIPCIE_RPSC_INT_FIFO_OVERFLOW_MASK

#define XAXIPCIE_RPSC_INT_FIFO_OVERFLOW_MASK   0x00080000

#include <xaxipcie_hw.h>

Root Port Interrupt FIFO Overflow.

◆ XAXIPCIE_RPSC_INT_FIFO_OVERFLOW_SHIFT

#define XAXIPCIE_RPSC_INT_FIFO_OVERFLOW_SHIFT   19

#include <xaxipcie_hw.h>

Root Port Interrupt FIFO Overflow Shift.

◆ XAXIPCIE_RPSC_MASK

#define XAXIPCIE_RPSC_MASK   0x0FFF0001

#include <xaxipcie_hw.h>

Root Port Register mask.

◆ XAXIPCIE_RPSC_OFFSET

#define XAXIPCIE_RPSC_OFFSET   0x148

#include <xaxipcie_hw.h>

Root Port Status & Control Register.

◆ XAXIPCIE_UP_CONFIG_CAPABLE

#define XAXIPCIE_UP_CONFIG_CAPABLE   0x00000004

#include <xaxipcie_hw.h>

Up Config Capable.

◆ XAXIPCIE_VSEC1

#define XAXIPCIE_VSEC1   0x00

#include <xaxipcie.h>

First VSEC Register.

◆ XAXIPCIE_VSEC2

#define XAXIPCIE_VSEC2   0x01

#include <xaxipcie.h>

Second VSEC Register.

◆ XAXIPCIE_VSECC_ID_MASK

#define XAXIPCIE_VSECC_ID_MASK   0x0000FFFF

#include <xaxipcie_hw.h>

Vsec capability Id.

◆ XAXIPCIE_VSECC_NEXT_MASK

#define XAXIPCIE_VSECC_NEXT_MASK   0xFFF00000

#include <xaxipcie_hw.h>

Offset to next capability.

◆ XAXIPCIE_VSECC_NEXT_SHIFT

#define XAXIPCIE_VSECC_NEXT_SHIFT   20

#include <xaxipcie_hw.h>

Next capability offset shift.

◆ XAXIPCIE_VSECC_OFFSET

#define XAXIPCIE_VSECC_OFFSET   0x128

#include <xaxipcie_hw.h>

VSEC Capability Register.

Referenced by XAxiPcie_GetVsecCapability().

◆ XAXIPCIE_VSECC_VER_MASK

#define XAXIPCIE_VSECC_VER_MASK   0x000F0000

#include <xaxipcie_hw.h>

Version of capability Structure.

◆ XAXIPCIE_VSECC_VER_SHIFT

#define XAXIPCIE_VSECC_VER_SHIFT   16

#include <xaxipcie_hw.h>

VSEC Version shift.

◆ XAXIPCIE_VSECH_ID_MASK

#define XAXIPCIE_VSECH_ID_MASK   0x0000FFFF

#include <xaxipcie_hw.h>

Vsec structure Id.

◆ XAXIPCIE_VSECH_LEN_MASK

#define XAXIPCIE_VSECH_LEN_MASK   0xFFF00000

#include <xaxipcie_hw.h>

Length of Vsec capability structure.

◆ XAXIPCIE_VSECH_LEN_SHIFT

#define XAXIPCIE_VSECH_LEN_SHIFT   20

#include <xaxipcie_hw.h>

Vsec length shift.

◆ XAXIPCIE_VSECH_OFFSET

#define XAXIPCIE_VSECH_OFFSET   0x12C

#include <xaxipcie_hw.h>

VSEC Header Register.

Referenced by XAxiPcie_GetVsecHeader().

◆ XAXIPCIE_VSECH_REV_MASK

#define XAXIPCIE_VSECH_REV_MASK   0x000F0000

#include <xaxipcie_hw.h>

Vsec header version.

◆ XAXIPCIE_VSECH_REV_SHIFT

#define XAXIPCIE_VSECH_REV_SHIFT   16

#include <xaxipcie_hw.h>

Vsec version shift.

◆ XAxiPcie_WriteReg

#define XAxiPcie_WriteReg (   BaseAddress,
  RegOffset,
  Data 
)    Xil_Out32((BaseAddress) + (RegOffset), (Data))

#include <xaxipcie_hw.h>

Macro to write register.

Parameters
BaseAddressis the base address of the PCIe.
RegOffsetis the register offset.
Datais the data to write.
Returns
None
Note
C-style signature: void XAxiPcie_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)

Referenced by XAxiPcie_ClearPendingInterrupts(), XAxiPcie_DisableGlobalInterrupt(), XAxiPcie_DisableInterrupts(), XAxiPcie_EnableGlobalInterrupt(), XAxiPcie_EnableInterrupts(), and XAxiPcie_SetLocalBusBar2PcieBar().

Function Documentation

◆ XAxiPcie_CfgInitialize()

int XAxiPcie_CfgInitialize ( XAxiPcie InstancePtr,
XAxiPcie_Config CfgPtr,
UINTPTR  EffectiveAddress 
)

#include <xaxipcie.h>

Initialize the XAxiPcie instance provided by the caller based on the given Config structure.

Parameters
InstancePtris the XAxiPcie instance to operate on.The memory of the pointer references must be pre-allocated by the caller.
CfgPtris the device configuration structure containing required HW build data.
EffectiveAddressis the Physical address of the hardware in a Virtual Memory operating system environment.It is the Base Address in a stand alone environment.
Returns
            - XST_SUCCESS Initialization was successful.
Note
None.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAxiPcie::MaxNumOfBuses, XAXIPCIE_BI_ECAM_SIZE_MASK, XAXIPCIE_BI_ECAM_SIZE_SHIFT, XAXIPCIE_BI_OFFSET, XAxiPcie_DisableInterrupts(), XAXIPCIE_IM_DISABLE_ALL_MASK, and XAxiPcie_ReadReg.

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAxiPcie_ClearPendingInterrupts()

void XAxiPcie_ClearPendingInterrupts ( XAxiPcie InstancePtr,
u32  ClearMask 
)

#include <xaxipcie.h>

Clear the currently pending interrupt bits of the IP passed from the caller into "ClearMask".

Parameters
InstancePtris the XAxiPcie instance to operate on.
ClearMaskis the bit pattern for pending interrupts wanted to be cleared.
Returns
None.
Note
None.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_ID_OFFSET, XAxiPcie_ReadReg, and XAxiPcie_WriteReg.

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAxiPcie_ClearRootPortErrFIFOMsg()

void XAxiPcie_ClearRootPortErrFIFOMsg ( XAxiPcie InstancePtr)

#include <xaxipcie.h>

Clear Root Port Error FIFO Message.

Parameters
InstancePtris the PCIe component to operate on.
Returns
None.
Note
This function is valid only when IP is configured as a root complex.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_ClearRootPortIntFIFOReg()

void XAxiPcie_ClearRootPortIntFIFOReg ( XAxiPcie InstancePtr)

#include <xaxipcie.h>

Clear Root Port FIFO Interrupt message Register 1 & 2.

Parameters
InstancePtris the PCIe component to operate on
Returns
None.
Note
This function is valid only when IP is configured as a root complex.Clearing any one Interrupt FIFO register clears both registers.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_DisableGlobalInterrupt()

void XAxiPcie_DisableGlobalInterrupt ( XAxiPcie InstancePtr)

#include <xaxipcie.h>

Disable the Global Interrupt.

Parameters
InstancePtris the XAxiPcie instance to operate on.
Returns
None
Note
This bit is in the Bridge Status and Control Register.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_BSC_GI_MASK, XAXIPCIE_BSC_GI_SHIFT, XAXIPCIE_BSC_OFFSET, XAxiPcie_ReadReg, and XAxiPcie_WriteReg.

◆ XAxiPcie_DisableInterrupts()

void XAxiPcie_DisableInterrupts ( XAxiPcie InstancePtr,
u32  DisableMask 
)

#include <xaxipcie.h>

Disable the IP interrupt bits passed into "DisableMask".

Parameters
InstancePtris the XAxiPcie instance to operate on.
DisableMaskis the bit pattern for interrupts wanted to be disabled.
Returns
None
Note
If an interrupt is already disabled before calling this function, it will stay disabled regardless of the value of "DisableMask" passed from the caller.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_IM_OFFSET, XAxiPcie_ReadReg, and XAxiPcie_WriteReg.

Referenced by PCIeEndPointInitialize(), PcieInitRootComplex(), and XAxiPcie_CfgInitialize().

◆ XAxiPcie_EnableGlobalInterrupt()

void XAxiPcie_EnableGlobalInterrupt ( XAxiPcie InstancePtr)

#include <xaxipcie.h>

Enable the Global Interrupt.

Parameters
InstancePtris the XAxiPcie instance to operate on.
Returns
None
Note
This bit is in the Bridge Status and Control Register.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_BSC_GI_MASK, XAXIPCIE_BSC_GI_SHIFT, XAXIPCIE_BSC_OFFSET, XAxiPcie_ReadReg, and XAxiPcie_WriteReg.

◆ XAxiPcie_EnableInterrupts()

void XAxiPcie_EnableInterrupts ( XAxiPcie InstancePtr,
u32  EnableMask 
)

#include <xaxipcie.h>

Enable the IP interrupt bits passed into "EnableMask".

Parameters
InstancePtris the XAxiPcie instance to operate on.
EnableMaskis the bit pattern for interrupts wanted to be enabled.
Returns
None
Note
If an interrupt is already enabled before calling this function, it will stay enabled regardless of the value of "EnableMask" passed from the caller.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_IM_OFFSET, XAxiPcie_ReadReg, and XAxiPcie_WriteReg.

◆ XAxiPcie_GetBridgeInfo()

void XAxiPcie_GetBridgeInfo ( XAxiPcie InstancePtr,
u8 *  Gen2Ptr,
u8 *  RootPortPtr,
u8 *  ECAMSizePtr 
)

#include <xaxipcie.h>

This API Reads the Bridge info register.

Parameters
InstancePtris the XAxiPcie instance to operate on.
Gen2Ptris a pointer to a variable indicating whether underlying PCIe block support PCIe Gen2 Speed.
RootPortPtris a pointer to a variable indication whether underlying PCIe block is root port.
ECAMSizePtris a pointer to a variable where it indicates ECAM size. Value is between 1 to 8. Total address bits dedicated to ECAM is 20 + ECAM size.
Returns
None.
Note
None

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_BI_ECAM_SIZE_MASK, XAXIPCIE_BI_ECAM_SIZE_SHIFT, XAXIPCIE_BI_GEN2_MASK, XAXIPCIE_BI_OFFSET, XAXIPCIE_BI_RP_MASK, XAXIPCIE_BI_RP_SHIFT, and XAxiPcie_ReadReg.

◆ XAxiPcie_GetEnabledInterrupts()

void XAxiPcie_GetEnabledInterrupts ( XAxiPcie InstancePtr,
u32 *  EnabledMaskPtr 
)

#include <xaxipcie.h>

Get the currently enabled interrupt bits of the IP and pass them back to the caller into "EnabledMask".

Parameters
InstancePtris the XAxiPcie instance to operate on.
EnabledMaskPtris a pointer to a variable where the driver will pass back the enabled interrupt bits after reading them from IP.
Returns
None.
Note
None.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_IM_OFFSET, and XAxiPcie_ReadReg.

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAxiPcie_GetLocalBusBar2PcieBar()

void XAxiPcie_GetLocalBusBar2PcieBar ( XAxiPcie InstancePtr,
u8  BarNumber,
XAxiPcie_BarAddr BarAddrPtr 
)

#include <xaxipcie.h>

Read PCIe address translation vector that corresponds to one of AXI local bus bars passed by the caller.

Parameters
InstancePtris the XAxiPcie instance to operate on.
BarNumberis AXI bar number (0 - 5) passed by caller.
BarAddrPtris a pointer to a variable where the driver will . pass back translation vector.
Returns
None.
Note
None.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie_Config::IncludeBarOffsetReg, XAxiPcie_BarAddr::LowerAddr, XAxiPcie_BarAddr::UpperAddr, XAXIPCIE_AXIBAR2PCIBAR_0L_OFFSET, XAXIPCIE_AXIBAR2PCIBAR_0U_OFFSET, and XAxiPcie_ReadReg.

Referenced by PcieInitRootComplex().

◆ XAxiPcie_GetPendingInterrupts()

void XAxiPcie_GetPendingInterrupts ( XAxiPcie InstancePtr,
u32 *  PendingMaskPtr 
)

#include <xaxipcie.h>

Get the currently pending interrupt bits of the IP and pass them back to the caller into "PendingMask".

Parameters
InstancePtris the XAxiPcie instance to operate on.
PendingMaskPtris a pointer to a variable where the driver will pass back the pending interrupt bits after reading them from IP.
Returns
None.
Note
None.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_ID_OFFSET, and XAxiPcie_ReadReg.

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAxiPcie_GetPhyStatusCtrl()

void XAxiPcie_GetPhyStatusCtrl ( XAxiPcie InstancePtr,
u32 *  PhyState 
)

#include <xaxipcie.h>

This API is used to read the Phy Status/Control Register.

Parameters
InstancePtris the XAxiPcie instance to operate on.
PhyStateis a pointer to a variable where the driver will pass back Current physical status.
Returns
None.
Note
None.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_PHYSC_OFFSET, and XAxiPcie_ReadReg.

◆ XAxiPcie_GetRequesterId()

void XAxiPcie_GetRequesterId ( XAxiPcie InstancePtr,
u8 *  BusNumPtr,
u8 *  DevNumPtr,
u8 *  FunNumPtr,
u8 *  PortNumPtr 
)

#include <xaxipcie.h>

Read the Bus Location register.

Parameters
InstancePtris the XAxiPcie instance to operate on.
BusNumPtris a pointer to a variable where the driver will pass back the bus number of requester ID assigned to IP.
DevNumPtris a pointer to a variable where the driver will pass back the device number of requester ID assigned to IP.
FunNumPtris a pointer to a variable where the driver will pass back the function number of requester ID assigned to IP.
PortNumPtris a pointer to a variable where the driver will pass back the Port number of requester ID assigned to IP.
Returns
None.
Note
None

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_BL_BUS_MASK, XAXIPCIE_BL_BUS_SHIFT, XAXIPCIE_BL_DEV_MASK, XAXIPCIE_BL_DEV_SHIFT, XAXIPCIE_BL_FUNC_MASK, XAXIPCIE_BL_OFFSET, XAXIPCIE_BL_PORT_MASK, XAXIPCIE_BL_PORT_SHIFT, and XAxiPcie_ReadReg.

Referenced by PcieInitRootComplex().

◆ XAxiPcie_GetRootPortErrFIFOMsg()

void XAxiPcie_GetRootPortErrFIFOMsg ( XAxiPcie InstancePtr,
u16 *  ReqIdPtr,
u8 *  ErrType,
u8 *  ErrValid 
)

#include <xaxipcie.h>

Read Root Port Error FIFO Message.

Parameters
InstancePtris the PCIe component to operate on.
ReqIdPtris a variable where the driver will pass back the requester Id of error message.
ErrTypeis a variable where the driver will pass back the type of error message
ErrValidis a variable where the driver will pass back the status of read operation of error message.
Returns
None.
Note
This function is valid only when IP is configured as a root complex.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_GetRootPortIntFIFOReg()

int XAxiPcie_GetRootPortIntFIFOReg ( XAxiPcie InstancePtr,
u16 *  ReqIdPtr,
u16 *  MsiAddr,
u8 *  MsiInt,
u8 *  IntValid,
u16 *  MsiMsgData 
)

#include <xaxipcie.h>

Read Root Port Interrupt FIFO message Register 1 & 2.

Parameters
InstancePtris the PCIe component to operate on.
ReqIdPtris a variable where the driver will pass back the requester Id of error message.
MsiAddris a variable where the driver will pass back the MSI address for which interrupt message recieved.
MsiIntis a variable where the driver will pass back the type of interrupt message recieved (MSI/INTx).
IntValidis a variable where the driver will pass back the status of read operation of interrupt message.
MsiMsgDatais a variable where the driver will pass back the MSI data recieved.
Returns
MsiMsgData if MSI interrupt is observed or 0 if there is no MSI interrupt.
Note
This function is valid only when IP is configured as a root complex.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_GetRootPortStatusCtrl()

void XAxiPcie_GetRootPortStatusCtrl ( XAxiPcie InstancePtr,
u32 *  StatusPtr 
)

#include <xaxipcie.h>

Read Root Port Status/Control Register.

Parameters
InstancePtris the PCIe component to operate on.
StatusPtris a pointer to a variable where the driver will pass back the root port status.
Returns
None.
Note
This function is valid only when IP is configured as a root complex.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_GetVsecCapability()

void XAxiPcie_GetVsecCapability ( XAxiPcie InstancePtr,
u8  VsecNum,
u16 *  VsecIdPtr,
u8 *  VersionPtr,
u16 *  NextCapPtr 
)

#include <xaxipcie.h>

This API is used to read the VSEC Capability Register.

Parameters
InstancePtris the XAxiPcie instance to operate on.
VsecNumis a VSEC register number as there are two registers. Possible values are.
  • XAXIPCIE_VSEC1 (0)
  • XAXIPCIE_VSEC2 (1)
VsecIdPtris a pointer to a variable where the driver will pass back the Vendor Specific Enhanced Capability ID.
VersionPtris a pointer to a variable where the driver will . pass back the Version of VSEC.
NextCapPtris a pointer to a variable where the driver will pass back the Next Capability offset.
Returns
None.
Note
None

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAxiPcie_ReadReg, and XAXIPCIE_VSECC_OFFSET.

◆ XAxiPcie_GetVsecHeader()

void XAxiPcie_GetVsecHeader ( XAxiPcie InstancePtr,
u8  VsecNum,
u16 *  VsecIdPtr,
u8 *  RevisionPtr,
u16 *  LengthPtr 
)

#include <xaxipcie.h>

This API is used to read the VSEC Header Register.

Parameters
InstancePtris the XAxiPcie instance to operate on.
VsecNumis a VSEC register number as there are two registers. Possible values are.
  • XAXIPCIE_VSEC1 (0)
  • XAXIPCIE_VSEC2 (1)
VsecIdPtris a pointer to a variable where the driver will pass back the VSEC header structure Id.
RevisionPtris a pointer to a variable where the driver will pass back the Revision of VSEC capability Structure.
LengthPtris a pointer to a variable where the driver will pass . back the length of the VSEC capability structure.
Returns
None.
Note
None

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAxiPcie_ReadReg, and XAXIPCIE_VSECH_OFFSET.

◆ XAxiPcie_LookupConfig()

XAxiPcie_Config* XAxiPcie_LookupConfig ( u16  DeviceId)

#include <xaxipcie.h>

Lookup the device configuration based on the unique device ID.

The table ConfigTable contains the configuration info for each device in the system.

Parameters
DeviceIdis the device identifier to lookup.
Returns
  • XAxiPcie configuration structure pointer if DeviceID is found.
  • NULL if DeviceID is not found.
Note
None

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAxiPcie_ReadLocalConfigSpace()

void XAxiPcie_ReadLocalConfigSpace ( XAxiPcie InstancePtr,
u16  Offset,
u32 *  DataPtr 
)

#include <xaxipcie.h>

Read 32-bit value from one of this IP own configuration space.

Location is identified by its offset from the beginning of the configuration space.

Parameters
InstancePtris the XAxiPcie instance to operate on.
Offsetfrom beginning of IP own configuration space.
DataPtris a pointer to a variable where the driver will pass back the value read from the specified location.
Returns
None
Note
None

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie::IsReady, XAXIPCIE_PCIE_CORE_OFFSET, and XAxiPcie_ReadReg.

Referenced by PCIeEndPointInitialize(), and PcieInitRootComplex().

◆ XAxiPcie_ReadRemoteConfigSpace()

void XAxiPcie_ReadRemoteConfigSpace ( XAxiPcie InstancePtr,
u8  Bus,
u8  Device,
u8  Function,
u16  Offset,
u32 *  DataPtr 
)

#include <xaxipcie.h>

Read 32-bit value from external PCIe Function's configuration space.

External PCIe function is identified by its Requester ID (Bus#, Device#, Function#). Location is identified by its offset from the begginning of the configuration space.

Parameters
InstancePtris the PCIe component to operate on.
Busis the external PCIe function's Bus number.
Deviceis the external PCIe function's Device number.
Functionis the external PCIe function's Function number.
Offsetfrom beggininng of PCIe function's configuration space.
DataPtris a pointer to a variable where the driver will pass back the value read from the specified location.
Returns
None
Note
This function is valid only when IP is configured as a root complex. The XAxiPcie_ReadLocalConfigSpace API should be used for reading the local config space.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_SetLocalBusBar2PcieBar()

void XAxiPcie_SetLocalBusBar2PcieBar ( XAxiPcie InstancePtr,
u8  BarNumber,
XAxiPcie_BarAddr BarAddrPtr 
)

#include <xaxipcie.h>

Write PCIe address translation vector that corresponds to one of AXI local bus bars passed by the caller.

Parameters
InstancePtris the XAxiPcie instance to operate on.
BarNumberis AXI bar number (0 - 5) passed by caller.
BarAddrPtris a pointer to a variable where the driver will pass back translation vector.
Returns
None.
Note
None.

References XAxiPcie_Config::BaseAddress, XAxiPcie::Config, XAxiPcie_Config::IncludeBarOffsetReg, XAxiPcie_BarAddr::LowerAddr, XAxiPcie_BarAddr::UpperAddr, XAXIPCIE_AXIBAR2PCIBAR_0L_OFFSET, XAXIPCIE_AXIBAR2PCIBAR_0U_OFFSET, and XAxiPcie_WriteReg.

Referenced by PcieInitRootComplex().

◆ XAxiPcie_SetRootPortMSIBase()

int XAxiPcie_SetRootPortMSIBase ( XAxiPcie InstancePtr,
unsigned long long  MsiBase 
)

#include <xaxipcie.h>

Write MSI Base Address to Root Port MSI Base Address Register.

Parameters
InstancePtris the PCIe component to operate on.
MsiBaseis 64 bit base address for MSI.This address should be 4kB aligned always.
Returns
XST_SUCCESS if success or XST_FAILURE if failure .
Note
This function is valid only when IP is configured as a root complex.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_SetRootPortStatusCtrl()

void XAxiPcie_SetRootPortStatusCtrl ( XAxiPcie InstancePtr,
u32  StatusData 
)

#include <xaxipcie.h>

Write Value in Root Port Status/Control Register.

Parameters
InstancePtris the PCIe component to operate on.
StatusDatais data to set.
Returns
None.
Note
This function is valid only when IP is configured as a root complex.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_WriteLocalConfigSpace()

void XAxiPcie_WriteLocalConfigSpace ( XAxiPcie InstancePtr,
u16  Offset,
u32  Data 
)

#include <xaxipcie.h>

Write 32-bit value to one of this IP own configuration space.

Location is identified by its offset from the begginning of the configuration space.

Parameters
InstancePtris the PCIe component to operate on.
Offsetfrom beggininng of IP own configuration space.
Datato be written to the specified location.
Returns
None
Note
This function is valid only when IP is configured as a root complex.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.

◆ XAxiPcie_WriteRemoteConfigSpace()

void XAxiPcie_WriteRemoteConfigSpace ( XAxiPcie InstancePtr,
u8  Bus,
u8  Device,
u8  Function,
u16  Offset,
u32  Data 
)

#include <xaxipcie.h>

Write 32-bit value to external PCIe function's configuration space.

External PCIe function is identified by its Requester ID (Bus#, Device#, Function#). Location is identified by its offset from the begginning of the configuration space.

Parameters
InstancePtris the PCIe component to operate on.
Busis the external PCIe function's Bus number.
Deviceis the external PCIe function's Device number.
Functionis the external PCIe function's Function number.
Offsetfrom beggininng of PCIe function's configuration space.
Datato be written to the specified location.
Returns
None
Note
This function is valid only when IP is configured as a root complex. The XAxiPcie_WriteLocalConfigSpace should be used for writing to local config space.

References XAxiPcie::Config, XAxiPcie_Config::IncludeRootComplex, and XAxiPcie::IsReady.