1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2014, STMicroelectronics International N.V. 4 */ 5 6 #ifndef TEE_INTERNAL_API_EXTENSIONS_H 7 #define TEE_INTERNAL_API_EXTENSIONS_H 8 9 /* trace support */ 10 #include <trace.h> 11 #include <stdio.h> 12 #include <tee_api_defines_extensions.h> 13 #include <tee_api_types.h> 14 15 void tee_user_mem_mark_heap(void); 16 size_t tee_user_mem_check_heap(void); 17 /* Hint implementation defines */ 18 #define TEE_USER_MEM_HINT_NO_FILL_ZERO 0x80000000 19 20 /* 21 * Cache maintenance support (TA requires the CACHE_MAINTENANCE property) 22 * 23 * TEE_CacheClean() Write back to memory any dirty data cache lines. The line 24 * is marked as not dirty. The valid bit is unchanged. 25 * 26 * TEE_CacheFlush() Purges any valid data cache lines. Any dirty cache lines 27 * are first written back to memory, then the cache line is 28 * invalidated. 29 * 30 * TEE_CacheInvalidate() Invalidate any valid data cache lines. Any dirty line 31 * are not written back to memory. 32 */ 33 TEE_Result TEE_CacheClean(char *buf, size_t len); 34 TEE_Result TEE_CacheFlush(char *buf, size_t len); 35 TEE_Result TEE_CacheInvalidate(char *buf, size_t len); 36 37 #endif 38