xilasu
Vitis Drivers API Documentation
xasu_client.c File Reference

Overview

This file contains the ASU client initialization and generic queue management functions.

MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 vns 06/03/24 Initial release ma 07/17/24 Update P0, P1 Queue addresses and set IsCmdPresent to TRUE before triggering the IPI interrupt to ASU ss 08/13/24 Changed XAsu_ClientInit function prototype and Initialized mailbox in XAsu_ClientInit() API ss 09/19/24 Added XAsu_CheckAsufwPrsntBit() API yog 09/26/24 Added doxygen groupings and fixed doxygen comments. vns 09/30/24 Added support for asynchronous communication 1.1 ma 01/08/25 Clear only ReqBufStatus and RespBufStatus upon command completion vns 02/06/25 Fixed magic numbers ma 02/19/25 Updated handling of same priority queue requests in round robin scheduling am 03/05/25 Added performance measurement init call ma 03/14/25 Replace memcpy with Xil_SecureMemCpy to avoid arch dependencies during copy

 

Macros

#define XASU_QUEUE_BUFFER_FULL   0xFFU
 To indicate queue full state. More...
 
#define XASU_CLIENT_READY   0xFFFFFFFFU
 To indicate Client is ready. More...
 
#define XASU_TARGET_IPI_INT_MASK   1U
 ASU IPI interrupt mask. More...
 
#define ASU_GLOBAL_BASEADDR   (0xEBF80000U)
 ASU GLOBAL register base address. More...
 
#define ASU_GLOBAL_GLOBAL_CNTRL   (ASU_GLOBAL_BASEADDR + 0x00000000U)
 ASU GLOBAL CNTRL register address. More...
 
#define ASU_GLOBAL_GLOBAL_CNTRL_FW_IS_PRESENT_MASK   0x10U
 ASU FW Present mask value. More...
 
#define XASU_ASUFW_BIT_CHECK_TIMEOUT_VALUE   0xFFFFFU
 ASUFW check timoeout value. More...
 
#define XASU_NO_OF_CONTEXTS   (10U)
 No of contexts can be saved by client. More...
 

Functions

s32 XAsu_ClientInit (XMailbox *MailboxInstancePtr)
 This function initializes the client instance. More...
 
s32 XAsu_ValidateClientParameters (XAsu_ClientParams *ClientParamPtr)
 This function validates the input client parameters. More...
 
s32 XAsu_UpdateQueueBufferNSendIpi (XAsu_ClientParams *ClientParam, void *ReqBuffer, u32 Size, u32 Header)
 This function updates the queue buffer status to notify the request is present and generates a door bell to ASU. More...
 
u8 XAsu_RegCallBackNGetUniqueId (const XAsu_ClientParams *ClientParamPtr, u8 *RespBufferPtr, u32 Size, u8 IsFinalCall)
 This function registers callback parameters across the generated unique ID per request. More...
 
void XAsu_UpdateCallBackDetails (u8 UniqueId, u8 *RespBufferPtr, u32 Size, u8 IsFinalCall)
 Updates callback details based on the provided unique ID, response buffer, size, and final call flag. More...
 
void XAsu_FreeCtx (void *Context)
 Frees the memory associated with the provided context. More...
 
void * XAsu_UpdateNGetCtx (u8 UniqueId)
 Saves the provided unique ID and returns the address of the saved context. More...
 
s32 XAsu_VerifyNGetUniqueIdCtx (const void *Context, u8 *UniqueId)
 Validates the provided context by comparing it with stored contexts to determine the appropriate multi-update calls. More...