This section contains APIs for Inter-processor communication (IPC)
Data Structures | |
| struct | app_ipc_init_prm_t |
| IPC initialization parameters. More... | |
Functions | |
| void | appIpcInitPrmSetDefault (app_ipc_init_prm_t *prm) |
| Set IPC init parameters to default state. More... | |
| int32_t | appIpcInit (app_ipc_init_prm_t *prm) |
| Initialize IPC module. More... | |
| int32_t | appIpcDeInit (void) |
| De-Initialize IPC module. More... | |
| int32_t | appIpcRegisterNotifyHandler (app_ipc_notify_handler_f handler) |
| Register callback to invoke on receiving a notify message. More... | |
| int32_t | appIpcSendNotify (uint32_t dest_cpu_id, uint32_t payload) |
| Send a notify message to a given CPU. More... | |
| int32_t | appIpcSendNotifyPort (uint32_t dest_cpu_id, uint32_t payload, uint32_t port_id) |
| Send a notify message to a given CPU. More... | |
| uint32_t | appIpcGetSelfCpuId (void) |
| Get current CPU ID. More... | |
| uint32_t | appIpcGetHostPortId (uint16_t cpu_id) |
| Get current CPU Port ID. More... | |
| uint32_t | appIpcIsCpuEnabled (uint32_t cpu_id) |
| Check if a CPU is enabled in current system for IPC. More... | |
| int32_t | appIpcHwLockAcquire (uint32_t lock_id, uint32_t timeout) |
| Acquire a system wide HW lock. More... | |
| int32_t | appIpcHwLockRelease (uint32_t lock_id) |
| Release a system wide HW lock. More... | |
| int32_t | appIpcGetTiovxObjDescSharedMemInfo (void **addr, uint32_t *size) |
| Get base address and size of memory region assigned for TIOVX obj_desc's. More... | |
| void | appIpcGetTiovxLogRtSharedMemInfo (void **shm_base, uint32_t *shm_size) |
| Get base address and size of memory region assigned for TIOVX run-time logging. More... | |
| uint32_t | appIpcGetIpcCpuId (uint32_t app_cpu_id) |
| Convert from APP_CPU_xxx to IPC LLD CPU ID. More... | |
| uint32_t | appIpcGetAppCpuId (char *name) |
| Get APP_CPU_xxx from CPU name. More... | |
| const char * | appIpcGetCpuName (uint32_t app_cpu_id) |
| Get CPU name from CPU ID. More... | |
| int32_t | appIpcEchoTestStart (void) |
| Start echo test. More... | |
Typedefs | |
| typedef void(* | app_ipc_notify_handler_f) (uint32_t src_cpu_id, uint32_t payload) |
| Callback that is invoke when current CPU receives a IPC notify. More... | |
Macros | |
| #define | APP_IPC_HW_LOCK_MAX (256u) |
| Max lock ID for HW locks. More... | |
| #define | APP_IPC_WAIT_FOREVER (0xFFFFFFFFu) |
| Timeout value to use to wait forever. More... | |
RPMessage end points used by various services | |
| #define | APP_IPC_TIOVX_RPMSG_PORT_ID (13u) |
| RPMsg Port used for TIOVX IPC. More... | |
| #define | APP_IPC_REMOTE_SERVICE_RPMSG_PORT_ID (21u) |
| RPMsg Port used for Remote service. More... | |
| #define | APP_IPC_ECHO_TEST_RPMSG_PORT_ID (14u) |
| RPMsg Port used for echo test. More... | |
| #define | APP_IPC_RPMSG_PROTO_ECHO_TEST_RPMSG_PORT_ID (12u) |
| RPMsg Port used for RPMsg proto echo test. More... | |
| #define APP_IPC_HW_LOCK_MAX (256u) |
Max lock ID for HW locks.
| #define APP_IPC_WAIT_FOREVER (0xFFFFFFFFu) |
Timeout value to use to wait forever.
| #define APP_IPC_TIOVX_RPMSG_PORT_ID (13u) |
RPMsg Port used for TIOVX IPC.
| #define APP_IPC_REMOTE_SERVICE_RPMSG_PORT_ID (21u) |
RPMsg Port used for Remote service.
| #define APP_IPC_ECHO_TEST_RPMSG_PORT_ID (14u) |
RPMsg Port used for echo test.
| #define APP_IPC_RPMSG_PROTO_ECHO_TEST_RPMSG_PORT_ID (12u) |
RPMsg Port used for RPMsg proto echo test.
| typedef void(* app_ipc_notify_handler_f) (uint32_t src_cpu_id, uint32_t payload) |
Callback that is invoke when current CPU receives a IPC notify.
| src_cpu_id | [in] source CPU which generated this callback, see APP_IPC_CPU_* |
| payload | [in] payload or message received from source CPU to current CPU |
| void appIpcInitPrmSetDefault | ( | app_ipc_init_prm_t * | prm | ) |
Set IPC init parameters to default state.
Recommend to call this API before calling appIpcInit.
| prm | [out] Parameters set to default |
| int32_t appIpcInit | ( | app_ipc_init_prm_t * | prm | ) |
Initialize IPC module.
| prm | [in] Initialization parameters |
This API is called internally within each respective core's appInit function. It should not be called directly.
| int32_t appIpcDeInit | ( | void | ) |
De-Initialize IPC module.
This API is called internally within each respective core's appDeinit function. It should not be called directly.
| int32_t appIpcRegisterNotifyHandler | ( | app_ipc_notify_handler_f | handler | ) |
Register callback to invoke on receiving a notify message.
| handler | [in] Notify handler |
| int32_t appIpcSendNotify | ( | uint32_t | dest_cpu_id, |
| uint32_t | payload | ||
| ) |
Send a notify message to a given CPU.
| dest_cpu_id | [in] Destinatin CPU ID, see APP_IPC_CPU_* |
| payload | [in] payload to send as part of notify |
| int32_t appIpcSendNotifyPort | ( | uint32_t | dest_cpu_id, |
| uint32_t | payload, | ||
| uint32_t | port_id | ||
| ) |
Send a notify message to a given CPU.
| dest_cpu_id | [in] Destinatin CPU ID, see APP_IPC_CPU_* |
| payload | [in] payload to send as part of notify |
| port_id | [in] port used for IPC |
| uint32_t appIpcGetSelfCpuId | ( | void | ) |
Get current CPU ID.
| uint32_t appIpcGetHostPortId | ( | uint16_t | cpu_id | ) |
Get current CPU Port ID.
| uint32_t appIpcIsCpuEnabled | ( | uint32_t | cpu_id | ) |
Check if a CPU is enabled in current system for IPC.
| cpu_id | [in] CPU ID, see APP_IPC_CPU_* |
| int32_t appIpcHwLockAcquire | ( | uint32_t | lock_id, |
| uint32_t | timeout | ||
| ) |
Acquire a system wide HW lock.
This API will spin until the lock is acquired or timeout is hit. It is recoemended to take a CPU level lock like a semaphore or mutex before calling this API.
| lock_id | [in] HW lock ID to use |
| timeout | [in] Timeout in units of usecs. |
| int32_t appIpcHwLockRelease | ( | uint32_t | lock_id | ) |
Release a system wide HW lock.
| lock_id | [in] HW lock ID to use |
| int32_t appIpcGetTiovxObjDescSharedMemInfo | ( | void ** | addr, |
| uint32_t * | size | ||
| ) |
Get base address and size of memory region assigned for TIOVX obj_desc's.
This is used by TIOVX as shared region and is typically non-cached at all CPUs. It can be cache at a CPU if the CPU support cache coherency.
| addr | [out] Base address of shared region |
| size | [out] Size of shared region |
| void appIpcGetTiovxLogRtSharedMemInfo | ( | void ** | shm_base, |
| uint32_t * | shm_size | ||
| ) |
Get base address and size of memory region assigned for TIOVX run-time logging.
This is used by TIOVX as shared region and is typically non-cached at all CPUs. It can be cache at a CPU if the CPU support cache coherency.
| shm_base | [out] Base address of shared region |
| shm_size | [out] Size of shared region |
| uint32_t appIpcGetIpcCpuId | ( | uint32_t | app_cpu_id | ) |
Convert from APP_CPU_xxx to IPC LLD CPU ID.
| uint32_t appIpcGetAppCpuId | ( | char * | name | ) |
Get APP_CPU_xxx from CPU name.
| const char* appIpcGetCpuName | ( | uint32_t | app_cpu_id | ) |
Get CPU name from CPU ID.
| int32_t appIpcEchoTestStart | ( | void | ) |
Start echo test.