PDK API Guide for J721E
ipc_types.h File Reference

Introduction

data types definitions for ipc module.

Go to the source code of this file.

IPC Error Codes

Error codes returned by IPC APIs

#define IPC_SOK   (CSL_PASS)
 API call successful. More...
 
#define IPC_EFAIL   (CSL_EFAIL)
 API call returned with error as failed. Used for generic error. It may be some hardware failure and/or software failure. More...
 
#define IPC_EBADARGS   (CSL_EBADARGS)
 API call returned with error as bad arguments. Typically, NULL pointer passed to the API where its not expected. More...
 
#define IPC_EINVALID_PARAMS   (CSL_EINVALID_PARAMS)
 API call returned with error as invalid parameters. Typically when parameters passed are not valid. More...
 
#define IPC_ETIMEOUT   (CSL_ETIMEOUT)
 API call returned with error as timed out. Typically API is waiting for some condition and returned as condition not happened in the timeout period. More...
 
#define IPC_EALLOC   (CSL_EALLOC)
 API call returned with error as allocation failed. More...
 
#define IPC_EUNSUPPORTED   (CSL_EUNSUPPORTED_CMD)
 Un Supported service request, API/IOCTLs. More...
 
#define IPC_E_UNBLOCKED   (-50)
 IPC is unblocked mode. More...
 
#define IPC_INTR_INVALID   (0xFFFF0000U)
 Macro used to specify that interrupt number is invalid. More...
 
#define IPC_RPMESSAGE_TIMEOUT_FOREVER   ~(0)
 Timeout foreever for IPC Recv. More...
 
#define RPMESSAGE_ANY   (0xFFFFFFFFU)
 RPMessage Endpoint any available. More...
 
#define RPMESSAGE_ALL   (0xFFFFFFFFU)
 RPMessage type. More...
 
typedef void(* Ipc_OsalHIsrFxn) (uintptr_t arg0, uintptr_t arg1)
 IPC OSAL High Level ISR type. More...
 
typedef void * Ipc_OsalHIsrGateHandle
 High Level ISR handle. More...
 
typedef uint32_t(* Ipc_VirtToPhyFxn) (const void *virtAddr)
 IPC Virtual to Physical address translation callback function. More...
 
typedef void *(* Ipc_PhyToVirtFxn) (uint32_t phyAddr)
 IPC Physical to Virtual address translation callback function. More...
 
typedef void(* Ipc_PrintFxn) (const char *str)
 IPC info/debug print function prototype. More...
 
typedef uintptr_t(* Ipc_OsalDisableAllIntrFxn) (void)
 IPC OSAL interrupt disable function prototype. More...
 
typedef void(* Ipc_OsalRestoreAllIntrFxn) (uintptr_t cookie)
 IPC OSAL interrupt restore function prototype. More...
 
typedef Ipc_OsalHIsrGateHandle(* Ipc_OsalCreateHIsrMutexFxn) (void)
 IPC OSAL create high level interrupt lock. More...
 
typedef void(* Ipc_OsalDeleteHIsrMutexFxn) (Ipc_OsalHIsrGateHandle *handle)
 IPC OSAL delete high level interrupt lock. More...
 
typedef int32_t(* Ipc_OsalEnterHIsrMutexFxn) (Ipc_OsalHIsrGateHandle handle)
 IPC OSAL Lock High level ISR's. More...
 
typedef void(* Ipc_OsalExitHIsrMutexFxn) (Ipc_OsalHIsrGateHandle handle, int32_t key)
 IPC OSAL Un Lock High level ISR's. More...
 
typedef void *(* Ipc_OsalMutexCreateFxn) (void)
 IPC OSAL mutex create function prototype to protect critical section. More...
 
typedef void(* Ipc_OsalMutexDeleteFxn) (void *mutexHandle)
 IPC OSAL mutex delete function prototype. More...
 
typedef int32_t(* Ipc_OsalMutexLockFxn) (void *mutexHandle, uint32_t timeout)
 IPC OSAL mutex lock function prototype. More...
 
typedef void(* Ipc_OsalMutexUnlockFxn) (void *mutexHandle)
 IPC OSAL mutex lock function prototype. More...
 
typedef int32_t(* Ipc_OsalHIsrCreateFxn) (Ipc_OsalHIsrHandle *handle, Ipc_OsalHIsrFxn fxn, void *arg)
 IPC OSAL create high level interrupt handler. More...
 
typedef void(* Ipc_OsalHIsrDeleteFxn) (Ipc_OsalHIsrHandle *handle)
 IPC OSAL delete high level interrupt handler. More...
 
typedef int32_t(* Ipc_OsalHIsrPostFxn) (Ipc_OsalHIsrHandle *handle)
 IPC OSAL Lock High level ISR's. More...
 
