Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 1 | Trusted Little Kernel (TLK) Dispatcher |
| 2 | ====================================== |
| 3 | |
| 4 | TLK dispatcher adds support for NVIDIA's Trusted Little Kernel (TLK) to work |
| 5 | with the Trusted Firmware. TLK-D can be compiled by including it in the |
| 6 | platform's makefile. TLK is primarily meant to work with Tegra SoCs, so until |
| 7 | Trusted Firmware starts supporting Tegra, the dispatcher code can only be |
| 8 | compiled for other platforms. |
| 9 | |
| 10 | In order to compile TLK-D, we need a BL32 image to be present. Since, TLKD |
| 11 | just needs to compile, any BL32 image would do. To use TLK as the BL32, please |
| 12 | refer to the "Build TLK" section. |
| 13 | |
| 14 | Once a BL32 is ready, TLKD can be included in the image by adding "SPD=tlkd" |
| 15 | to the build command. |
| 16 | |
| 17 | Trusted Little Kernel (TLK) |
| 18 | =========================== |
| 19 | |
| 20 | TLK is a Trusted OS running as Secure EL1. It is a Free Open Source Software |
| 21 | (FOSS) release of the NVIDIA® Trusted Little Kernel (TLK) technology, which |
| 22 | extends technology made available with the development of the Little Kernel (LK). |
| 23 | You can download the LK modular embedded preemptive kernel for use on ARM, |
| 24 | x86, and AVR32 systems from https://github.com/travisg/lk |
| 25 | |
| 26 | NVIDIA implemented its Trusted Little Kernel (TLK) technology, designed as a |
| 27 | free and open-source trusted execution environment (OTE). |
| 28 | |
| 29 | TLK features include: |
| 30 | |
| 31 | • Small, pre-emptive kernel |
| 32 | • Supports multi-threading, IPCs, and thread scheduling |
| 33 | • Added TrustZone features |
| 34 | • Added Secure Storage |
| 35 | • Under MIT/FreeBSD license |
| 36 | |
| 37 | NVIDIA extensions to Little Kernel (LK) include: |
| 38 | |
| 39 | • User mode |
| 40 | • Address-space separation for TAs |
| 41 | • TLK Client Application (CA) library |
| 42 | • TLK TA library |
| 43 | • Crypto library (encrypt/decrypt, key handling) via OpenSSL |
| 44 | • Linux kernel driver |
| 45 | • Cortex A9/A15 support |
| 46 | • Power Management |
| 47 | • TrustZone memory carve-out (reconfigurable) |
| 48 | • Page table management |
| 49 | • Debugging support over UART (USB planned) |
| 50 | |
| 51 | TLK is hosted by NVIDIA on http://nv-tegra.nvidia.com under the |
| 52 | 3rdparty/ote\_partner/tlk.git repository. Detailed information about |
| 53 | TLK and OTE can be found in the Tegra\_BSP\_for\_Android\_TLK\_FOSS\_Reference.pdf |
| 54 | manual located under the "documentation" directory\_. |
| 55 | |
| 56 | Build TLK |
| 57 | ========= |
| 58 | |
| 59 | To build and execute TLK, follow the instructions from "Building a TLK Device" |
| 60 | section from Tegra\_BSP\_for\_Android\_TLK\_FOSS\_Reference.pdf manual. |
| 61 | |
| 62 | Input parameters to TLK |
| 63 | ======================= |
| 64 | |
| 65 | TLK expects the TZDRAM size and a structure containing the boot arguments. BL2 |
| 66 | passes this information to the EL3 software as members of the bl32\_ep\_info |
| 67 | struct, where bl32\_ep\_info is part of bl31\_params\_t (passed by BL2 in X0) |
| 68 | |
| 69 | Example: |
| 70 | -------- |
| 71 | |
| 72 | :: |
| 73 | |
| 74 | bl32_ep_info->args.arg0 = TZDRAM size available for BL32 |
| 75 | bl32_ep_info->args.arg1 = unused (used only on ARMv7) |
| 76 | bl32_ep_info->args.arg2 = pointer to boot args |