Functions |
Ptr | ti_sdo_ce_osal_Memory_alloc (UInt size, ti_sdo_ce_osal_Memory_AllocParams *params) |
| General memory allocation.
|
Void | ti_sdo_ce_osal_Memory_cacheInv (Ptr addr, Int sizeInBytes) |
| Invalidate a range of cache.
|
Void | ti_sdo_ce_osal_Memory_cacheWb (Ptr addr, Int sizeInBytes) |
| Write back cache.
|
Void | ti_sdo_ce_osal_Memory_cacheWbInv (Ptr addr, Int sizeInBytes) |
| Write back and invalidate cache.
|
Void | ti_sdo_ce_osal_Memory_cacheWbInvAll () |
| Write back and invalidate the entire cache. Not supported yet on all OS's.
|
Ptr | ti_sdo_ce_osal_Memory_contigAlloc (UInt size, UInt align) |
| Allocate physically contiguous blocks of memory.
|
Bool | ti_sdo_ce_osal_Memory_contigFree (Ptr addr, UInt size) |
| Free memory allocated by ti_sdo_ce_osal_Memory_contigAlloc()
|
Bool | ti_sdo_ce_osal_Memory_free (Ptr addr, UInt size, ti_sdo_ce_osal_Memory_AllocParams *params) |
| Free memory allocated with ti_sdo_ce_osal_Memory_alloc().
|
Void | ti_sdo_ce_osal_Memory_dumpKnownContigBufsList (Void) |
| Dumps the list of all translated/registered bufs.
|
UInt32 | ti_sdo_ce_osal_Memory_getBufferPhysicalAddress (Ptr virtualAddress, Int sizeInBytes, Bool *isContiguous) |
| Converts application virtual address to a physical address.
|
Int | ti_sdo_ce_osal_Memory_getHeapId (String name) |
| Get the heap heap ID corresponding to a heap name. This number will be between 0 and the value returned by ti_sdo_ce_osal_Memory_getNumHeaps(). The heap Id can be passed to ti_sdo_ce_osal_Memory_redefine() and ti_sdo_ce_osal_Memory_restoreHeap().
|
Int | ti_sdo_ce_osal_Memory_getNumHeaps () |
| Get the number of memory heaps.
|
Ptr | ti_sdo_ce_osal_Memory_getBufferVirtualAddress (UInt32 physicalAddress, Int sizeInBytes) |
| Obtains the virtual address of a physically contiguous buffer.
|
Void | ti_sdo_ce_osal_Memory_registerContigBuf (UInt32 virtualAddress, UInt32 sizeInBytes, UInt32 physicalAddress) |
| Register a physical buffer allocated without ti_sdo_ce_osal_Memory_contigAlloc()
|
Void | ti_sdo_ce_osal_Memory_unregisterContigBuf (UInt32 virtualAddress, UInt32 sizeInBytes) |
| Unregisters a physical buffer allocated without ti_sdo_ce_osal_Memory_contigAlloc().
|
Detailed Description
This Memory module provides services to manage memory in OS independent
environments.
@section pkgPrefix Package Prefix
In order to avoid global namespace collisions, this module prefixes all its exports with the globally unique package name it's contained in (ti_sdo_ce_osal). As a usability feature (and to remain backward compatible with previous releases), these exports are also made available via the more traditional 'short' name - without the package name prefix.
For example, although the actual export may be named 'ti_sdo_ce_osal_Memory_alloc', it's generally usable via the shorter name 'Memory_alloc'. In the rare case where a namespace collision occurs, users can disable the definitions of the 'short' name by defining the symbol 'ti_sdo_ce_osal_Memory__nolocalnames' before including this module's header. For example:
#define ti_sdo_ce_osal_Memory__nolocalnames
#include <ti/sdo/ce/osal/Memory.h>
This follows the same approach the XDCtools takes, and further explaination is available here: http://rtsc.eclipse.org/docs-tip/Integrating_RTSC_Modules#Eliminating_Identifier_Conflicts.
Macro Definition Documentation
#define ti_sdo_ce_osal_Memory_DEFAULTALIGNMENT ((UInt)(-1)) |
#define Memory_MODNAME "ti.sdo.ce.osal.Memory" |
Name to pass to Diags_setMask() to enable logging for Memory functions. For example, Diags_setMask(Memory_MODNAME"+EX1234567"); turns on all Log statements in this module. Diags_setMask() must be called after initialization to take effect.
#define ti_sdo_ce_osal_Memory_GTNAME "OM" |
GT name containing the trace mask for this module.
#define ti_sdo_ce_osal_Memory_CACHED 0x00000000 |
#define ti_sdo_ce_osal_Memory_NONCACHED 0x00000001 |
#define ti_sdo_ce_osal_Memory_CACHEDMASK 0x00000001 |
Typedef Documentation
Enumeration Type Documentation
Enum values for ti_sdo_ce_osal_Memory_AllocParams.type.
- See also:
- ti_sdo_ce_osal_Memory_AllocParams
- Enumerator:
ti_sdo_ce_osal_Memory_MALLOC |
malloc()-based allocation
@remarks This definition also has a short name alias of <b>Memory_MALLOC</b>. |
ti_sdo_ce_osal_Memory_SEG |
DSP/BIOS segment-based allocation
@remarks This definition also has a short name alias of <b>Memory_SEG</b>. |
ti_sdo_ce_osal_Memory_CONTIGPOOL |
Contiguous, pool-based allocation
@remarks This definition also has a short name alias of <b>Memory_CONTIGPOOL</b>. |
ti_sdo_ce_osal_Memory_CONTIGHEAP |
Contiguous, heap-based allocation
@remarks This definition also has a short name alias of <b>Memory_CONTIGHEAP</b>. |
Function Documentation
Void ti_sdo_ce_osal_Memory_cacheInv |
( |
Ptr |
addr, |
|
|
Int |
sizeInBytes |
|
) |
| |
Void ti_sdo_ce_osal_Memory_cacheWb |
( |
Ptr |
addr, |
|
|
Int |
sizeInBytes |
|
) |
| |
Void ti_sdo_ce_osal_Memory_cacheWbInv |
( |
Ptr |
addr, |
|
|
Int |
sizeInBytes |
|
) |
| |
Void ti_sdo_ce_osal_Memory_cacheWbInvAll |
( |
| ) |
|
Ptr ti_sdo_ce_osal_Memory_contigAlloc |
( |
UInt |
size, |
|
|
UInt |
align |
|
) |
| |
Bool ti_sdo_ce_osal_Memory_contigFree |
( |
Ptr |
addr, |
|
|
UInt |
size |
|
) |
| |
Void ti_sdo_ce_osal_Memory_dumpKnownContigBufsList |
( |
Void |
| ) |
|
UInt32 ti_sdo_ce_osal_Memory_getBufferPhysicalAddress |
( |
Ptr |
virtualAddress, |
|
|
Int |
sizeInBytes, |
|
|
Bool * |
isContiguous |
|
) |
| |
Converts application virtual address to a physical address.
This API also checks verifies that the buffer is really contiguous.
- Parameters:
-
[in] | virtualAddress | Address of a buffer. |
[in] | sizeInBytes | Size of the buffer. |
[out] | isContiguous | Optional flag indicating whether the buffer was physically contiguous or not. |
- Return values:
-
0 | Failure, the physical address could not be obtained. |
non-zero | The physical address of the buffer. |
- See also:
- ti_sdo_ce_osal_Memory_getBufferVirtualAddress()
Int ti_sdo_ce_osal_Memory_getHeapId |
( |
String |
name | ) |
|
Get the heap heap ID corresponding to a heap name. This number will be between 0 and the value returned by ti_sdo_ce_osal_Memory_getNumHeaps(). The heap Id can be passed to ti_sdo_ce_osal_Memory_redefine() and ti_sdo_ce_osal_Memory_restoreHeap().
- Return values:
-
>= | 0 The heap number. |
< | 0 No heap with the given name was found. |
- See also:
- ti_sdo_ce_osal_Memory_getNumHeaps()
Int ti_sdo_ce_osal_Memory_getNumHeaps |
( |
| ) |
|
Get the number of memory heaps.
- Return values:
-
The | number of memroy heaps. |
Ptr ti_sdo_ce_osal_Memory_getBufferVirtualAddress |
( |
UInt32 |
physicalAddress, |
|
|
Int |
sizeInBytes |
|
) |
| |
Obtains the virtual address of a physically contiguous buffer.
- Parameters:
-
[in] | physicalAddress | Physical address of a buffer. |
[in] | sizeInBytes | Size of the buffer. |
- Return values:
-
NULL | Failure, the virtual address could not be obtained. |
non-zero | The virtual address of the buffer. |
- See also:
- ti_sdo_ce_osal_Memory_getBufferPhysicalAddress()
Void ti_sdo_ce_osal_Memory_registerContigBuf |
( |
UInt32 |
virtualAddress, |
|
|
UInt32 |
sizeInBytes, |
|
|
UInt32 |
physicalAddress |
|
) |
| |
Void ti_sdo_ce_osal_Memory_unregisterContigBuf |
( |
UInt32 |
virtualAddress, |
|
|
UInt32 |
sizeInBytes |
|
) |
| |
Variable Documentation