86 typedef enum _tivx_mem_heap_region_e
170 typedef enum _tivx_memory_type_e {
180 typedef struct _tivx_shared_mem_ptr_t {
208 volatile uint32_t rsv[1];
217 typedef struct _tivx_mem_stats_t {
tivx_mem_heap_region_e
Enum that list all possible memory regions from which allocations are possible.
tivx_memory_type_e
An enumeration of TI extension memory import types.
int32_t tivxMemResetScratchHeap(vx_enum mem_heap_region)
Reset scratch memory.
void tivxMemFree(void *ptr, vx_uint32 size, vx_enum mem_heap_region)
Frees already allocated memory.
vx_status tivxMemTranslateFd(uint64_t dmaBufFd, uint32_t size, void **virtAddr, void **phyAddr)
Translates a given file descriptor to a virtual and physical addresss. The following conditions regar...
vx_status tivxMemTranslateVirtAddr(const void *virtAddr, uint64_t *fd, void **phyAddr)
Translates a given virtual address to a file descriptor and a physical address. The following conditi...
vx_uint32 mem_size
Total size of memory segment Set to 0 when memory segment size cannot be determined.
#define VX_ENUM_BASE(vendor, id)
External persistent non cachable memory.
void tivxEnableL1DandL2CacheWb(void)
For J784S4, the C7X cache coherency model is different than other Jacinto SoC's. While other SoC's C7...
void * tivxMemAlloc(vx_uint32 size, vx_enum mem_heap_region)
Allocates memory of given size.
External scratch non cachable memory.
Memory type when a DMA will access the memory rather than the HOST.
Internal memory at L2 level.
Structure describing a memory stats pointer.
volatile uint32_t dma_buf_fd_offset
Offset of dmaBufFd, This will be used by host/Linux CPU.
Structure describing a shared memory pointer.
volatile uint32_t mem_heap_region
Memory region to which this pointer belongs, see tivx_mem_heap_region_e.
vx_uint32 free_size
Max free block in memoru heap segment Set to 0 when free size cannot be determined.
Internal memory at L3 level.
volatile uint64_t host_ptr
Value of pointer as seen as by host CPU Host CPU will have method to convert to/from shared memory po...
Internal memory at L1 level.
vx_status tivxMemBufferMap(void *host_ptr, uint32_t size, vx_enum mem_type, vx_enum maptype)
Map an allocated buffer address.
void * tivxMemShared2TargetPtr(const tivx_shared_mem_ptr_t *shared_ptr)
Convert shared pointer to target pointer.
uint64_t tivxMemShared2PhysPtr(uint64_t shared_ptr, vx_enum mem_heap_region)
Convert shared pointer to system physical memory location This is mainly used for configuring physica...
void tivxMemStats(tivx_mem_stats *stats, vx_enum mem_type)
Get memory segment information.
uint64_t tivxMemHost2SharedPtr(uint64_t host_ptr, vx_enum mem_heap_region)
Convert Host pointer to shared pointer.
vx_status tivxMemBufferFree(tivx_shared_mem_ptr_t *mem_ptr, uint32_t size)
Free buffer from shared memory.
vx_status tivxMemBufferUnmap(void *host_ptr, uint32_t size, vx_enum mem_type, vx_enum maptype)
UnMap a buffer address.
volatile uint64_t shared_ptr
Value of pointer as seen in shared memory All CPUs will have method to convert from shared memory poi...
vx_status tivxMemBufferAlloc(tivx_shared_mem_ptr_t *mem_ptr, uint32_t size, vx_enum mem_heap_region)
Alloc buffer from shared memory.
volatile int32_t dma_buf_fd
Value of dmaBufFd correspods to the host_ptr, This will be used by host/Linux CPU.