typedef void(* Ipc_OsalIsrFxn) (uintptr_t arg)
 IPC OSAL ISR callback function prototype. More...
 
typedef void *(* Ipc_OsalRegisterIntrFxn) (Ipc_MbConfig *cfg, Ipc_OsalIsrFxn isrFxn, uintptr_t arg)
 IPC OSAL ISR register function prototype. More...
 
typedef void(* Ipc_OsalUnRegisterIntrFxn) (void *hwiHandle)
 IPC OSAL ISR unregister function prototype. More...
 
typedef void(* Ipc_NewMsgReceivedFxn) (uint32_t srcEndPt, uint32_t procId)
 IPC New message notification. More...
 

Data Structures

struct  Ipc_MbConfig
 Mailbox interrupt router configuration. More...
 
struct  Ipc_OsalHIsrHandle
 Second level ISR (HISR), used to complete ISR functions. More...
 
struct  Ipc_OsalPrms
 IPC driver OSAL function pointers. More...
 

Macro Definition Documentation

◆ IPC_SOK

#define IPC_SOK   (CSL_PASS)

API call successful.

◆ IPC_EFAIL

#define IPC_EFAIL   (CSL_EFAIL)

API call returned with error as failed. Used for generic error. It may be some hardware failure and/or software failure.

◆ IPC_EBADARGS

#define IPC_EBADARGS   (CSL_EBADARGS)

API call returned with error as bad arguments. Typically, NULL pointer passed to the API where its not expected.

◆ IPC_EINVALID_PARAMS

#define IPC_EINVALID_PARAMS   (CSL_EINVALID_PARAMS)

API call returned with error as invalid parameters. Typically when parameters passed are not valid.

◆ IPC_ETIMEOUT

#define IPC_ETIMEOUT   (CSL_ETIMEOUT)

API call returned with error as timed out. Typically API is waiting for some condition and returned as condition not happened in the timeout period.

◆ IPC_EALLOC

#define IPC_EALLOC   (CSL_EALLOC)

API call returned with error as allocation failed.

◆ IPC_EUNSUPPORTED

#define IPC_EUNSUPPORTED   (CSL_EUNSUPPORTED_CMD)

Un Supported service request, API/IOCTLs.

◆ IPC_E_UNBLOCKED

#define IPC_E_UNBLOCKED   (-50)

IPC is unblocked mode.

◆ IPC_INTR_INVALID

#define IPC_INTR_INVALID   (0xFFFF0000U)

Macro used to specify that interrupt number is invalid.

◆ IPC_RPMESSAGE_TIMEOUT_FOREVER

#define IPC_RPMESSAGE_TIMEOUT_FOREVER   ~(0)

Timeout foreever for IPC Recv.

◆ RPMESSAGE_ANY

#define RPMESSAGE_ANY   (0xFFFFFFFFU)

RPMessage Endpoint any available.

◆ RPMESSAGE_ALL

#define RPMESSAGE_ALL   (0xFFFFFFFFU)

RPMessage type.

Typedef Documentation

◆ Ipc_OsalHIsrFxn

typedef void(* Ipc_OsalHIsrFxn) (uintptr_t arg0, uintptr_t arg1)

IPC OSAL High Level ISR type.

Parameters
uintptr_targ1, expected to be of type RPMessage_CallbackData
uintptr_targ2, not used
Returns
None

◆ Ipc_OsalHIsrGateHandle

typedef void* Ipc_OsalHIsrGateHandle

High Level ISR handle.

◆ Ipc_VirtToPhyFxn

typedef uint32_t(* Ipc_VirtToPhyFxn) (const void *virtAddr)

IPC Virtual to Physical address translation callback function.

This function is used by the driver to convert virtual address to physical address.

Parameters
virtAddr[IN] Virtual address
Returns
Corresponding physical address

◆ Ipc_PhyToVirtFxn

typedef void*(* Ipc_PhyToVirtFxn) (uint32_t phyAddr)

IPC Physical to Virtual address translation callback function.

This function is used by the driver to convert physical address to virtual address.

Parameters
phyAddr[IN] Physical address
Returns
Corresponding virtual address

◆ Ipc_PrintFxn

typedef void(* Ipc_PrintFxn) (const char *str)

IPC info/debug print function prototype.

This function is used by the driver to print info/debug messages.

Parameters
str[OUT] Info string to print.

◆ Ipc_OsalDisableAllIntrFxn

typedef uintptr_t(* Ipc_OsalDisableAllIntrFxn) (void)

IPC OSAL interrupt disable function prototype.

Returns
Cookie to be passed back to enable interrupt function

◆ Ipc_OsalRestoreAllIntrFxn

typedef void(* Ipc_OsalRestoreAllIntrFxn) (uintptr_t cookie)

IPC OSAL interrupt restore function prototype.

