ar_osal/api/ar_osal_shmem.h
Structures
ar_shmem_proc_info_t
Members
ar_shmem_info_t
Shared memory info structure.
Members
out, physical address lsw, alignment requirements apply, like 4k, start address multiple of 64, output of ar_shmem_alloc()
out, physical address msw, alignment requirements apply, like 4k, start address multiple of 64, output of ar_shmem_alloc()
out, virtual address 64bit/32bit, alignment requirements apply, like 4k, start address multiple of 64, input for ar_shmem_alloc()
out opt, pointer address to metadata structure defined by each platform for ar_shmem_alloc()
in, pointer to array of size num_sys_id for sub-system Ids provided in ar_osal_sys_id.h, used to allocate shared memory between the given list of sys_id provided with ar_shmem_alloc()/ar_shmem_map() call.
in opt, optional field for passing platform specific data to OSAL, this can be used for example to communicate some heap properties provided only for ar_shmem_alloc()
ar_shmem_hyp_assign_phys_addr_t
Shared memory physical address and size details for hyp assign.
Members
ar_shmem_hyp_assign_dest_sys_info_t
Destination sub system id details and permission required for hyp assign.
Members
ar_shmem_hyp_assign_phys_info_t
Hyp assign physical memory info structure.
Members
in opt, pointer address to metadata structure defined by platform during ar_shmem_alloc() call.
Functions
ar_shmem_init
Initialize the shared memory interface (V1 API).
This function initializes the shared memory interface using the default configuration. It performs the legacy initialization flow.
ar_shmem_init_v2
Initialize the shared memory interface using a list of processor domains (V2 API).
This V2 API selects the appropriate shared memory implementation based on the provided list of processor domain IDs.
Passing num_master_procs = 0 results in behavior equivalent to the V1 API (ar_shmem_init), allowing a smooth transition from V1 to V2.
ar_shmem_alloc
Allocates shared memory.
Only non cached memory allocation supported. Size if multiple of 4KB and the returned is aligned to 4KB boundary. Buffer start address should be atleast 64bit multiple aligned.
ar_shmem_free
Frees shared memory.
ar_shmem_map
Helps map memory with SMMU an already allocated shared memory for a give sub system.
Size should be multiple of 4KB boundary. Buffer start address should be 64bit aligned.
info: pointer to ar_shmem_info. required input parameters in ar_shmem_info ar_shmem_info_t.cache_type ar_shmem_info_t.buf_size ar_shmem_info_t.mem_type ar_shmem_info_t.pa_lsw ar_shmem_info_t.pa_msw ar_shmem_info_t.num_sys_id ar_shmem_info_t.sys_id required output parameters in ar_shmem_info ar_shmem_info_t.ipa_lsw ar_shmem_info_t.ipa_msw
ar_shmem_unmap
Helps unmap the shared memory allocated externally with SMMU.
pointer to ar_shmem_info. required input parameters in ar_shmem_info ar_shmem_info_t.cache_type ar_shmem_info_t.buf_size ar_shmem_info_t.mem_type ar_shmem_info_t.pa_lsw ar_shmem_info_t.pa_msw ar_shmem_info_t.num_sys_id ar_shmem_info_t.sys_id

