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