1 /* 2 * Copyright (C) 2022 Huawei Technologies Co., Ltd. 3 * 4 * This software is licensed under the terms of the GNU General Public 5 * License version 2, as published by the Free Software Foundation, and 6 * may be copied, distributed, and modified under those terms. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 */ 13 #ifndef TZDEBUG_H 14 #define TZDEBUG_H 15 16 #include <linux/types.h> 17 struct ta_mem { 18 char ta_name[64]; 19 uint32_t pmem; 20 uint32_t pmem_max; 21 uint32_t pmem_limit; 22 }; 23 #define MEMINFO_TA_MAX 100 24 struct tee_mem { 25 uint32_t total_mem; 26 uint32_t pmem; 27 uint32_t free_mem; 28 uint32_t free_mem_min; 29 uint32_t ta_num; 30 struct ta_mem ta_mem_info[MEMINFO_TA_MAX]; 31 }; 32 33 int get_tee_meminfo(struct tee_mem *meminfo); 34 void tee_dump_mem(void); 35 int tzdebug_init(void); 36 void free_tzdebug(void); 37 38 #endif