QMSS Low Level Driver OSAL Functions
[QMSS]


Defines

#define Qmss_osalMalloc   Osal_qmssMalloc
 The macro is used by the QMSS LLD to allocate memory of specified size.
#define Qmss_osalFree   Osal_qmssFree
 The macro is used by the QMSS LLD to free a allocated block of memory.
#define Qmss_osalAccCsEnter   Osal_qmssAccCsEnter
 The macro is used by the QMSS LLD accumulator functions to provide critical sections to protect global and shared variables from access from multiple cores and access from multiple threads on single core.
#define Qmss_osalAccCsExit   Osal_qmssAccCsExit
 The macro is used by the QMSS LLD accumulator functions to exit a critical section protected using Osal_qmssAccCsEnter() API.
#define Qmss_osalCsEnter   Osal_qmssCsEnter
 The macro is used by the QMSS LLD to provide critical sections to protect global and shared variables from.
#define Qmss_osalCsExit   Osal_qmssCsExit
 The macro is used by the QMSS LLD to exit a critical section protected using Osal_qmssCsEnter() API.
#define Qmss_osalMtCsEnter   Osal_qmssMtCsEnter
 The macro is used by the QMSS LLD to provide critical sections to protect global and shared variables from.
#define Qmss_osalMtCsExit   Osal_qmssMtCsExit
 The macro is used by the QMSS LLD to exit a critical section protected using Osal_qmssMtCsEnter() API.
#define Qmss_osalLog   Osal_qmssLog
 The macro is used by the QMSS LLD to log various messages.
#define Qmss_osalBeginMemAccess   Osal_qmssBeginMemAccess
 The macro is used by the QMSS LLD to indicate that a block of memory is about to be accessed. If the memory block is cached then this indicates that the application would need to ensure that the cache is updated with the data from the actual memory.
#define Qmss_osalEndMemAccess   Osal_qmssEndMemAccess
 The macro is used by the QMSS LLD to indicate that the block of memory has finished being accessed. If the memory block is cached then the application would need to ensure that the contents of the cache are updated immediately to the actual memory.

Functions

void * Osal_qmssVirtToPhy (void *ptr)
 This function is used to convert virtual addresses to physical addresses for objects other than descriptors, such as linking RAM or descriptor region base addresses.
void * Osal_qmssPhyToVirt (void *ptr)
 This function is used to convert physical addresses to virtual addresses for objects other than descriptors, such as linking RAM or descriptor region base addresses.
void * Osal_qmssConvertDescVirtToPhy (uint32_t QID, void *descAddr)
 This function is used to convert virtual addresses to physical addresses for individual descriptors.
void * Osal_qmssConvertDescPhyToVirt (uint32_t QID, void *descAddr)
 This function is used to convert physical addresses to virtual addresses for individual descriptors.

Define Documentation

#define Qmss_osalAccCsEnter   Osal_qmssAccCsEnter

The macro is used by the QMSS LLD accumulator functions to provide critical sections to protect global and shared variables from access from multiple cores and access from multiple threads on single core.

Prototype: The following is the C prototype for the expected OSAL API.

       void* Osal_qmssAccCsEnter (void)
    

Parameter
None.

Return Value
Handle used to lock critical section.

#define Qmss_osalAccCsExit   Osal_qmssAccCsExit

The macro is used by the QMSS LLD accumulator functions to exit a critical section protected using Osal_qmssAccCsEnter() API.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_qmssAccCsExit (void *CsHandle)
    

Parameter
Handle for unlocking critical section.

Return Value
Not applicable.

#define Qmss_osalBeginMemAccess   Osal_qmssBeginMemAccess

The macro is used by the QMSS LLD to indicate that a block of memory is about to be accessed. If the memory block is cached then this indicates that the application would need to ensure that the cache is updated with the data from the actual memory.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_qmssBeginMemAccess (void *ptr, uint32_t size) 
    

Parameter
Address of memory block.
Size of memory block.

Return Value
Not applicable.

#define Qmss_osalCsEnter   Osal_qmssCsEnter

