summaryrefslogtreecommitdiff
path: root/security/tlk_driver/ote_types.h
blob: 593400f7a03ab9a95097dbaf9151874a58e8b3d3 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 * Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef __OTE_TYPES_H__
#define __OTE_TYPES_H__

/*
 * Return Codes
 */
enum {
	/* Success */
	OTE_SUCCESS			= 0x00000000,
	OTE_ERROR_NO_ERROR		= OTE_SUCCESS,
	/* Non-specific cause */
	OTE_ERROR_GENERIC		= 0xFFFF0000,
	/* Access priviledge not sufficient */
	OTE_ERROR_ACCESS_DENIED		= 0xFFFF0001,
	/* The operation was cancelled */
	OTE_ERROR_CANCEL		= 0xFFFF0002,
	/* Concurrent accesses conflict */
	OTE_ERROR_ACCESS_CONFLICT	= 0xFFFF0003,
	/* Too much data for req was passed */
	OTE_ERROR_EXCESS_DATA		= 0xFFFF0004,
	/* Input data was of invalid format */
	OTE_ERROR_BAD_FORMAT		= 0xFFFF0005,
	/* Input parameters were invalid */
	OTE_ERROR_BAD_PARAMETERS	= 0xFFFF0006,
	/* Oper invalid in current state */
	OTE_ERROR_BAD_STATE		= 0xFFFF0007,
	/* The req data item not found */
	OTE_ERROR_ITEM_NOT_FOUND	= 0xFFFF0008,
	/* The req oper not implemented */
	OTE_ERROR_NOT_IMPLEMENTED	= 0xFFFF0009,
	/* The req oper not supported */
	OTE_ERROR_NOT_SUPPORTED		= 0xFFFF000A,
	/* Expected data was missing */
	OTE_ERROR_NO_DATA		= 0xFFFF000B,
	/* System ran out of resources */
	OTE_ERROR_OUT_OF_MEMORY		= 0xFFFF000C,
	/* The system is busy */
	OTE_ERROR_BUSY			= 0xFFFF000D,
	/* Communication failed */
	OTE_ERROR_COMMUNICATION		= 0xFFFF000E,
	/* A security fault was detected */
	OTE_ERROR_SECURITY		= 0xFFFF000F,
	/* The supplied buffer is too short */
	OTE_ERROR_SHORT_BUFFER		= 0xFFFF0010,
};

/*
 * Return Code origins
 */
enum {
	/* Originated from OTE Client API */
	OTE_RESULT_ORIGIN_API = 1,
	/* Originated from Underlying Communication Stack */
	OTE_RESULT_ORIGIN_COMMS = 2,
	/* Originated from Common OTE Code */
	OTE_RESULT_ORIGIN_KERNEL = 3,
	/* Originated from Trusted APP Code */
	OTE_RESULT_ORIGIN_TRUSTED_APP = 4,
};

#endif