![]() |
![]() |
Defines | |
#define | Bcp_osalMalloc Osal_bcpMalloc |
#define | Bcp_osalFree Osal_bcpFree |
#define | Bcp_osalMultiCoreCsEnter Osal_bcpMultiCoreCsEnter |
#define | Bcp_osalMultiCoreCsExit Osal_bcpMultiCoreCsExit |
#define | Bcp_osalInterruptCsEnter Osal_bcpInterruptCsEnter |
#define | Bcp_osalInterruptCsExit Osal_bcpInterruptCsExit |
#define | Bcp_osalLog Osal_bcpLog |
#define | Bcp_osalCreateSem Osal_bcpCreateSem |
#define | Bcp_osalDeleteSem Osal_bcpDeleteSem |
#define | Bcp_osalPendSem Osal_bcpPendSem |
#define | Bcp_osalPostSem Osal_bcpPostSem |
#define | Bcp_osalBeginMemAccess Osal_bcpBeginMemAccess |
#define | Bcp_osalEndMemAccess Osal_bcpEndMemAccess |
#define | Bcp_osalBeginDescMemAccess Osal_bcpBeginDescMemAccess |
#define Bcp_osalBeginDescMemAccess Osal_bcpBeginDescMemAccess |
============================================================================
Bcp_osalBeginDescMemAccess
brief
This API is called from the driver before it makes a read access to CPPI descriptors on the Rx data path. If the descriptors were allocated in cacheable memory region, then the application would have to ensure that the cache is updated with the contents from actual physical memory.
[in] | hRx | - Rx object handle. Must be used by application to retrieve correct descriptor size, and location of the descriptors. |
[in] | descPtr | - Address of the descriptors that the driver is trying to access. |
Prototype: The following is the C prototype for the expected OSAL API.
void Bcp_osalBeginDescMemAccess (void* hRx, void *descPtr)
=============================================================================
#define Bcp_osalBeginMemAccess Osal_bcpBeginMemAccess |
============================================================================
Bcp_osalBeginMemAccess
brief
This API is called from the driver before it makes a read access to its multicore shared datastructures. If these data structures were placed in cacheable memory region, then the application would have to ensure that the cache is updated with the contents from actual physical memory.
[in] | blockPtr | - Address of the memory block that the driver is trying to access. |
[in] | size | - Size of the memory block being accessed. |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpBeginMemAccess (void *blockPtr, uint32_t size)
=============================================================================
#define Bcp_osalCreateSem Osal_bcpCreateSem |
============================================================================
Bcp_osalCreateSem
brief
This API is called from the BCP driver to create a software semaphore.
[in] | void |
Prototype: The following is the C prototype for the expected OSAL API.
void* Osal_bcpCreateSem (void)
=============================================================================
#define Bcp_osalDeleteSem Osal_bcpDeleteSem |
============================================================================
Bcp_osalDeleteSem
brief
This API is called from the driver to delete a software semaphore created earlier using Bcp_osalCreateSem () API.
[in] | hSem | - Semaphore handle obtained using Bcp_osalCreateSem () API. |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpDeleteSem (void* hSem)
=============================================================================
#define Bcp_osalEndMemAccess Osal_bcpEndMemAccess |
============================================================================
Bcp_osalEndMemAccess
brief
This API is called from the driver once its done writing to its multicore shared datastructures. If these data structures were placed in cacheable memory region, then the application would have to ensure that the actual physical memory is updated as per the contents of cache.
[in] | blockPtr | - Address of the memory block that the driver is has written to. |
[in] | size | - Size of the memory block being accessed. |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpEndMemAccess (void *blockPtr, uint32_t size)
=============================================================================
#define Bcp_osalFree Osal_bcpFree |
============================================================================
Bcp_osalFree
brief
This API is called from the BCP driver to free up the memory allocated for buffers earlier using Bcp_osalMalloc () API.
[in] | datavoid* | Pointer to the memory block to be cleaned up. |
[in] | num_bytes | Size of the memory block to be cleaned up. |
[in] | bGlobalAddress | Indicates that the address passed here to this function is a Global address. |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpFree (void* dataPtr, uint32_t num_bytes, uint8_t bGlobalAddress)
=============================================================================
#define Bcp_osalInterruptCsEnter Osal_bcpInterruptCsEnter |
============================================================================
Bcp_osalInterruptCsEnter
brief
This API is called from the BCP driver to acquire an interrupt lock, i.e., a lock that can protect the driver against context switch to an interrupt when its manipulating data structures shared between the application process and interrupt handler (ISR).
This API is called from the BCP Bcp_rxGetResult () API to protect the driver maintained list of results posted by ISR against manipulation from ISR at the same time its being accessed by the application via Bcp_rxGetResult () API. This API should disable the interrupts to ensure that protection against interrupts.
[in] | void |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpInterruptCsEnter (void)
=============================================================================
#define Bcp_osalInterruptCsExit Osal_bcpInterruptCsExit |
============================================================================
Bcp_osalInterruptCsExit
brief
This API is called from the BCP driver to release an interrupt lock previously obtained using Bcp_osalInterruptCsEnter () API. This API should enable back interrupts disabled earlier in Bcp_osalInterruptCsEnter () API.
[in] | void |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpInterruptCsExit (void)
=============================================================================
#define Bcp_osalLog Osal_bcpLog |
============================================================================
Bcp_osalLog
brief
This API is called from the BCP driver to log useful debug information.
[in] | void |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpLog (char* fmt, ... )
=============================================================================
#define Bcp_osalMalloc Osal_bcpMalloc |
============================================================================
Bcp_osalMalloc
brief
This API is called from the BCP driver to allocate memory for the FFT request and result buffers used in Host mode CPPI descriptors. It can also be called to allocate memory for driver's internal book-keeping objects.
This memory can be allocated from a core's local heap.
[in] | num_bytes | Number of bytes to be allocated. |
[in] | bGlobalAddress | Indicates whether the address returned by this API should be a global address or a core local address. Global addresses are required by driver when allocating CPPI descriptors and buffers. |
Prototype: The following is the C prototype for the expected OSAL API.
void* Osal_bcpMalloc (uint32_t num_bytes, uint8_t bGlobalAddress)
=============================================================================
#define Bcp_osalMultiCoreCsEnter Osal_bcpMultiCoreCsEnter |
============================================================================
Bcp_osalMultiCoreCsEnter
brief
This API is called from the BCP driver to acquire a multi-core, multi-threaded synchronization lock, i.e., a lock that once obtained that would ensure that no process/thread on the current core or any of the cores can access the BCP library APIs until its released by the current user.
This API is called from the BCP driver mainly from the control path APIs, i.e., Bcp_init (), Bcp_open () etc to ensure that the data structures shared between all the driver users are updated correctly.
[in] | void |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpMultiCoreCsEnter (void)
=============================================================================
#define Bcp_osalMultiCoreCsExit Osal_bcpMultiCoreCsExit |
============================================================================
Bcp_osalMultiCoreCsExit
brief
This API is called from the BCP driver to release a multi-core and multi-threaded lock previously obtained using Bcp_osalMultiCoreCsEnter () API. This API should reset the multi-core, multi-threaded lock enabling another process/core to grab it to access the BCP library.
[in] | void |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpMultiCoreCsExit (void)
=============================================================================
#define Bcp_osalPendSem Osal_bcpPendSem |
============================================================================
Bcp_osalPendSem
brief
This API is called from the driver to acquire a software semaphore created earlier using Bcp_osalCreateSem () API.
[in] | hSem | - Semaphore handle obtained using Bcp_osalCreateSem () API. |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpPendSem (void* hSem)
=============================================================================
#define Bcp_osalPostSem Osal_bcpPostSem |
============================================================================
Bcp_osalPostSem
brief
This API is called from the driver to release a semaphore acquired earlier using Bcp_osalPendSem () API.
[in] | hSem | - Semaphore handle obtained using Bcp_osalCreateSem () API. |
Prototype: The following is the C prototype for the expected OSAL API.
void Osal_bcpPostSem (void* hSem)
=============================================================================