My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
otz_tee_mem_mgmt.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 /*
24  * memory management implementation
25  *
26  */
27 #ifndef __OTZ_TEE_MEM_MGMT_H_
28 #define __OTZ_TEE_MEM_MGMT_H_
29 
30 #include <sw_common_types.h>
31 
35 #define TEE_MEMORY_ACCESS_READ 0xFFFF5002
36 #define TEE_MEMORY_ACCESS_WRITE 0xFFFF5003
37 #define TEE_MEMORY_ACCESS_ANY_OWNER 0xFFFF5004
38 
39 /*
40  * @brief
41  *
42  * @param accessFlags
43  * @param buffer
44  * @param size
45  */
46 //TEE_Result TEE_CheckMemoryAccessRights( u32 accessFlags, void* buffer, size_t size );
47 
48 /*
49  * @brief
50  *
51  * @param instanceData
52  */
53 //void TEE_SetInstanceData( void* instanceData );
54 
55 /*
56  * @brief
57  *
58  * @return
59  */
60 //void* TEE_GetInstanceData( void );
61 
62 /*
63  * @brief
64  *
65  * @param size
66  * @param hint
67  *
68  * @return
69  */
70 void* TEE_Malloc( size_t size, u32 hint );
71 
72 /*
73  * @brief
74  *
75  * @param buffer
76  * @param newSize
77  *
78  * @return
79  */
80 void* TEE_Realloc( void* buffer, u32 newSize );
81 
82 /*
83  * @brief
84  *
85  * @param buffer
86  */
87 void TEE_Free( void *buffer );
88 
89 /*
90  * @brief
91  *
92  * @param dest
93  * @parm src
94  * @param count
95  */
96 void TEE_MemMove( void* dest, void* src, u32 count );
97 
98 /*
99  * @brief
100  *
101  * @param src
102  * @param dest
103  * @param length
104  *
105  * @return
106  */
107 int TEE_MemCompare( void* src, void* dest, u32 length);
108 
109 /*
110  * @brief
111  *
112  * @param buffer
113  * @param x
114  * @param size
115  */
116 void TEE_MemFill( void* buffer, u32 x, u32 size);
117 
125 void TEE_MemCpy( void* dest, void* src, u32 count );
126 
127 #endif
int TEE_MemCompare(void *src, void *dest, u32 length)
compares the first length bytes of buffer1 to the first length bytes of buffer2
Definition: otz_tee_mem_mgmt.c:128
void * TEE_Realloc(void *buffer, u32 newSize)
changes the size of the memory object pointed to by buffer to the size specified by newSize ...
Definition: otz_tee_mem_mgmt.c:90
void TEE_MemFill(void *buffer, u32 x, u32 size)
writes the byte x into the first size bytes of the buffer
Definition: otz_tee_mem_mgmt.c:139
void * TEE_Malloc(size_t size, u32 hint)
allocates space for an object whose size in bytes is specified in the parameter size ...
Definition: otz_tee_mem_mgmt.c:61
void TEE_MemCpy(void *dest, void *src, u32 count)
copies the first count bytes of src to the first count bytes of dest
Definition: otz_tee_mem_mgmt.c:151
void TEE_MemMove(void *dest, void *src, u32 count)
copies count bytes from the object pointed to by src into the object pointed to by dest ...
Definition: otz_tee_mem_mgmt.c:114
s32int count
Definition: virtual_keyboard.c:40
void TEE_Free(void *buffer)
causes the space pointed to by buffer to be deallocated that is, made available for further allocatio...
Definition: otz_tee_mem_mgmt.c:102