blob: 2c66120b56c6693df01c0603b296322e7e1667ba [file] [log] [blame]
Joakim Bech8e5c5b32018-10-25 08:18:32 +02001.. _libraries:
2
3#########
4Libraries
5#########
6
Etienne Carriere7b780182023-11-10 10:25:02 +01007.. _libutils:
8
9libutils
10********
11
12OP-TEE core and OP-TEE development kit for Trusted Application provide a
13standard C library that is named **libutils**. It implements many
14standard functions like ``snprintf()``, ``strncmp()``, ``memcpy()``,
15``malloc()``. ``qsort()``, and many more but not all standard C library
16functions.
17
18Note however that Trusted Applications implemented in C should use GP TEE
19Internal Core API functions rather than their standard C library function
20equivalent (e.g. ``TEE_MemMove()`` instead of ``memcpy()`` and
21``memmove()``, or ``TEE_Malloc()`` instead of ``malloc()`` and friends).
22This makes those TAs implementation more portable to other GP
23TEE compliant environments.
24
Joakim Bech8e5c5b32018-10-25 08:18:32 +020025.. _libutee:
26
27libutee
28*******
29The :ref:`tee_internal_core_api` describes services that are provided to Trusted
30Applications. **libutee** is a library that implements this API.
31
32libutee is a static library the Trusted Applications shall statically link
33against. Trusted Applications do execute in non-privileged secure userspace and
34libutee also aims at being executed in the non-privileged secure userspace.
35
36Some services for this API are fully statically implemented inside the libutee
37library while some services for the API are implemented inside the OP-TEE core
38(privileged level) and libutee calls such services through system calls.
39