1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (C) 2018, Linaro Limited
4  */
5 
6 #ifndef __RNG_PTA_CLIENT_H
7 #define __RNG_PTA_CLIENT_H
8 
9 #define PTA_RNG_UUID { 0xab7a617c, 0xb8e7, 0x4d8f, \
10 		{ 0x83, 0x01, 0xd0, 0x9b, 0x61, 0x03, 0x6b, 0x64 } }
11 
12 #define TEE_ERROR_HEALTH_TEST_FAIL	0x00000001
13 
14 /*
15  * PTA_CMD_GET_ENTROPY - Get Entropy from RNG using Thermal Sensor
16  *
17  * param[0] (inout memref) - Entropy buffer memory reference
18  * param[1] unused
19  * param[2] unused
20  * param[3] unused
21  *
22  * Result:
23  * TEE_SUCCESS - Invoke command success
24  * TEE_ERROR_BAD_PARAMETERS - Incorrect input param
25  * TEE_ERROR_NOT_SUPPORTED - Requested entropy size greater than size of pool
26  * TEE_ERROR_HEALTH_TEST_FAIL - Continuous health testing failed
27  */
28 #define PTA_CMD_GET_ENTROPY		0x0
29 
30 /*
31  * PTA_CMD_GET_RNG_INFO - Get RNG information
32  *
33  * param[0] (out value) - value.a: RNG data-rate in bytes per second
34  *                        value.b: Quality/Entropy per 1024 bit of data
35  * param[1] unused
36  * param[2] unused
37  * param[3] unused
38  *
39  * Result:
40  * TEE_SUCCESS - Invoke command success
41  * TEE_ERROR_BAD_PARAMETERS - Incorrect input param
42  */
43 #define PTA_CMD_GET_RNG_INFO		0x1
44 
45 #endif /* __RNG_PTA_CLIENT_H */
46