| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

scma.h
Go to the documentation of this file.
1
9 #pragma once
10
11 #include <tee_internal_api.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
20 enum TEES_ContiguousAllocateFlags {
21 TEES_CONTIGUOUS_FLAG_ZERO_ON_FREE = (1U << 0),
22 TEES_CONTIGUOUS_FLAG_ZERO_ON_ALLOC = (1U << 1),
23 };
24
28 enum TEES_ContiguousMapFlags {
29 TEES_CONTIGUOUS_MAP_READ = (1U << 0),
30 TEES_CONTIGUOUS_MAP_WRITE = (1U << 1),
31 TEES_CONTIGUOUS_MAP_NON_CACHEABLE = (1U << 2),
32 TEES_CONTIGUOUS_MAP_FIXED = (1U << 3),
39 TEES_CONTIGUOUS_MAP_POPULATE = (1U << 4),
40 };
41
43 struct __TEES_ContiguousMemoryHandle;
50 typedef struct __TEES_ContiguousMemoryHandle *TEES_ContiguousMemoryHandle;
51
93 TEE_Result DSO_EXPORT TEES_AllocateContiguousMemory(
94 const char *region,
95 size_t size,
96 size_t align,
97 uint32_t flags,
98 TEES_ContiguousMemoryHandle *memory);
99
114 void DSO_EXPORT TEES_ReleaseContiguousMemory(TEES_ContiguousMemoryHandle memory);
115
160 TEE_Result DSO_EXPORT TEES_MapContiguousMemory(
161 TEES_ContiguousMemoryHandle memory,
162 void **addr,
163 uint32_t flags);
164
179 void DSO_EXPORT TEES_UnmapContiguousMemory(void *addr);
180
205 TEE_Result DSO_EXPORT TEES_GetContiguousMemoryPhysaddr(
206 TEES_ContiguousMemoryHandle memory,
207 uint64_t *physaddr);
208
209 #ifdef __cplusplus
210 }
211 #endif
212
TEES_ReleaseContiguousMemory
void TEES_ReleaseContiguousMemory(TEES_ContiguousMemoryHandle memory)
Releases physically contiguous memory buffer that was previously allocated by TEES_AllocateContiguous...
TEES_ContiguousMemoryHandle
struct __TEES_ContiguousMemoryHandle * TEES_ContiguousMemoryHandle
Definition: scma.h:50
TEES_CONTIGUOUS_MAP_POPULATE
Definition: scma.h:39
TEES_AllocateContiguousMemory
TEE_Result TEES_AllocateContiguousMemory(const char *region, size_t size, size_t align, uint32_t flags, TEES_ContiguousMemoryHandle *memory)
Allocates physically contiguous memory buffer handle of the specified region type.
TEES_GetContiguousMemoryPhysaddr
TEE_Result TEES_GetContiguousMemoryPhysaddr(TEES_ContiguousMemoryHandle memory, uint64_t *physaddr)
Retrieves physical address of physically contiguous memory buffer that was previously allocated by TE...
TEES_UnmapContiguousMemory
void TEES_UnmapContiguousMemory(void *addr)
Unmaps physically contiguous memory buffer that was previously mapped by TEES_MapContiguousMemory.
TEES_CONTIGUOUS_FLAG_ZERO_ON_ALLOC
Definition: scma.h:22
TEES_CONTIGUOUS_FLAG_ZERO_ON_FREE
Definition: scma.h:21
TEES_CONTIGUOUS_MAP_WRITE
Definition: scma.h:30
TEES_ContiguousAllocateFlags
TEES_ContiguousAllocateFlags
Determines the desired allocated memory handle properties.
Definition: scma.h:20
TEES_MapContiguousMemory
TEE_Result TEES_MapContiguousMemory(TEES_ContiguousMemoryHandle memory, void **addr, uint32_t flags)
Maps physically contiguous memory buffer previously allocated by TEES_AllocateContiguousMemory into t...
TEES_ContiguousMapFlags
TEES_ContiguousMapFlags
Determines the desired mapping properties.
Definition: scma.h:28
TEES_CONTIGUOUS_MAP_NON_CACHEABLE
Definition: scma.h:31
U
#define U(n)
Defined for compatibility now.
Definition: tee_smc.h:18
TEES_CONTIGUOUS_MAP_FIXED
Definition: scma.h:32
TEES_CONTIGUOUS_MAP_READ
Definition: scma.h:29