1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2016, Linaro Limited 4 * All rights reserved. 5 */ 6 7 #ifndef __PTA_GPROF_H 8 #define __PTA_GPROF_H 9 10 /* 11 * Interface to the gprof pseudo-TA, which is used by libutee to control TA 12 * profiling and forward data to tee-supplicant. 13 */ 14 15 #define PTA_GPROF_UUID { 0x2f6e0d48, 0xc574, 0x426d, { \ 16 0x82, 0x4e, 0x40, 0x19, 0x8c, 0xde, 0x5c, 0xac } } 17 18 /* 19 * Send TA profiling data (gmon.out format) to tee-supplicant 20 * Data may be sent in several chunks: first set id to 0, then re-use the 21 * allocated value in subsequent calls. 22 * 23 * [in/out] value[0].a: id 24 * [in] memref[1]: profiling data 25 */ 26 #define PTA_GPROF_SEND 0 27 28 /* 29 * Start PC sampling of a user TA session 30 * 31 * [in/out] memref[0]: sampling buffer 32 * [in] value[1].a: offset: the lowest PC value in the TA 33 * [in] value[1].b: scale: histogram scaling factor 34 */ 35 #define PTA_GPROF_START_PC_SAMPLING 1 36 37 /* 38 * Stop PC sampling of a user TA session and retrieve data 39 * 40 * [out] value[0].a: sampling frequency 41 */ 42 #define PTA_GPROF_STOP_PC_SAMPLING 2 43 44 #endif /* __PTA_GPROF_H */ 45