.. | .. |
---|
51 | 51 | #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ |
---|
52 | 52 | #define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */ |
---|
53 | 53 | #define TEE_GEN_CAP_REG_MEM (1 << 2)/* Supports registering shared memory */ |
---|
| 54 | +#define TEE_GEN_CAP_MEMREF_NULL (1 << 3)/* NULL MemRef support */ |
---|
| 55 | + |
---|
| 56 | +#define TEE_MEMREF_NULL (__u64)(-1) /* NULL MemRef Buffer */ |
---|
54 | 57 | |
---|
55 | 58 | /* |
---|
56 | 59 | * TEE Implementation ID |
---|
57 | 60 | */ |
---|
58 | 61 | #define TEE_IMPL_ID_OPTEE 1 |
---|
| 62 | +#define TEE_IMPL_ID_AMDTEE 2 |
---|
59 | 63 | |
---|
60 | 64 | /* |
---|
61 | 65 | * OP-TEE specific capabilities |
---|
.. | .. |
---|
172 | 176 | #define TEE_IOCTL_LOGIN_APPLICATION 4 |
---|
173 | 177 | #define TEE_IOCTL_LOGIN_USER_APPLICATION 5 |
---|
174 | 178 | #define TEE_IOCTL_LOGIN_GROUP_APPLICATION 6 |
---|
| 179 | +/* |
---|
| 180 | + * Disallow user-space to use GP implementation specific login |
---|
| 181 | + * method range (0x80000000 - 0xBFFFFFFF). This range is rather |
---|
| 182 | + * being reserved for REE kernel clients or TEE implementation. |
---|
| 183 | + */ |
---|
| 184 | +#define TEE_IOCTL_LOGIN_REE_KERNEL_MIN 0x80000000 |
---|
| 185 | +#define TEE_IOCTL_LOGIN_REE_KERNEL_MAX 0xBFFFFFFF |
---|
| 186 | +/* Private login method for REE kernel clients */ |
---|
| 187 | +#define TEE_IOCTL_LOGIN_REE_KERNEL 0x80000000 |
---|
175 | 188 | |
---|
176 | 189 | /** |
---|
177 | 190 | * struct tee_ioctl_param - parameter |
---|
.. | .. |
---|
190 | 203 | * a part of a shared memory by specifying an offset (@a) and size (@b) of |
---|
191 | 204 | * the object. To supply the entire shared memory object set the offset |
---|
192 | 205 | * (@a) to 0 and size (@b) to the previously returned size of the object. |
---|
| 206 | + * |
---|
| 207 | + * A client may need to present a NULL pointer in the argument |
---|
| 208 | + * passed to a trusted application in the TEE. |
---|
| 209 | + * This is also a requirement in GlobalPlatform Client API v1.0c |
---|
| 210 | + * (section 3.2.5 memory references), which can be found at |
---|
| 211 | + * http://www.globalplatform.org/specificationsdevice.asp |
---|
| 212 | + * |
---|
| 213 | + * If a NULL pointer is passed to a TA in the TEE, the (@c) |
---|
| 214 | + * IOCTL parameters value must be set to TEE_MEMREF_NULL indicating a NULL |
---|
| 215 | + * memory reference. |
---|
193 | 216 | */ |
---|
194 | 217 | struct tee_ioctl_param { |
---|
195 | 218 | __u64 attr; |
---|