OP-TEE: update optee_linuxdriver to match updated optee_os & optee_client
[firefly-linux-kernel-4.4.55.git] / security / optee_linuxdriver / include / linux / tee_client_api.h
1 /*
2  * Copyright (c) 2014, STMicroelectronics International N.V.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  * POSSIBILITY OF SUCH DAMAGE.
26  */
27 #ifndef TEE_CLIENT_API_H
28 #define TEE_CLIENT_API_H
29
30 #ifndef __KERNEL__
31 #include <stdint.h>
32 #include <stddef.h>
33 #endif /* __KERNEL__ */
34
35 /*
36  * Defines the number of available memory references in an open session or
37  * invoke command operation payload.
38  */
39 #define TEEC_CONFIG_PAYLOAD_REF_COUNT 4
40
41 /**
42  * Defines the maximum size of a single shared memory block, in bytes, of both
43  * API allocated and API registered memory. The size is currently set to
44  * 512 * kB (512 * 1024).
45  */
46 #define TEEC_CONFIG_SHAREDMEM_MAX_SIZE 0x8000
47
48 /**
49  * Flag constants indicating the type of parameters encoded inside the
50  * operation payload (TEEC_Operation), Type is uint32_t.
51  *
52  * TEEC_NONE                   The Parameter is not used
53  *
54  * TEEC_VALUE_INPUT            The Parameter is a TEEC_Value tagged as input.
55  *
56  * TEEC_VALUE_OUTPUT           The Parameter is a TEEC_Value tagged as output.
57  *
58  * TEEC_VALUE_INOUT            The Parameter is a TEEC_Value tagged as both as
59  *                             input and output, i.e., for which both the
60  *                             behaviors of TEEC_VALUE_INPUT and
61  *                             TEEC_VALUE_OUTPUT apply.
62  *
63  * TEEC_MEMREF_TEMP_INPUT      The Parameter is a TEEC_TempMemoryReference
64  *                             describing a region of memory which needs to be
65  *                             temporarily registered for the duration of the
66  *                             Operation and is tagged as input.
67  *
68  * TEEC_MEMREF_TEMP_OUTPUT     Same as TEEC_MEMREF_TEMP_INPUT, but the Memory
69  *                             Reference is tagged as output. The
70  *                             Implementation may update the size field to
71  *                             reflect the required output size in some use
72  *                             cases.
73  *
74  * TEEC_MEMREF_TEMP_INOUT      A Temporary Memory Reference tagged as both
75  *                             input and output, i.e., for which both the
76  *                             behaviors of TEEC_MEMREF_TEMP_INPUT and
77  *                             TEEC_MEMREF_TEMP_OUTPUT apply.
78  *
79  * TEEC_MEMREF_WHOLE           The Parameter is a Registered Memory Reference
80  *                             that refers to the entirety of its parent Shared
81  *                             Memory block. The parameter structure is a
82  *                             TEEC_MemoryReference. In this structure, the
83  *                             Implementation MUST read only the parent field
84  *                             and MAY update the size field when the operation
85  *                             completes.
86  *
87  * TEEC_MEMREF_PARTIAL_INPUT   A Registered Memory Reference structure that
88  *                             refers to a partial region of its parent Shared
89  *                             Memory block and is tagged as input.
90  *
91  * TEEC_MEMREF_PARTIAL_OUTPUT  Registered Memory Reference structure that
92  *                             refers to a partial region of its parent Shared
93  *                             Memory block and is tagged as output.
94  *
95  * TEEC_MEMREF_PARTIAL_INOUT   The Registered Memory Reference structure that
96  *                             refers to a partial region of its parent Shared
97  *                             Memory block and is tagged as both input and
98  *                             output, i.e., for which both the behaviors of
99  *                             TEEC_MEMREF_PARTIAL_INPUT and
100  *                             TEEC_MEMREF_PARTIAL_OUTPUT apply.
101  */
102 #define TEEC_NONE                   0x00000000
103 #define TEEC_VALUE_INPUT            0x00000001
104 #define TEEC_VALUE_OUTPUT           0x00000002
105 #define TEEC_VALUE_INOUT            0x00000003
106 #define TEEC_MEMREF_TEMP_INPUT      0x00000005
107 #define TEEC_MEMREF_TEMP_OUTPUT     0x00000006
108 #define TEEC_MEMREF_TEMP_INOUT      0x00000007
109 #define TEEC_MEMREF_WHOLE           0x0000000C
110 #define TEEC_MEMREF_PARTIAL_INPUT   0x0000000D
111 #define TEEC_MEMREF_PARTIAL_OUTPUT  0x0000000E
112 #define TEEC_MEMREF_PARTIAL_INOUT   0x0000000F
113
114 /**
115  * Flag constants indicating the data transfer direction of memory in
116  * TEEC_Parameter. TEEC_MEM_INPUT signifies data transfer direction from the
117  * client application to the TEE. TEEC_MEM_OUTPUT signifies data transfer
118  * direction from the TEE to the client application. Type is uint32_t.
119  *
120  * TEEC_MEM_INPUT   The Shared Memory can carry data from the client
121  *                  application to the Trusted Application.
122  * TEEC_MEM_OUTPUT  The Shared Memory can carry data from the Trusted
123  *                  Application to the client application.
124  * TEEC_MEM_DMABUF  The Shared Memory is allocated with the dma buf api and
125  *                  not necessarly user mapped.
126  *                  Handle of the memory pass to drivers is the implementation
127  *                  fd field instead of the buffer field.
128  * TEEC_MEM_KAPI    Shared memory is required from another linux module.
129  *                  Dma buf file descriptor is not created.
130  */
131 #define TEEC_MEM_INPUT   0x00000001
132 #define TEEC_MEM_OUTPUT  0x00000002
133 #define TEEC_MEM_DMABUF  0x00010000
134 #define TEEC_MEM_KAPI    0x00020000
135
136 /**
137  * Return values. Type is TEEC_Result
138  *
139  * TEEC_SUCCESS                 The operation was successful.
140  * TEEC_ERROR_GENERIC           Non-specific cause.
141  * TEEC_ERROR_ACCESS_DENIED     Access privileges are not sufficient.
142  * TEEC_ERROR_CANCEL            The operation was canceled.
143  * TEEC_ERROR_ACCESS_CONFLICT   Concurrent accesses caused conflict.
144  * TEEC_ERROR_EXCESS_DATA       Too much data for the requested operation was
145  *                              passed.
146  * TEEC_ERROR_BAD_FORMAT        Input data was of invalid format.
147  * TEEC_ERROR_BAD_PARAMETERS    Input parameters were invalid.
148  * TEEC_ERROR_BAD_STATE         Operation is not valid in the current state.
149  * TEEC_ERROR_ITEM_NOT_FOUND    The requested data item is not found.
150  * TEEC_ERROR_NOT_IMPLEMENTED   The requested operation should exist but is not
151  *                              yet implemented.
152  * TEEC_ERROR_NOT_SUPPORTED     The requested operation is valid but is not
153  *                              supported in this implementation.
154  * TEEC_ERROR_NO_DATA           Expected data was missing.
155  * TEEC_ERROR_OUT_OF_MEMORY     System ran out of resources.
156  * TEEC_ERROR_BUSY              The system is busy working on something else.
157  * TEEC_ERROR_COMMUNICATION     Communication with a remote party failed.
158  * TEEC_ERROR_SECURITY          A security fault was detected.
159  * TEEC_ERROR_SHORT_BUFFER      The supplied buffer is too short for the
160  *                              generated output.
161  * TEEC_ERROR_TARGET_DEAD       Trusted Application has panicked
162  *                              during the operation.
163  */
164
165 /**
166  *  Standard defined error codes.
167  */
168 #define TEEC_SUCCESS                0x00000000
169 #define TEEC_ERROR_GENERIC          0xFFFF0000
170 #define TEEC_ERROR_ACCESS_DENIED    0xFFFF0001
171 #define TEEC_ERROR_CANCEL           0xFFFF0002
172 #define TEEC_ERROR_ACCESS_CONFLICT  0xFFFF0003
173 #define TEEC_ERROR_EXCESS_DATA      0xFFFF0004
174 #define TEEC_ERROR_BAD_FORMAT       0xFFFF0005
175 #define TEEC_ERROR_BAD_PARAMETERS   0xFFFF0006
176 #define TEEC_ERROR_BAD_STATE        0xFFFF0007
177 #define TEEC_ERROR_ITEM_NOT_FOUND   0xFFFF0008
178 #define TEEC_ERROR_NOT_IMPLEMENTED  0xFFFF0009
179 #define TEEC_ERROR_NOT_SUPPORTED    0xFFFF000A
180 #define TEEC_ERROR_NO_DATA          0xFFFF000B
181 #define TEEC_ERROR_OUT_OF_MEMORY    0xFFFF000C
182 #define TEEC_ERROR_BUSY             0xFFFF000D
183 #define TEEC_ERROR_COMMUNICATION    0xFFFF000E
184 #define TEEC_ERROR_SECURITY         0xFFFF000F
185 #define TEEC_ERROR_SHORT_BUFFER     0xFFFF0010
186 #define TEEC_ERROR_TARGET_DEAD      0xFFFF3024
187
188 /**
189  * Function error origins, of type TEEC_ErrorOrigin. These indicate where in
190  * the software stack a particular return value originates from.
191  *
192  * TEEC_ORIGIN_API          The error originated within the TEE Client API
193  *                          implementation.
194  * TEEC_ORIGIN_COMMS        The error originated within the underlying
195  *                          communications stack linking the rich OS with
196  *                          the TEE.
197  * TEEC_ORIGIN_TEE          The error originated within the common TEE code.
198  * TEEC_ORIGIN_TRUSTED_APP  The error originated within the Trusted Application
199  *                          code.
200  */
201 #define TEEC_ORIGIN_API          0x00000001
202 #define TEEC_ORIGIN_COMMS        0x00000002
203 #define TEEC_ORIGIN_TEE          0x00000003
204 #define TEEC_ORIGIN_TRUSTED_APP  0x00000004
205
206 /**
207  * Session login methods, for use in TEEC_OpenSession() as parameter
208  * connectionMethod. Type is uint32_t.
209  *
210  * TEEC_LOGIN_PUBLIC       No login data is provided.
211  * TEEC_LOGIN_USER         Login data about the user running the Client
212  *                         Application process is provided.
213  * TEEC_LOGIN_GROUP        Login data about the group running the Client
214  *                         Application process is provided.
215  * TEEC_LOGIN_APPLICATION  Login data about the running Client Application
216  *                         itself is provided.
217  */
218 #define TEEC_LOGIN_PUBLIC       0x00000000
219 #define TEEC_LOGIN_USER         0x00000001
220 #define TEEC_LOGIN_GROUP        0x00000002
221 #define TEEC_LOGIN_APPLICATION  0x00000004
222
223 /**
224  * Encode the paramTypes according to the supplied types.
225  *
226  * @param p0 The first param type.
227  * @param p1 The second param type.
228  * @param p2 The third param type.
229  * @param p3 The fourth param type.
230  */
231 #define TEEC_PARAM_TYPES(p0, p1, p2, p3) \
232         ((p0) | ((p1) << 4) | ((p2) << 8) | ((p3) << 12))
233
234 /**
235  * Get the i_th param type from the paramType.
236  *
237  * @param p The paramType.
238  * @param i The i-th parameter to get the type for.
239  */
240 #define TEEC_PARAM_TYPE_GET(p, i) (((p) >> (i * 4)) & 0xF)
241
242 typedef uint32_t TEEC_Result;
243
244 /**
245  * struct TEEC_Context - Represents a connection between a client application
246  * and a TEE.
247  *
248  * Context identifier can be a handle (when opened from user land)
249  * or a structure pointer (when opened from kernel land).
250  * Identifier is defined as an union to match type sizes on all architectures.
251  */
252 typedef struct {
253         char devname[256];
254         union {
255                 struct tee_context *ctx;
256                 int fd;
257         };
258 } TEEC_Context;
259
260 /**
261  * This type contains a Universally Unique Resource Identifier (UUID) type as
262  * defined in RFC4122. These UUID values are used to identify Trusted
263  * Applications.
264  */
265 typedef struct {
266         uint32_t timeLow;
267         uint16_t timeMid;
268         uint16_t timeHiAndVersion;
269         uint8_t clockSeqAndNode[8];
270 } TEEC_UUID;
271
272 /**
273  * In terms of compatible kernel, the data struct shared by client application
274  * and TEE driver should be restructrued in "compatible" rules. To keep GP's
275  * standard in compatibility mode, the anonymous padding members are filled
276  * in the struct definition below.
277  */
278
279
280 /**
281  * struct TEEC_SharedMemory - Memory to transfer data between a client
282  * application and trusted code.
283  *
284  * @param buffer      The memory buffer which is to be, or has been, shared
285  *                    with the TEE.
286  * @param size        The size, in bytes, of the memory buffer.
287  * @param flags       Bit-vector which holds properties of buffer.
288  *                    The bit-vector can contain either or both of the
289  *                    TEEC_MEM_INPUT and TEEC_MEM_OUTPUT flags.
290  *
291  * A shared memory block is a region of memory allocated in the context of the
292  * client application memory space that can be used to transfer data between
293  * that client application and a trusted application. The user of this struct
294  * is responsible to populate the buffer pointer.
295  */
296 typedef struct {
297         union {
298                 void *buffer;
299                 uint64_t padding_ptr;
300         };
301         union {
302                 size_t size;
303                 uint64_t padding_sz;
304         };
305         uint32_t flags;
306         /*
307          * identifier can store a handle (int) or a structure pointer (void *).
308          * define this union to match case where sizeof(int)!=sizeof(void *).
309          */
310         uint32_t reserved;
311         union {
312                 int fd;
313                 void *ptr;
314                 uint64_t padding_d;
315         } d;
316         uint64_t registered;
317 } TEEC_SharedMemory;
318
319 /**
320  * struct TEEC_TempMemoryReference - Temporary memory to transfer data between
321  * a client application and trusted code, only used for the duration of the
322  * operation.
323  *
324  * @param buffer  The memory buffer which is to be, or has been shared with
325  *                the TEE.
326  * @param size    The size, in bytes, of the memory buffer.
327  *
328  * A memory buffer that is registered temporarily for the duration of the
329  * operation to be called.
330  */
331 typedef struct {
332         union {
333                 void *buffer;
334                 uint64_t padding_ptr;
335         };
336         union {
337                 size_t size;
338                 uint64_t padding_sz;
339         };
340 } TEEC_TempMemoryReference;
341
342 /**
343  * struct TEEC_RegisteredMemoryReference - use a pre-registered or
344  * pre-allocated shared memory block of memory to transfer data between
345  * a client application and trusted code.
346  *
347  * @param parent  Points to a shared memory structure. The memory reference
348  *                may utilize the whole shared memory or only a part of it.
349  *                Must not be NULL
350  *
351  * @param size    The size, in bytes, of the memory buffer.
352  *
353  * @param offset  The offset, in bytes, of the referenced memory region from
354  *                the start of the shared memory block.
355  *
356  */
357 typedef struct {
358         union {
359                 TEEC_SharedMemory *parent;
360                 uint64_t padding_ptr;
361         };
362         union {
363                 size_t size;
364                 uint64_t padding_sz;
365         };
366         union {
367                 size_t offset;
368                 uint64_t padding_off;
369         };
370 } TEEC_RegisteredMemoryReference;
371
372 /**
373  * struct TEEC_Value - Small raw data container
374  *
375  * Instead of allocating a shared memory buffer this structure can be used
376  * to pass small raw data between a client application and trusted code.
377  *
378  * @param a  The first integer value.
379  *
380  * @param b  The second second value.
381  */
382 typedef struct {
383         uint32_t a;
384         uint32_t b;
385 } TEEC_Value;
386
387 /**
388  * union TEEC_Parameter - Memory container to be used when passing data between
389  *                        client application and trusted code.
390  *
391  * Either the client uses a shared memory reference, parts of it or a small raw
392  * data container.
393  *
394  * @param tmpref  A temporary memory reference only valid for the duration
395  *                of the operation.
396  *
397  * @param memref  The entire shared memory or parts of it.
398  *
399  * @param value   The small raw data container to use
400  */
401 typedef union {
402         TEEC_TempMemoryReference tmpref;
403         TEEC_RegisteredMemoryReference memref;
404         TEEC_Value value;
405 } TEEC_Parameter;
406
407 /**
408  * struct TEEC_Session - Represents a connection between a client application
409  * and a trusted application.
410  */
411 typedef struct {
412         int fd;
413 } TEEC_Session;
414
415 /**
416  * struct TEEC_Operation - Holds information and memory references used in
417  * TEEC_InvokeCommand().
418  *
419  * @param   started     Client must initialize to zero if it needs to cancel
420  *                      an operation about to be performed.
421  * @param   paramTypes  Type of data passed. Use TEEC_PARAMS_TYPE macro to
422  *                      create the correct flags.
423  *                      0 means TEEC_NONE is passed for all params.
424  * @param   params      Array of parameters of type TEEC_Parameter.
425  * @param   session     Internal pointer to the last session used by
426  *                      TEEC_InvokeCommand with this operation.
427  *
428  */
429 typedef struct {
430         uint32_t started;
431         uint32_t paramTypes;
432         TEEC_Parameter params[TEEC_CONFIG_PAYLOAD_REF_COUNT];
433         /* Implementation-Defined */
434         union {
435                 TEEC_Session *session;
436                 uint64_t padding_ptr;
437         };
438         TEEC_SharedMemory memRefs[TEEC_CONFIG_PAYLOAD_REF_COUNT];
439         uint64_t flags;
440 } TEEC_Operation;
441
442 /**
443  * TEEC_InitializeContext() - Initializes a context holding connection
444  * information on the specific TEE, designated by the name string.
445
446  * @param name    A zero-terminated string identifying the TEE to connect to.
447  *                If name is set to NULL, the default TEE is connected to. NULL
448  *                is the only supported value in this version of the API
449  *                implementation.
450  *
451  * @param context The context structure which is to be initialized.
452  *
453  * @return TEEC_SUCCESS  The initialization was successful.
454  * @return TEEC_Result   Something failed.
455  */
456 TEEC_Result TEEC_InitializeContext(const char *name, TEEC_Context *context);
457
458 /**
459  * TEEC_FinalizeContext() - Destroys a context holding connection information
460  * on the specific TEE.
461  *
462  * This function destroys an initialized TEE context, closing the connection
463  * between the client application and the TEE. This function must only be
464  * called when all sessions related to this TEE context have been closed and
465  * all shared memory blocks have been released.
466  *
467  * @param context       The context to be destroyed.
468  */
469 void TEEC_FinalizeContext(TEEC_Context *context);
470
471 /**
472  * TEEC_OpenSession() - Opens a new session with the specified trusted
473  *                      application.
474  *
475  * @param context            The initialized TEE context structure in which
476  *                           scope to open the session.
477  * @param session            The session to initialize.
478  * @param destination        A structure identifying the trusted application
479  *                           with which to open a session.
480  *
481  * @param connectionMethod   The connection method to use.
482  * @param connectionData     Any data necessary to connect with the chosen
483  *                           connection method. Not supported, should be set to
484  *                           NULL.
485  * @param operation          An operation structure to use in the session. May
486  *                           be set to NULL to signify no operation structure
487  *                           needed.
488  *
489  * @param returnOrigin       A parameter which will hold the error origin if
490  *                           this function returns any value other than
491  *                           TEEC_SUCCESS.
492  *
493  * @return TEEC_SUCCESS      OpenSession successfully opened a new session.
494  * @return TEEC_Result       Something failed.
495  *
496  */
497 TEEC_Result TEEC_OpenSession(TEEC_Context *context,
498                              TEEC_Session *session,
499                              const TEEC_UUID *destination,
500                              uint32_t connectionMethod,
501                              const void *connectionData,
502                              TEEC_Operation *operation,
503                              uint32_t *returnOrigin);
504
505 /**
506  * TEEC_CloseSession() - Closes the session which has been opened with the
507  * specific trusted application.
508  *
509  * @param session The opened session to close.
510  */
511 void TEEC_CloseSession(TEEC_Session *session);
512
513 /**
514  * TEEC_InvokeCommand() - Executes a command in the specified trusted
515  * application.
516  *
517  * @param session        A handle to an open connection to the trusted
518  *                       application.
519  * @param commandID      Identifier of the command in the trusted application
520  *                       to invoke.
521  * @param operation      An operation structure to use in the invoke command.
522  *                       May be set to NULL to signify no operation structure
523  *                       needed.
524  * @param returnOrigin   A parameter which will hold the error origin if this
525  *                       function returns any value other than TEEC_SUCCESS.
526  *
527  * @return TEEC_SUCCESS  OpenSession successfully opened a new session.
528  * @return TEEC_Result   Something failed.
529  */
530 TEEC_Result TEEC_InvokeCommand(TEEC_Session *session,
531                                uint32_t commandID,
532                                TEEC_Operation *operation,
533                                uint32_t *returnOrigin);
534
535 /**
536  * TEEC_RegisterSharedMemory() - Register a block of existing memory as a
537  * shared block within the scope of the specified context.
538  *
539  * @param context    The initialized TEE context structure in which scope to
540  *                   open the session.
541  * @param sharedMem  pointer to the shared memory structure to register.
542  *
543  * @return TEEC_SUCCESS              The registration was successful.
544  * @return TEEC_ERROR_OUT_OF_MEMORY  Memory exhaustion.
545  * @return TEEC_Result               Something failed.
546  */
547 TEEC_Result TEEC_RegisterSharedMemory(TEEC_Context *context,
548                                       TEEC_SharedMemory *sharedMem);
549
550 /**
551  * TEEC_AllocateSharedMemory() - Allocate shared memory for TEE.
552  *
553  * @param context     The initialized TEE context structure in which scope to
554  *                    open the session.
555  * @param sharedMem   Pointer to the allocated shared memory.
556  *
557  * @return TEEC_SUCCESS              The registration was successful.
558  * @return TEEC_ERROR_OUT_OF_MEMORY  Memory exhaustion.
559  * @return TEEC_Result               Something failed.
560  */
561 TEEC_Result TEEC_AllocateSharedMemory(TEEC_Context *context,
562                                       TEEC_SharedMemory *sharedMem);
563
564 /**
565  * TEEC_ReleaseSharedMemory() - Free or deregister the shared memory.
566  *
567  * @param sharedMem  Pointer to the shared memory to be freed.
568  */
569 void TEEC_ReleaseSharedMemory(TEEC_SharedMemory *sharedMemory);
570
571 /**
572  * TEEC_RequestCancellation() - Request the cancellation of a pending open
573  *                              session or command invocation.
574  *
575  * @param operation Pointer to an operation previously passed to open session
576  *                  or invoke.
577  */
578 void TEEC_RequestCancellation(TEEC_Operation *operation);
579
580 /**
581  * Register a pre-allocated Trusted Application This is mainly intended for
582  * OS-FREE contexts or when a filesystem is not available.
583  *
584  * @param ta   Pointer to the trusted application binary
585  * @param size The size of the TA binary
586  *
587  * @return TEEC_SUCCESS if successful.
588  * @return TEEC_Result something failed.
589  */
590 TEEC_Result TEEC_RegisterTA(const void *ta, const size_t size);
591
592 /**
593  * Unregister a pre-allocated Trusted Application This is mainly intended for
594  * OS-FREE contexts or when a filesystem is not available.
595  *
596  * @param ta Pointer to the trusted application binary
597  */
598 void TEEC_UnregisterTA(const void *ta);
599
600 #endif