![]() |
ipipsu
Vitis Drivers API Documentation
|
Data Structures | |
struct | XIpiPsu_Target |
Data structure used to refer IPI Targets. More... | |
struct | XIpiPsu_Config |
This typedef contains configuration information for the device. More... | |
struct | XIpiPsu |
The XIpiPsu driver instance data. More... | |
Macros | |
#define | XIPIPSU_BUF_TYPE_MSG (0x001U) |
Message type buffer. More... | |
#define | XIPIPSU_BUF_TYPE_RESP (0x002U) |
Response buffer. More... | |
#define | XIPIPSU_MAX_MSG_LEN XIPIPSU_MSG_BUF_SIZE |
Maximum message length. More... | |
#define | XIPIPSU_CRC_INDEX (0x7U) |
Index where the CRC is stored. More... | |
#define | XIPIPSU_W0_TO_W6_SIZE (28U) |
Size of the word 0 to word 6. More... | |
#define | XIPIPSU_CRC_ERROR (0xFL) |
CRC error occurred. More... | |
#define | ENABLE_IPI_CRC_VAL (0x0U) |
Enable CRC. More... | |
#define | XIpiPsu_ReadReg(BaseAddress, RegOffset) Xil_In32((BaseAddress) + (RegOffset)) |
Reads the register specified by the base address and offset. More... | |
#define | XIpiPsu_WriteReg(BaseAddress, RegOffset, Data) Xil_Out32(((BaseAddress) + (RegOffset)), (Data)) |
Writes a value into a register specified by base address and offset. More... | |
#define | XIpiPsu_InterruptEnable(InstancePtr, Mask) |
Enable interrupts specified in Mask. More... | |
#define | XIpiPsu_InterruptDisable(InstancePtr, Mask) |
Disable interrupts specified in Mask. More... | |
#define | XIpiPsu_GetInterruptStatus(InstancePtr) |
Gets the STATUS REGISTER of the current IPI instance. More... | |
#define | XIpiPsu_ClearInterruptStatus(InstancePtr, Mask) |
Clears the STATUS REGISTER of the current IPI instance. More... | |
#define | XIpiPsu_GetObsStatus(InstancePtr) |
Gets the OBSERVATION REGISTER of the current IPI instance. More... | |
Functions | |
XIpiPsu_Config * | XIpiPsu_LookupConfig (u32 DeviceId) |
Looks up the device configuration based on the unique device ID. More... | |
XStatus | XIpiPsu_CfgInitialize (XIpiPsu *InstancePtr, XIpiPsu_Config *CfgPtr, UINTPTR EffectiveAddress) |
Initializes the Instance pointer based on a given Config Pointer. More... | |
void | XIpiPsu_Reset (XIpiPsu *InstancePtr) |
Resets the given IPI register set. More... | |
XStatus | XIpiPsu_TriggerIpi (XIpiPsu *InstancePtr, u32 DestCpuMask) |
Triggers an IPI to a Destination CPU. More... | |
XStatus | XIpiPsu_PollForAck (const XIpiPsu *InstancePtr, u32 DestCpuMask, u32 TimeOutCount) |
Polls for an acknowledgement using Observation Register. More... | |
XStatus | XIpiPsu_ReadMessage (XIpiPsu *InstancePtr, u32 SrcCpuMask, u32 *MsgPtr, u32 MsgLength, u8 BufferType) |
Read an Incoming Message from a Source. More... | |
XStatus | XIpiPsu_WriteMessage (XIpiPsu *InstancePtr, u32 DestCpuMask, const u32 *MsgPtr, u32 MsgLength, u8 BufferType) |
Sends a Message to Destination. More... | |
void | XIpiPsu_SetConfigTable (u32 DeviceId, XIpiPsu_Config *ConfigTblPtr) |
Sets up the device configuration based on the unique device ID. More... | |
Variables | |
XIpiPsu_Config | XIpiPsu_ConfigTable [XPAR_XIPIPSU_NUM_INSTANCES] |
The IPIPSU configuration table, sized by the number of instances defined in xparameters.h. More... | |
#define ENABLE_IPI_CRC_VAL (0x0U) |
Enable CRC.
#define XIPIPSU_BUF_TYPE_MSG (0x001U) |
Message type buffer.
Referenced by IpiIntrHandler(), and XIpiPsu_GetBufferAddress().
#define XIPIPSU_BUF_TYPE_RESP (0x002U) |
Response buffer.
Referenced by IpiIntrHandler(), and XIpiPsu_GetBufferAddress().
#define XIpiPsu_ClearInterruptStatus | ( | InstancePtr, | |
Mask | |||
) |
Clears the STATUS REGISTER of the current IPI instance.
The corresponding interrupt status for each bit set to 1 in Mask is cleared.
InstancePtr | Pointer to the instance to be worked on. |
Mask | Mask corresponding to the source CPU* |
Referenced by IpiIntrHandler(), and main().
#define XIPIPSU_CRC_ERROR (0xFL) |
CRC error occurred.
Referenced by XIpiPsu_ReadMessage().
#define XIPIPSU_CRC_INDEX (0x7U) |
Index where the CRC is stored.
Referenced by XIpiPsu_ReadMessage(), and XIpiPsu_WriteMessage().
#define XIpiPsu_GetInterruptStatus | ( | InstancePtr | ) |
Gets the STATUS REGISTER of the current IPI instance.
InstancePtr | Pointer to the instance to be worked on. |
Referenced by IpiIntrHandler().
#define XIpiPsu_GetObsStatus | ( | InstancePtr | ) |
Gets the OBSERVATION REGISTER of the current IPI instance.
InstancePtr | Pointer to the instance to be worked on. |
#define XIpiPsu_InterruptDisable | ( | InstancePtr, | |
Mask | |||
) |
Disable interrupts specified in Mask.
The corresponding interrupt for each bit set to 1 in Mask, will be disabled.
InstancePtr | Pointer to the instance to be worked on. |
Mask | Contains a bit mask of interrupts to disable. The mask can be formed using a set of bitwise or'd values of individual CPU masks |
#define XIpiPsu_InterruptEnable | ( | InstancePtr, | |
Mask | |||
) |
Enable interrupts specified in Mask.
The corresponding interrupt for each bit set to 1 in Mask, will be enabled.
InstancePtr | Pointer to the instance to be worked on. |
Mask | Contains a bit mask of interrupts to enable. The mask can be formed using a set of bitwise or'd values of individual CPU masks |
Referenced by main().
#define XIPIPSU_MAX_MSG_LEN XIPIPSU_MSG_BUF_SIZE |
Maximum message length.
Referenced by XIpiPsu_ReadMessage(), and XIpiPsu_WriteMessage().
#define XIpiPsu_ReadReg | ( | BaseAddress, | |
RegOffset | |||
) | Xil_In32((BaseAddress) + (RegOffset)) |
Reads the register specified by the base address and offset.
BaseAddress | Base address of the IPI instance |
RegOffset | Offset of the register relative to base |
Referenced by XIpiPsu_PollForAck().
#define XIPIPSU_W0_TO_W6_SIZE (28U) |
Size of the word 0 to word 6.
Referenced by XIpiPsu_ReadMessage(), and XIpiPsu_WriteMessage().
#define XIpiPsu_WriteReg | ( | BaseAddress, | |
RegOffset, | |||
Data | |||
) | Xil_Out32(((BaseAddress) + (RegOffset)), (Data)) |
Writes a value into a register specified by base address and offset.
BaseAddress | Base address of the IPI instance |
RegOffset | Offset of the register relative to base |
Data | 32-bit value that is to be written into the specified register |
Referenced by XIpiPsu_Reset(), and XIpiPsu_TriggerIpi().
XStatus XIpiPsu_CfgInitialize | ( | XIpiPsu * | InstancePtr, |
XIpiPsu_Config * | CfgPtr, | ||
UINTPTR | EffectiveAddress | ||
) |
Initializes the Instance pointer based on a given Config Pointer.
InstancePtr | Pointer to the instance to be worked on |
CfgPtr | Device configuration structure containing required hardware build data |
EffectiveAddress | Base address of the device. If address translation is not utilized, this parameter can be passed in using CfgPtr->Config. BaseAddress to specify the physical base address. |
References XIpiPsu_Config::BaseAddress, XIpiPsu_Config::BitMask, XIpiPsu_Target::BufferIndex, XIpiPsu_Config::BufferIndex, XIpiPsu::Config, XIpiPsu_Config::DeviceId, XIpiPsu_Config::IntId, XIpiPsu::IsReady, XIpiPsu_Target::Mask, XIpiPsu_Config::TargetCount, and XIpiPsu_Config::TargetList.
Referenced by main().
XIpiPsu_Config* XIpiPsu_LookupConfig | ( | u32 | DeviceId | ) |
Looks up the device configuration based on the unique device ID.
A table contains the configuration information for each device in the system.
DeviceId | Contains the ID of the device to look up the configuration for. |
References XIpiPsu_ConfigTable.
Referenced by main().
XStatus XIpiPsu_PollForAck | ( | const XIpiPsu * | InstancePtr, |
u32 | DestCpuMask, | ||
u32 | TimeOutCount | ||
) |
Polls for an acknowledgement using Observation Register.
InstancePtr | Pointer to current IPI instance |
DestCpuMask | Mask of the destination CPU from which ACK is expected |
TimeOutCount | Count after which the routines returns failure |
References XIpiPsu_Config::BaseAddress, XIpiPsu::Config, XIpiPsu::IsReady, XIPIPSU_OBS_OFFSET, and XIpiPsu_ReadReg.
XStatus XIpiPsu_ReadMessage | ( | XIpiPsu * | InstancePtr, |
u32 | SrcCpuMask, | ||
u32 * | MsgPtr, | ||
u32 | MsgLength, | ||
u8 | BufferType | ||
) |
Read an Incoming Message from a Source.
InstancePtr | Pointer to current IPI instance |
SrcCpuMask | Device Mask for the CPU which has sent the message |
MsgPtr | Pointer to Buffer to which the read message needs to be stored |
MsgLength | Length of the buffer/message |
BufferType | Type of buffer (XIPIPSU_BUF_TYPE_MSG or XIPIPSU_BUF_TYPE_RESP) |
References XIpiPsu_Config::BitMask, XIpiPsu::Config, XIpiPsu::IsReady, XIPIPSU_CRC_ERROR, XIPIPSU_CRC_INDEX, XIpiPsu_GetBufferAddress(), XIPIPSU_MAX_MSG_LEN, and XIPIPSU_W0_TO_W6_SIZE.
Referenced by IpiIntrHandler().
void XIpiPsu_Reset | ( | XIpiPsu * | InstancePtr | ) |
Resets the given IPI register set.
This function can be called to disable the IPIs from all the sources and clear any pending IPIs in status register
InstancePtr | Pointer to current IPI instance |
References XIpiPsu_Config::BaseAddress, XIpiPsu::Config, XIpiPsu::IsReady, XIPIPSU_ALL_MASK, XIPIPSU_IDR_OFFSET, XIPIPSU_ISR_OFFSET, and XIpiPsu_WriteReg.
void XIpiPsu_SetConfigTable | ( | u32 | DeviceId, |
XIpiPsu_Config * | ConfigTblPtr | ||
) |
Sets up the device configuration based on the unique device ID.
A table contains the configuration info for each device in the system.
DeviceId | Contains the ID of the device to set up the configuration for. |
ConfigTblPtr | Device configuration structure containing required hardware build data |
References XIpiPsu_Config::BaseAddress, XIpiPsu_Config::BitMask, XIpiPsu_Config::BufferIndex, XIpiPsu_Config::IntId, and XIpiPsu_ConfigTable.
XStatus XIpiPsu_TriggerIpi | ( | XIpiPsu * | InstancePtr, |
u32 | DestCpuMask | ||
) |
Triggers an IPI to a Destination CPU.
InstancePtr | Pointer to current IPI instance |
DestCpuMask | Mask of the CPU to which IPI is to be triggered |
References XIpiPsu_Config::BaseAddress, XIpiPsu::Config, XIpiPsu::IsReady, XIPIPSU_TRIG_OFFSET, and XIpiPsu_WriteReg.
XStatus XIpiPsu_WriteMessage | ( | XIpiPsu * | InstancePtr, |
u32 | DestCpuMask, | ||
const u32 * | MsgPtr, | ||
u32 | MsgLength, | ||
u8 | BufferType | ||
) |
Sends a Message to Destination.
InstancePtr | Pointer to current IPI instance |
DestCpuMask | Device Mask for the destination CPU |
MsgPtr | Pointer to Buffer which contains the message to be sent |
MsgLength | Length of the buffer/message |
BufferType | Type of buffer (XIPIPSU_BUF_TYPE_MSG or XIPIPSU_BUF_TYPE_RESP) |
References XIpiPsu_Config::BitMask, XIpiPsu::Config, XIpiPsu::IsReady, XIPIPSU_CRC_INDEX, XIpiPsu_GetBufferAddress(), XIPIPSU_MAX_MSG_LEN, and XIPIPSU_W0_TO_W6_SIZE.
Referenced by IpiIntrHandler().
XIpiPsu_Config XIpiPsu_ConfigTable[XPAR_XIPIPSU_NUM_INSTANCES] |
The IPIPSU configuration table, sized by the number of instances defined in xparameters.h.
Referenced by XIpiPsu_LookupConfig(), and XIpiPsu_SetConfigTable().