Parameters
cookie[IN] This is returned in disable interrupt function

◆ Ipc_OsalCreateHIsrMutexFxn

typedef Ipc_OsalHIsrGateHandle(* Ipc_OsalCreateHIsrMutexFxn) (void)

IPC OSAL create high level interrupt lock.

Parameters
None
Returns
Ipc_OsalHIsrGateHandle on success

◆ Ipc_OsalDeleteHIsrMutexFxn

typedef void(* Ipc_OsalDeleteHIsrMutexFxn) (Ipc_OsalHIsrGateHandle *handle)

IPC OSAL delete high level interrupt lock.

Parameters
Ipc_OsalHIsrGateHandleHandle previously created gate
Returns
None

◆ Ipc_OsalEnterHIsrMutexFxn

typedef int32_t(* Ipc_OsalEnterHIsrMutexFxn) (Ipc_OsalHIsrGateHandle handle)

IPC OSAL Lock High level ISR's.

Parameters
Ipc_OsalHIsrGateHandleHandle previously created gate
Returns
int32_t Unique key value, which would be required to unlock

◆ Ipc_OsalExitHIsrMutexFxn

typedef void(* Ipc_OsalExitHIsrMutexFxn) (Ipc_OsalHIsrGateHandle handle, int32_t key)

IPC OSAL Un Lock High level ISR's.

Parameters
Ipc_OsalHIsrGateHandleHandle previously created gate
int32_tUnique key value, which received when locking
Returns
None

◆ Ipc_OsalMutexCreateFxn

typedef void*(* Ipc_OsalMutexCreateFxn) (void)

IPC OSAL mutex create function prototype to protect critical section.

Returns
Pointer to mutex object

◆ Ipc_OsalMutexDeleteFxn

typedef void(* Ipc_OsalMutexDeleteFxn) (void *mutexHandle)

IPC OSAL mutex delete function prototype.

Parameters
mutexHandle[IN] Pointer to mutex object returned during create

◆ Ipc_OsalMutexLockFxn

typedef int32_t(* Ipc_OsalMutexLockFxn) (void *mutexHandle, uint32_t timeout)

IPC OSAL mutex lock function prototype.

Parameters
mutexHandle[IN] Pointer to mutex object returned during create

◆ Ipc_OsalMutexUnlockFxn

typedef void(* Ipc_OsalMutexUnlockFxn) (void *mutexHandle)

IPC OSAL mutex lock function prototype.

Parameters
mutexHandle[IN] Pointer to mutex object returned during create

◆ Ipc_OsalHIsrCreateFxn

typedef int32_t(* Ipc_OsalHIsrCreateFxn) (Ipc_OsalHIsrHandle *handle, Ipc_OsalHIsrFxn fxn, void *arg)

IPC OSAL create high level interrupt handler.

Parameters
None
Returns
IPC_SOK on success

◆ Ipc_OsalHIsrDeleteFxn

typedef void(* Ipc_OsalHIsrDeleteFxn) (Ipc_OsalHIsrHandle *handle)

IPC OSAL delete high level interrupt handler.

Parameters
Ipc_OsalHIsrHandleHandle previously created HISR
Returns
None

◆ Ipc_OsalHIsrPostFxn

typedef int32_t(* Ipc_OsalHIsrPostFxn) (Ipc_OsalHIsrHandle *handle)

IPC OSAL Lock High level ISR's.

Parameters
Ipc_OsalHIsrHandleHandle previously created HISR
Returns
int32_t IPC_SOK on success

◆ Ipc_OsalIsrFxn

typedef void(* Ipc_OsalIsrFxn) (uintptr_t arg)

IPC OSAL ISR callback function prototype.

Parameters
arg[IN] App data

◆ Ipc_OsalRegisterIntrFxn

typedef void*(* Ipc_OsalRegisterIntrFxn) (Ipc_MbConfig *cfg, Ipc_OsalIsrFxn isrFxn, uintptr_t arg)

IPC OSAL ISR register function prototype.

Parameters
cfg[IN] Defines interrupt details Ipc_MbConfig
isrFxn[IN] ISR callback fxn pointer
arg[IN] Arg that will be passed back in the ISR
Returns
Created HWI handle

◆ Ipc_OsalUnRegisterIntrFxn

typedef void(* Ipc_OsalUnRegisterIntrFxn) (void *hwiHandle)

IPC OSAL ISR unregister function prototype.

Parameters
hwiHandle[IN] HWI handle

◆ Ipc_NewMsgReceivedFxn

typedef void(* Ipc_NewMsgReceivedFxn) (uint32_t srcEndPt, uint32_t procId)

IPC New message notification.

Parameters
srcEndPt[IN] Specifies the source end point number
srcProcId[IN] Specifies the source processor identifier