diff options
| author | Anuj Gangwar <anujg@nvidia.com> | 2019-03-04 06:29:09 -0500 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-05-06 11:28:22 -0400 |
| commit | fc1fb4190482d328db06ff85a55ec4c9ad0892ed (patch) | |
| tree | f937b2308cb7e01d0d23190bb216fbcb50f7711f /include/uapi/misc | |
| parent | 9467a3f62c6a32fde8eb5ec10407b9c560995108 (diff) | |
include: uapi: move ote_protocol header file
Move ote_protocol.h file from security/tlk_driver/ to
include/uapi/misc/.
Bug 2062672
Change-Id: I6d88e167382d2902bfb54b2ae8a65d7b808b7351
Signed-off-by: Anuj Gangwar <anujg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2031862
(cherry picked from commit 37bbad13036fa4cfeeb3347919db3f825fe8dbc2)
Reviewed-on: https://git-master.nvidia.com/r/2109947
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/uapi/misc')
| -rw-r--r-- | include/uapi/misc/ote_protocol.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/include/uapi/misc/ote_protocol.h b/include/uapi/misc/ote_protocol.h new file mode 100644 index 000000000..2a7234644 --- /dev/null +++ b/include/uapi/misc/ote_protocol.h | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013-2019 NVIDIA Corporation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along | ||
| 15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __UAPI_TLK_OTE_PROTOCOL_H__ | ||
| 20 | #define __UAPI_TLK_OTE_PROTOCOL_H__ | ||
| 21 | |||
| 22 | #include <linux/ioctl.h> | ||
| 23 | #include <linux/types.h> | ||
| 24 | |||
| 25 | #define TE_IOCTL_MAGIC_NUMBER ('t') | ||
| 26 | #define TE_IOCTL_OPEN_CLIENT_SESSION \ | ||
| 27 | _IOWR(TE_IOCTL_MAGIC_NUMBER, 0x10, union te_cmd) | ||
| 28 | #define TE_IOCTL_CLOSE_CLIENT_SESSION \ | ||
| 29 | _IOWR(TE_IOCTL_MAGIC_NUMBER, 0x11, union te_cmd) | ||
| 30 | #define TE_IOCTL_LAUNCH_OPERATION \ | ||
| 31 | _IOWR(TE_IOCTL_MAGIC_NUMBER, 0x14, union te_cmd) | ||
| 32 | |||
| 33 | /* secure storage ioctl */ | ||
| 34 | #define TE_IOCTL_SS_CMD \ | ||
| 35 | _IOR(TE_IOCTL_MAGIC_NUMBER, 0x30, int) | ||
| 36 | |||
| 37 | #define TE_IOCTL_SS_CMD_GET_NEW_REQ 1 | ||
| 38 | #define TE_IOCTL_SS_CMD_REQ_COMPLETE 2 | ||
| 39 | |||
| 40 | #define TE_IOCTL_MIN_NR _IOC_NR(TE_IOCTL_OPEN_CLIENT_SESSION) | ||
| 41 | #define TE_IOCTL_MAX_NR _IOC_NR(TE_IOCTL_SS_CMD) | ||
| 42 | |||
| 43 | struct te_service_id { | ||
| 44 | uint32_t time_low; | ||
| 45 | uint16_t time_mid; | ||
| 46 | uint16_t time_hi_and_version; | ||
| 47 | uint8_t clock_seq_and_node[8]; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct te_operation { | ||
| 51 | uint32_t command; | ||
| 52 | uint32_t status; | ||
| 53 | uint64_t list_head; | ||
| 54 | uint64_t list_tail; | ||
| 55 | uint32_t list_count; | ||
| 56 | uint32_t interface_side; | ||
| 57 | }; | ||
| 58 | |||
| 59 | /* | ||
| 60 | * OpenSession | ||
| 61 | */ | ||
| 62 | struct te_opensession { | ||
| 63 | struct te_service_id dest_uuid; | ||
| 64 | struct te_operation operation; | ||
| 65 | uint64_t answer; | ||
| 66 | }; | ||
| 67 | |||
| 68 | /* | ||
| 69 | * CloseSession | ||
| 70 | */ | ||
| 71 | struct te_closesession { | ||
| 72 | uint32_t session_id; | ||
| 73 | uint64_t answer; | ||
| 74 | }; | ||
| 75 | |||
| 76 | /* | ||
| 77 | * LaunchOperation | ||
| 78 | */ | ||
| 79 | struct te_launchop { | ||
| 80 | uint32_t session_id; | ||
| 81 | struct te_operation operation; | ||
| 82 | uint64_t answer; | ||
| 83 | }; | ||
| 84 | |||
| 85 | union te_cmd { | ||
| 86 | struct te_opensession opensession; | ||
| 87 | struct te_closesession closesession; | ||
| 88 | struct te_launchop launchop; | ||
| 89 | }; | ||
| 90 | |||
| 91 | #endif \ No newline at end of file | ||
