Functions

int tsi_malloc_init_pool (int pool, void *base_virt, uintptr_t base_phys, int size, int reset)
 Initial memory pool, command list memory malloc base on pool. More...
 
void * tsi_malloc_pool (int pool, int size)
 Malloc memory from pool. More...
 
void tsi_free (void *ptr)
 Free memory. More...
 
uintptr_t tsi_virt2phys (void *addr)
 Free memory. More...
 

Detailed Description

Function Documentation

◆ tsi_free()

void tsi_free ( void *  ptr)

Free memory.

Parameters
[in]ptrMemory addr

◆ tsi_malloc_init_pool()

int tsi_malloc_init_pool ( int  pool,
void *  base_virt,
uintptr_t  base_phys,
int  size,
int  reset 
)

Initial memory pool, command list memory malloc base on pool.

Parameters
[in]poolPool id, the value is fixed – 0
[in]base_virtVirtual addr, equel physical address
[in]base_physPhysical address
[in]sizePool memory size
[in]resetIf 0, reset the memory
Returns
Return Negative mean initial failure

◆ tsi_malloc_pool()

void* tsi_malloc_pool ( int  pool,
int  size 
)

Malloc memory from pool.

Parameters
[in]poolPool id, the value is fixed – 0
[in]sizeMalloc size
Returns
Return the malloc memory addr

◆ tsi_virt2phys()

uintptr_t tsi_virt2phys ( void *  addr)

Free memory.

Parameters
[in]addrMemory virtual addr, equel physical address
Returns
Return memory addr