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