1 /* 2 * Copyright 2017, Rockchip Electronics Co., Ltd 3 * hisping lin, <hisping.lin@rock-chips.com> 4 * 5 * SPDX-License-Identifier: GPL-2.0+ 6 */ 7 #ifndef TEE_RPC_H 8 #define TEE_RPC_H 9 10 #include <optee_include/tee_base_types.h> 11 /* 12 * tee_rpc_invoke cmd definitions, keep in sync with tee-supplicant 13 */ 14 #define TEE_RPC_LOAD_TA 0x10000001 15 #define TEE_RPC_FREE_TA 0x10000009 16 #define TEE_RPC_RPMB_CMD 0x1000000A 17 #define TEE_RPC_FS 0x10000010 18 #define TEE_RPC_GET_TIME 0x10000011 19 20 /* RPMB Related defines */ 21 #define TEE_RPC_RPMB_CMD_DATA_REQ 0x00 22 #define TEE_RPC_RPMB_CMD_GET_DEV_INFO 0x01 23 24 #define TEE_RPC_RPMB_MSG_TYPE_REQ_AUTH_KEY_PROGRAM 0x0001 25 #define TEE_RPC_RPMB_MSG_TYPE_REQ_WRITE_COUNTER_VAL_READ 0x0002 26 #define TEE_RPC_RPMB_MSG_TYPE_REQ_AUTH_DATA_WRITE 0x0003 27 #define TEE_RPC_RPMB_MSG_TYPE_REQ_AUTH_DATA_READ 0x0004 28 #define TEE_RPC_RPMB_MSG_TYPE_REQ_RESULT_READ 0x0005 29 #define TEE_RPC_RPMB_MSG_TYPE_RESP_AUTH_KEY_PROGRAM 0x0100 30 #define TEE_RPC_RPMB_MSG_TYPE_RESP_WRITE_COUNTER_VAL_READ 0x0200 31 #define TEE_RPC_RPMB_MSG_TYPE_RESP_AUTH_DATA_WRITE 0x0300 32 #define TEE_RPC_RPMB_MSG_TYPE_RESP_AUTH_DATA_READ 0x0400 33 34 /* keep in sync with Linux driver */ 35 #define TEE_RPC_WAIT_MUTEX 0x20000000 36 /* Values specific to TEE_RPC_WAIT_MUTEX */ 37 #define TEE_WAIT_MUTEX_SLEEP 0 38 #define TEE_WAIT_MUTEX_WAKEUP 1 39 #define TEE_WAIT_MUTEX_DELETE 2 40 #define TEE_RPC_WAIT 0x30000000 41 42 #endif 43