1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (C) 2023, STMicroelectronics 4 * Copyright (C) 2022, Microchip 5 */ 6 #ifndef __PTA_STATS_H 7 #define __PTA_STATS_H 8 9 #define STATS_UUID \ 10 { 0xd96a5b40, 0xe2c7, 0xb1af, \ 11 { 0x87, 0x94, 0x10, 0x02, 0xa5, 0xd5, 0xc6, 0x1b } } 12 13 #define STATS_CMD_PAGER_STATS 0 14 #define STATS_CMD_ALLOC_STATS 1 15 #define STATS_CMD_MEMLEAK_STATS 2 16 /* 17 * UTEE_ENTRY_FUNC_DUMP_MEMSTATS 18 * [out] memref[0] Array of context information of loaded TAs 19 * 20 * Each cell of the TA information array contains: 21 * TEE_UUID TA UUID 22 * uint32_t Non zero if TA panicked, 0 otherwise 23 * uint32_t Number of sessions opened by the TA 24 * uint32_t Byte size currently allocated in TA heap 25 * uint32_t Max bytes allocated since last stats reset 26 * uint32_t TA heap pool byte size 27 * uint32_t Number of failed allocation requests 28 * uint32_t Biggest byte size which allocation failed 29 * uint32_t Biggest byte size which allocation succeeded 30 */ 31 #define STATS_CMD_TA_STATS 3 32 33 /* 34 * STATS_CMD_GET_TIME - Get both REE time and TEE time 35 * 36 * [out] value[0].a REE time as seen by OP-TEE in seconds 37 * [out] value[0].b REE time as seen by OP-TEE, milliseconds part 38 * [out] value[1].a TEE system time in seconds 39 * [out] value[1].b TEE system time, milliseconds part 40 */ 41 #define STATS_CMD_GET_TIME 4 42 43 #define STATS_NB_POOLS 4 44 45 #endif /*__PTA_STATS_H*/ 46