The macro is used by the QMSS LLD to provide critical sections to protect global and shared variables from.

access from multiple cores and access from multiple threads on single core

Prototype: The following is the C prototype for the expected OSAL API.

       void* Osal_qmssCsEnter (void)
    

Parameter
None.

Return Value
Handle used to lock critical section.

#define Qmss_osalCsExit   Osal_qmssCsExit

The macro is used by the QMSS LLD to exit a critical section protected using Osal_qmssCsEnter() API.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_qmssCsExit (void *CsHandle)
    

Parameter
Handle for unlocking critical section.

Return Value
Not applicable.

#define Qmss_osalEndMemAccess   Osal_qmssEndMemAccess

The macro is used by the QMSS LLD to indicate that the block of memory has finished being accessed. If the memory block is cached then the application would need to ensure that the contents of the cache are updated immediately to the actual memory.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_qmssEndMemAccess (void *ptr, uint32_t size) 
    

Parameter
Address of memory block.
Size of memory block.

Return Value
Not applicable.

#define Qmss_osalFree   Osal_qmssFree

The macro is used by the QMSS LLD to free a allocated block of memory.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_qmssFree (void *ptr, uint32_t size)
    

Parameter
Pointer to the block of memory to be cleaned up.
Size of the allocated memory which is being freed.

Return Value
Not applicable.

#define Qmss_osalLog   Osal_qmssLog

The macro is used by the QMSS LLD to log various messages.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_qmssLog( char *fmt, ... ) 
    

Parameter
printf-style format string

Return Value
Not applicable.

#define Qmss_osalMalloc   Osal_qmssMalloc

The macro is used by the QMSS LLD to allocate memory of specified size.

Prototype: The following is the C prototype for the expected OSAL API.

       void* Osal_qmssMalloc (uint32_t numBytes)
    

Parameter
Number of bytes to be allocated

Return Value
Pointer to the allocated block size

#define Qmss_osalMtCsEnter   Osal_qmssMtCsEnter

The macro is used by the QMSS LLD to provide critical sections to protect global and shared variables from.

access from multiple threads on single core

Prototype: The following is the C prototype for the expected OSAL API.

       void* Osal_qmssMtCsEnter (void)
    

Parameter
None.

Return Value
Handle used to lock critical section.

#define Qmss_osalMtCsExit   Osal_qmssMtCsExit

The macro is used by the QMSS LLD to exit a critical section protected using Osal_qmssMtCsEnter() API.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_qmssMtCsExit (void *CsHandle)
    

Parameter
Handle for unlocking critical section.

Return Value
Not applicable.


Function Documentation

void* Osal_qmssConvertDescPhyToVirt ( uint32_t  QID,
void *  descAddr 
)

This function is used to convert physical addresses to virtual addresses for individual descriptors.

Implementation is specified as function pointer in qmss_device.c.

Parameters:
[in] QID 16-bit queue ID which can be used to quickly access translation table which could be different per queue.
[in] descAddr Physical address
Return values:
Virtual/logical address

void* Osal_qmssConvertDescVirtToPhy ( uint32_t  QID,
void *  descAddr 
)

This function is used to convert virtual addresses to physical addresses for individual descriptors.

Implementation is specified as function pointer in qmss_device.c.

Parameters:
[in] QID 16-bit queue ID which can be used to quickly access translation table which could be different per queue.
[in] descAddr Virtual/logical address
Return values:
Physical address

void* Osal_qmssPhyToVirt ( void *  ptr  ) 

This function is used to convert physical addresses to virtual addresses for objects other than descriptors, such as linking RAM or descriptor region base addresses.

Implementation is specified as function pointer in qmss_device.c.

Parameters:
[in] ptr Physical address
Return values:
Virtual/logical address

void* Osal_qmssVirtToPhy ( void *  ptr  ) 

This function is used to convert virtual addresses to physical addresses for objects other than descriptors, such as linking RAM or descriptor region base addresses.

Implementation is specified as function pointer in qmss_device.c.

Parameters:
[in] ptr Virtual/logical address
Return values:
Physical address


Copyright 2014, Texas Instruments Incorporated