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.
#define Qmss_osalVirtToPhy(x)   x
 The macro is used by the QMSS LLD to get the Physical address for a given Virtual address.
#define Qmss_osalPhyToVirt(x)   x
 The macro is used by the QMSS LLD to get the Virtual address for a given Physical address.
#define Qmss_osalConvertDescVirtToPhy(x)   x
 This callback should traverse the descriptor and convert all address references from virtual to physical.
#define Qmss_osalConvertDescPhyToVirt(x)   x
 This callback should traverse the descriptor and convert all address references from physical to virtual.

Functions

void * Osal_qmssCsEnter (void)
void Osal_qmssCsExit (void *CsHandle)
void * Osal_qmssAccCsEnter (void)
void Osal_qmssAccCsExit (void *CsHandle)
void * Osal_qmssMtCsEnter (void)
void Osal_qmssMtCsExit (void *CsHandle)
void Osal_qmssBeginMemAccess (void *ptr, uint32_t size)
void Osal_qmssEndMemAccess (void *ptr, uint32_t size)

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_osalConvertDescPhyToVirt (  )     x

This callback should traverse the descriptor and convert all address references from physical to virtual.

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

       void* Qmss_osalConvertDescPhyToVirt(void *descAddr)
    

Parameter
Physical Address of the descriptor.

Return Value
Virtual address of the descriptor.

#define Qmss_osalConvertDescVirtToPhy (  )     x

This callback should traverse the descriptor and convert all address references from virtual to physical.

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

       void* Qmss_osalConvertDescVirtToPhy(void *descAddr)
    

Parameter
Virtual Address of the descriptor.

Return Value
Physical address of the descriptor.

#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.

#define Qmss_osalPhyToVirt (  )     x

The macro is used by the QMSS LLD to get the Virtual address for a given Physical address.

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

       void *Osal_qmssPhyToVirt (void *ptr) 
    

Parameter
Physical Address of memory block.

Return Value
Virtual address.

#define Qmss_osalVirtToPhy (  )     x

The macro is used by the QMSS LLD to get the Physical address for a given Virtual address.

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

       void *Osal_qmssVirtToPhy (void *ptr) 
    

Parameter
Virtual Address of memory block.

Return Value
Physical address.


Function Documentation

void* Osal_qmssAccCsEnter ( void   ) 

Description
The function is used to enter a critical section. Function protects against

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

Return values:
Handle used to lock critical section
void Osal_qmssAccCsExit ( void *  CsHandle  ) 

Description
The function is used to exit a critical section protected using Osal_qmssAccCsEnter() API.

Parameters:
[in] CsHandle Handle for unlocking critical section.
Return values:
Not Applicable
void Osal_qmssBeginMemAccess ( void *  ptr,
uint32_t  size 
)

Description
The function is used 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.

Parameters:
[in] ptr Address of memory block
[in] size Size of memory block
Return values:
Not Applicable
void* Osal_qmssCsEnter ( void   ) 

Description
The function is used to enter a critical section. Function protects against

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

Return values:
Handle used to lock critical section
void Osal_qmssCsExit ( void *  CsHandle  ) 

Description
The function is used to exit a critical section protected using Osal_qmssCsEnter() API.

Parameters:
[in] CsHandle Handle for unlocking critical section.
Return values:
Not Applicable
void Osal_qmssEndMemAccess ( void *  ptr,
uint32_t  size 
)

Description
The function is used 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.

Parameters:
[in] ptr Address of memory block
[in] size Size of memory block
Return values:
Not Applicable
void* Osal_qmssMtCsEnter ( void   ) 

Description
The function is used to enter a critical section. Function protects against access from multiple threads on single core

Return values:
Handle used to lock critical section
void Osal_qmssMtCsExit ( void *  CsHandle  ) 

Description
The function is used to exit a critical section protected using Osal_qmssCsEnter() API.

Parameters:
[in] CsHandle Handle for unlocking critical section.
Return values:
Not Applicable

Copyright 2014, Texas Instruments Incorporated