xref: /rk3399_ARM-atf/docs/components/spd/tlk-dispatcher.rst (revision ced1711297347f24fee45e75e73c7767507a0982)
140d553cfSPaul BeesleyTrusted Little Kernel (TLK) Dispatcher
240d553cfSPaul Beesley======================================
340d553cfSPaul Beesley
440d553cfSPaul BeesleyTLK dispatcher (TLK-D) adds support for NVIDIA's Trusted Little Kernel (TLK)
540d553cfSPaul Beesleyto work with Trusted Firmware-A (TF-A). TLK-D can be compiled by including it
640d553cfSPaul Beesleyin the platform's makefile. TLK is primarily meant to work with Tegra SoCs,
740d553cfSPaul Beesleyso while TF-A only supports TLK on Tegra, the dispatcher code can only be
840d553cfSPaul Beesleycompiled for other platforms.
940d553cfSPaul Beesley
1040d553cfSPaul BeesleyIn order to compile TLK-D, we need a BL32 image to be present. Since, TLKD
1140d553cfSPaul Beesleyjust needs to compile, any BL32 image would do. To use TLK as the BL32, please
1240d553cfSPaul Beesleyrefer to the "Build TLK" section.
1340d553cfSPaul Beesley
1440d553cfSPaul BeesleyOnce a BL32 is ready, TLKD can be included in the image by adding "SPD=tlkd"
1540d553cfSPaul Beesleyto the build command.
1640d553cfSPaul Beesley
1740d553cfSPaul BeesleyTrusted Little Kernel (TLK)
18*83993177SPaul Beesley---------------------------
1940d553cfSPaul Beesley
2040d553cfSPaul BeesleyTLK is a Trusted OS running as Secure EL1. It is a Free Open Source Software
2140d553cfSPaul Beesley(FOSS) release of the NVIDIA® Trusted Little Kernel (TLK) technology, which
2240d553cfSPaul Beesleyextends technology made available with the development of the Little Kernel (LK).
2340d553cfSPaul BeesleyYou can download the LK modular embedded preemptive kernel for use on Arm,
2440d553cfSPaul Beesleyx86, and AVR32 systems from https://github.com/travisg/lk
2540d553cfSPaul Beesley
2640d553cfSPaul BeesleyNVIDIA implemented its Trusted Little Kernel (TLK) technology, designed as a
2740d553cfSPaul Beesleyfree and open-source trusted execution environment (OTE).
2840d553cfSPaul Beesley
2940d553cfSPaul BeesleyTLK features include:
3040d553cfSPaul Beesley
3140d553cfSPaul Beesley• Small, pre-emptive kernel
3240d553cfSPaul Beesley• Supports multi-threading, IPCs, and thread scheduling
3340d553cfSPaul Beesley• Added TrustZone features
3440d553cfSPaul Beesley• Added Secure Storage
3540d553cfSPaul Beesley• Under MIT/FreeBSD license
3640d553cfSPaul Beesley
3740d553cfSPaul BeesleyNVIDIA extensions to Little Kernel (LK) include:
3840d553cfSPaul Beesley
3940d553cfSPaul Beesley• User mode
4040d553cfSPaul Beesley• Address-space separation for TAs
4140d553cfSPaul Beesley• TLK Client Application (CA) library
4240d553cfSPaul Beesley• TLK TA library
4340d553cfSPaul Beesley• Crypto library (encrypt/decrypt, key handling) via OpenSSL
4440d553cfSPaul Beesley• Linux kernel driver
4540d553cfSPaul Beesley• Cortex A9/A15 support
4640d553cfSPaul Beesley• Power Management
4740d553cfSPaul Beesley• TrustZone memory carve-out (reconfigurable)
4840d553cfSPaul Beesley• Page table management
4940d553cfSPaul Beesley• Debugging support over UART (USB planned)
5040d553cfSPaul Beesley
5140d553cfSPaul BeesleyTLK is hosted by NVIDIA on http://nv-tegra.nvidia.com under the
5240d553cfSPaul Beesley3rdparty/ote\_partner/tlk.git repository. Detailed information about
5340d553cfSPaul BeesleyTLK and OTE can be found in the Tegra\_BSP\_for\_Android\_TLK\_FOSS\_Reference.pdf
5440d553cfSPaul Beesleymanual located under the "documentation" directory\_.
5540d553cfSPaul Beesley
5640d553cfSPaul BeesleyBuild TLK
57*83993177SPaul Beesley---------
5840d553cfSPaul Beesley
5940d553cfSPaul BeesleyTo build and execute TLK, follow the instructions from "Building a TLK Device"
6040d553cfSPaul Beesleysection from Tegra\_BSP\_for\_Android\_TLK\_FOSS\_Reference.pdf manual.
6140d553cfSPaul Beesley
6240d553cfSPaul BeesleyInput parameters to TLK
63*83993177SPaul Beesley-----------------------
6440d553cfSPaul Beesley
6540d553cfSPaul BeesleyTLK expects the TZDRAM size and a structure containing the boot arguments. BL2
6640d553cfSPaul Beesleypasses this information to the EL3 software as members of the bl32\_ep\_info
6740d553cfSPaul Beesleystruct, where bl32\_ep\_info is part of bl31\_params\_t (passed by BL2 in X0)
6840d553cfSPaul Beesley
69*83993177SPaul BeesleyExample
70*83993177SPaul Beesley~~~~~~~
7140d553cfSPaul Beesley
7240d553cfSPaul Beesley::
7340d553cfSPaul Beesley
7440d553cfSPaul Beesley    bl32_ep_info->args.arg0 = TZDRAM size available for BL32
7540d553cfSPaul Beesley    bl32_ep_info->args.arg1 = unused (used only on Armv7-A)
7640d553cfSPaul Beesley    bl32_ep_info->args.arg2 = pointer to boot args
77