summaryrefslogtreecommitdiff
path: root/lib/libutee/include/pta_gprof.h
blob: e8dcdbe47ed1ac52e07de8fc7ac7c258d7ae2a8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (c) 2016, Linaro Limited
 * All rights reserved.
 */

#ifndef __PTA_GPROF_H
#define __PTA_GPROF_H

/*
 * Interface to the gprof pseudo-TA, which is used by libutee to control TA
 * profiling and forward data to tee-supplicant.
 */

#define PTA_GPROF_UUID { 0x2f6e0d48, 0xc574, 0x426d, { \
			 0x82, 0x4e, 0x40, 0x19, 0x8c, 0xde, 0x5c, 0xac } }

/*
 * Send TA profiling data (gmon.out format) to tee-supplicant
 * Data may be sent in several chunks: first set id to 0, then re-use the
 * allocated value in subsequent calls.
 *
 * [in/out] value[0].a: id
 * [in]     memref[1]: profiling data
 */
#define PTA_GPROF_SEND			0

/*
 * Start PC sampling of a user TA session
 *
 * [in/out] memref[0]: sampling buffer
 * [in]     value[1].a: offset: the lowest PC value in the TA
 * [in]     value[1].b: scale: histogram scaling factor
 */
#define PTA_GPROF_START_PC_SAMPLING	1

/*
 * Stop PC sampling of a user TA session and retrieve data
 *
 * [out] value[0].a: sampling frequency
 */
#define PTA_GPROF_STOP_PC_SAMPLING	2

#endif /* __PTA_GPROF_H */