Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 1 | Trusted Little Kernel (TLK) Dispatcher |
| 2 | ====================================== |
| 3 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 4 | TLK dispatcher (TLK-D) adds support for NVIDIA's Trusted Little Kernel (TLK) |
| 5 | to work with Trusted Firmware-A (TF-A). TLK-D can be compiled by including it |
| 6 | in the platform's makefile. TLK is primarily meant to work with Tegra SoCs, |
| 7 | so while TF-A only supports TLK on Tegra, the dispatcher code can only be |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 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) |
Paul Beesley | 38b28fc | 2019-03-07 15:53:44 +0000 | [diff] [blame] | 18 | --------------------------- |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 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). |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 23 | You can download the LK modular embedded preemptive kernel for use on Arm, |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 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 |
Paul Beesley | 38b28fc | 2019-03-07 15:53:44 +0000 | [diff] [blame] | 57 | --------- |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 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 |
Paul Beesley | 38b28fc | 2019-03-07 15:53:44 +0000 | [diff] [blame] | 63 | ----------------------- |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 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 | |
Paul Beesley | 38b28fc | 2019-03-07 15:53:44 +0000 | [diff] [blame] | 69 | Example |
| 70 | ~~~~~~~ |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 71 | |
| 72 | :: |
| 73 | |
| 74 | bl32_ep_info->args.arg0 = TZDRAM size available for BL32 |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 75 | bl32_ep_info->args.arg1 = unused (used only on Armv7-A) |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 76 | bl32_ep_info->args.arg2 = pointer to boot args |