xilplmi
Vitis Drivers API Documentation
XilPlmi Mailbox APIs

Macros

#define XILPLMI_MODULE_ID   (1U)
 Module ID for xilplmi. More...
 
#define PAYLOAD_ARG_CNT   XIPIPSU_MAX_MSG_LEN
 1 for API ID + 5 for API arguments + 1 for reserved + 1 for CRC More...
 
#define RESPONSE_ARG_CNT   XIPIPSU_MAX_MSG_LEN
 1 for status + 3 for values + 3 for reserved + 1 for CRC More...
 
#define XPLMI_TARGET_IPI_INT_MASK   (0x00000002U)
 Target PMC IPI interrupt mask. More...
 
#define XPLMI_MODULE_ID_SHIFT   (8U)
 Module Id shift. More...
 
#define XPLMI_PAYLOAD_LEN_SHIFT   (16U)
 Length shift mask. More...
 
#define XILPLMI_MODULE_ID_MASK   ((u32)XILPLMI_MODULE_ID << XPLMI_MODULE_ID_SHIFT)
 Module id mask. More...
 
#define XPLMI_SHARED_MEM_SIZE   (160U)
 Max size of shared memory used to store the CDO command. More...
 

Functions

int XPlmi_ProcessMailbox (XPlmi_ClientInstance *ClientPtr, u32 *MsgPtr, u32 MsgLen)
 This function sends IPI request to the target module and gets the response from it. More...
 
int XPlmi_ClientInit (XPlmi_ClientInstance *InstancePtr, XMailbox *MailboxPtr)
 This function sets the instance of mailbox. More...
 

Variables

XMailbox * XPlmi_ClientInstance::MailboxPtr
 pointer to mailbox for IPI communication More...
 
u32 XPlmi_ClientInstance::Response [RESPONSE_ARG_CNT]
 Response payload. More...
 
u32 XPlmi_ClientInstance::SlrIndex
 SLR index number. More...
 

Macro Definition Documentation

#define PAYLOAD_ARG_CNT   XIPIPSU_MAX_MSG_LEN

1 for API ID + 5 for API arguments + 1 for reserved + 1 for CRC

#define RESPONSE_ARG_CNT   XIPIPSU_MAX_MSG_LEN

1 for status + 3 for values + 3 for reserved + 1 for CRC

Referenced by XPlmi_ProcessMailbox().

#define XILPLMI_MODULE_ID   (1U)

Module ID for xilplmi.

#define XILPLMI_MODULE_ID_MASK   ((u32)XILPLMI_MODULE_ID << XPLMI_MODULE_ID_SHIFT)

Module id mask.

#define XPLMI_MODULE_ID_SHIFT   (8U)

Module Id shift.

#define XPLMI_PAYLOAD_LEN_SHIFT   (16U)

Length shift mask.

#define XPLMI_SHARED_MEM_SIZE   (160U)

Max size of shared memory used to store the CDO command.

#define XPLMI_TARGET_IPI_INT_MASK   (0x00000002U)

Target PMC IPI interrupt mask.

Referenced by XPlmi_ProcessMailbox().

Function Documentation

int XPlmi_ClientInit ( XPlmi_ClientInstance *  InstancePtr,
XMailbox *  MailboxPtr 
)

This function sets the instance of mailbox.

Parameters
InstancePtrPointer to the client instance
MailboxPtrPointer to the mailbox instance
Returns
  • XST_SUCCESS On successful initialization
  • XST_FAILURE On failure
  • Perform input parameter validation on InstancePtr,if not NULL initialize the InstancePtr Return XST_FAILURE if NULL

Referenced by main().

int XPlmi_ProcessMailbox ( XPlmi_ClientInstance *  ClientPtr,
u32 *  MsgPtr,
u32  MsgLen 
)

This function sends IPI request to the target module and gets the response from it.

Parameters
ClientPtrPointer to mailbox instance
MsgPtrPointer to the payload message
MsgLenLength of the message
Returns
  • XST_SUCCESS - If the IPI send and receive is successful
  • XST_FAILURE - If there is a failure
Note
Payload consists of API id and call arguments to be written in IPI buffer
  • Send IPI CDO to PLM. Return XST_FAILURE if sending data failed
- Wait for IPI response from PLM  with a default timeout of 300 seconds.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response

References RESPONSE_ARG_CNT, and XPLMI_TARGET_IPI_INT_MASK.

Referenced by XPlmi_ConfigSecureComm(), XPlmi_EventLogging(), XPlmi_GetBoard(), XPlmi_GetDeviceID(), XPlmi_GetSecureCommStatus(), XPlmi_SetDDRMCMainRegSts(), and XPlmi_TamperTrigger().

Variable Documentation

XMailbox* XPlmi_ClientInstance::MailboxPtr

pointer to mailbox for IPI communication

u32 XPlmi_ClientInstance::Response[RESPONSE_ARG_CNT]

Response payload.

u32 XPlmi_ClientInstance::SlrIndex

SLR index number.