124dba2b3SPaul BeesleyNVIDIA Tegra 224dba2b3SPaul Beesley============ 36f625747SDouglas Raillard 4*fbd9eb58SVarun Wadekar- .. rubric:: T194 5*fbd9eb58SVarun Wadekar :name: t194 6*fbd9eb58SVarun Wadekar 7*fbd9eb58SVarun WadekarT194 has eight NVIDIA Carmel CPU cores in a coherent multi-processor 8*fbd9eb58SVarun Wadekarconfiguration. The Carmel cores support the ARM Architecture version 8.2, 9*fbd9eb58SVarun Wadekarexecuting both 64-bit AArch64 code, and 32-bit AArch32 code. The Carmel 10*fbd9eb58SVarun Wadekarprocessors are organized as four dual-core clusters, where each cluster has 11*fbd9eb58SVarun Wadekara dedicated 2 MiB Level-2 unified cache. A high speed coherency fabric connects 12*fbd9eb58SVarun Wadekarthese processor complexes and allows heterogeneous multi-processing with all 13*fbd9eb58SVarun Wadekareight cores if required. 14*fbd9eb58SVarun Wadekar 15a474d3d7SVarun Wadekar- .. rubric:: T186 16a474d3d7SVarun Wadekar :name: t186 17a474d3d7SVarun Wadekar 18a474d3d7SVarun WadekarThe NVIDIA® Parker (T186) series system-on-chip (SoC) delivers a heterogeneous 19a474d3d7SVarun Wadekarmulti-processing (HMP) solution designed to optimize performance and 20a474d3d7SVarun Wadekarefficiency. 21a474d3d7SVarun Wadekar 22a474d3d7SVarun WadekarT186 has Dual NVIDIA Denver 2 ARM® CPU cores, plus Quad ARM Cortex®-A57 cores, 23a474d3d7SVarun Wadekarin a coherent multiprocessor configuration. The Denver 2 and Cortex-A57 cores 24a474d3d7SVarun Wadekarsupport ARMv8, executing both 64-bit Aarch64 code, and 32-bit Aarch32 code 25a474d3d7SVarun Wadekarincluding legacy ARMv7 applications. The Denver 2 processors each have 128 KB 26a474d3d7SVarun WadekarInstruction and 64 KB Data Level 1 caches; and have a 2MB shared Level 2 27a474d3d7SVarun Wadekarunified cache. The Cortex-A57 processors each have 48 KB Instruction and 32 KB 28a474d3d7SVarun WadekarData Level 1 caches; and also have a 2 MB shared Level 2 unified cache. A 29a474d3d7SVarun Wadekarhigh speed coherency fabric connects these two processor complexes and allows 30a474d3d7SVarun Wadekarheterogeneous multi-processing with all six cores if required. 31a474d3d7SVarun Wadekar 326f625747SDouglas Raillard- .. rubric:: T210 336f625747SDouglas Raillard :name: t210 346f625747SDouglas Raillard 354def07d5SDan HandleyT210 has Quad Arm® Cortex®-A57 cores in a switched configuration with a 364def07d5SDan Handleycompanion set of quad Arm Cortex-A53 cores. The Cortex-A57 and A53 cores 374def07d5SDan Handleysupport Armv8-A, executing both 64-bit Aarch64 code, and 32-bit Aarch32 code 384def07d5SDan Handleyincluding legacy Armv7-A applications. The Cortex-A57 processors each have 396f625747SDouglas Raillard48 KB Instruction and 32 KB Data Level 1 caches; and have a 2 MB shared 406f625747SDouglas RaillardLevel 2 unified cache. The Cortex-A53 processors each have 32 KB Instruction 416f625747SDouglas Raillardand 32 KB Data Level 1 caches; and have a 512 KB shared Level 2 unified cache. 426f625747SDouglas Raillard 436f625747SDouglas Raillard- .. rubric:: T132 446f625747SDouglas Raillard :name: t132 456f625747SDouglas Raillard 466f625747SDouglas RaillardDenver is NVIDIA's own custom-designed, 64-bit, dual-core CPU which is 474def07d5SDan Handleyfully Armv8-A architecture compatible. Each of the two Denver cores 486f625747SDouglas Raillardimplements a 7-way superscalar microarchitecture (up to 7 concurrent 496f625747SDouglas Raillardmicro-ops can be executed per clock), and includes a 128KB 4-way L1 506f625747SDouglas Raillardinstruction cache, a 64KB 4-way L1 data cache, and a 2MB 16-way L2 516f625747SDouglas Raillardcache, which services both cores. 526f625747SDouglas Raillard 536f625747SDouglas RaillardDenver implements an innovative process called Dynamic Code Optimization, 546f625747SDouglas Raillardwhich optimizes frequently used software routines at runtime into dense, 556f625747SDouglas Raillardhighly tuned microcode-equivalent routines. These are stored in a 566f625747SDouglas Raillarddedicated, 128MB main-memory-based optimization cache. After being read 576f625747SDouglas Raillardinto the instruction cache, the optimized micro-ops are executed, 586f625747SDouglas Raillardre-fetched and executed from the instruction cache as long as needed and 596f625747SDouglas Raillardcapacity allows. 606f625747SDouglas Raillard 616f625747SDouglas RaillardEffectively, this reduces the need to re-optimize the software routines. 626f625747SDouglas RaillardInstead of using hardware to extract the instruction-level parallelism 636f625747SDouglas Raillard(ILP) inherent in the code, Denver extracts the ILP once via software 646f625747SDouglas Raillardtechniques, and then executes those routines repeatedly, thus amortizing 656f625747SDouglas Raillardthe cost of ILP extraction over the many execution instances. 666f625747SDouglas Raillard 676f625747SDouglas RaillardDenver also features new low latency power-state transitions, in addition 686f625747SDouglas Raillardto extensive power-gating and dynamic voltage and clock scaling based on 696f625747SDouglas Raillardworkloads. 706f625747SDouglas Raillard 716f625747SDouglas RaillardDirectory structure 7224dba2b3SPaul Beesley------------------- 736f625747SDouglas Raillard 746f625747SDouglas Raillard- plat/nvidia/tegra/common - Common code for all Tegra SoCs 756f625747SDouglas Raillard- plat/nvidia/tegra/soc/txxx - Chip specific code 766f625747SDouglas Raillard 776f625747SDouglas RaillardTrusted OS dispatcher 7824dba2b3SPaul Beesley--------------------- 796f625747SDouglas Raillard 80a474d3d7SVarun WadekarTegra supports multiple Trusted OS'. 81a474d3d7SVarun Wadekar 82a474d3d7SVarun Wadekar- Trusted Little Kernel (TLK): In order to include the 'tlkd' dispatcher in 83a474d3d7SVarun Wadekar the image, pass 'SPD=tlkd' on the command line while preparing a bl31 image. 84a474d3d7SVarun Wadekar- Trusty: In order to include the 'trusty' dispatcher in the image, pass 85a474d3d7SVarun Wadekar 'SPD=trusty' on the command line while preparing a bl31 image. 86a474d3d7SVarun Wadekar 87a474d3d7SVarun WadekarThis allows other Trusted OS vendors to use the upstream code and include 88a474d3d7SVarun Wadekartheir dispatchers in the image without changing any makefiles. 89a474d3d7SVarun Wadekar 90a474d3d7SVarun WadekarThese are the supported Trusted OS' by Tegra platforms. 91a474d3d7SVarun Wadekar 92*fbd9eb58SVarun Wadekar- Tegra132: TLK 93*fbd9eb58SVarun Wadekar- Tegra210: TLK and Trusty 94*fbd9eb58SVarun Wadekar- Tegra186: Trusty 95*fbd9eb58SVarun Wadekar- Tegra194: Trusty 966f625747SDouglas Raillard 97c2ad38ceSVarun WadekarScatter files 9824dba2b3SPaul Beesley------------- 99c2ad38ceSVarun Wadekar 100c2ad38ceSVarun WadekarTegra platforms currently support scatter files and ld.S scripts. The scatter 101c2ad38ceSVarun Wadekarfiles help support ARMLINK linker to generate BL31 binaries. For now, there 102c2ad38ceSVarun Wadekarexists a common scatter file, plat/nvidia/tegra/scat/bl31.scat, for all Tegra 103c2ad38ceSVarun WadekarSoCs. The `LINKER` build variable needs to point to the ARMLINK binary for 104c2ad38ceSVarun Wadekarthe scatter file to be used. Tegra platforms have verified BL31 image generation 105c2ad38ceSVarun Wadekarwith ARMCLANG (compilation) and ARMLINK (linking) for the Tegra186 platforms. 106c2ad38ceSVarun Wadekar 1076f625747SDouglas RaillardPreparing the BL31 image to run on Tegra SoCs 10824dba2b3SPaul Beesley--------------------------------------------- 1096f625747SDouglas Raillard 1106f625747SDouglas Raillard.. code:: shell 1116f625747SDouglas Raillard 1126f625747SDouglas Raillard CROSS_COMPILE=<path-to-aarch64-gcc>/bin/aarch64-none-elf- make PLAT=tegra \ 113*fbd9eb58SVarun Wadekar TARGET_SOC=<target-soc e.g. t194|t186|t210|t132> SPD=<dispatcher e.g. trusty|tlkd> 114a474d3d7SVarun Wadekar bl31 1156f625747SDouglas Raillard 1166f625747SDouglas RaillardPlatforms wanting to use different TZDRAM\_BASE, can add ``TZDRAM_BASE=<value>`` 1176f625747SDouglas Raillardto the build command line. 1186f625747SDouglas Raillard 1196f625747SDouglas RaillardThe Tegra platform code expects a pointer to the following platform specific 1206f625747SDouglas Raillardstructure via 'x1' register from the BL2 layer which is used by the 1216f625747SDouglas Raillardbl31\_early\_platform\_setup() handler to extract the TZDRAM carveout base and 1226f625747SDouglas Raillardsize for loading the Trusted OS and the UART port ID to be used. The Tegra 1236f625747SDouglas Raillardmemory controller driver programs this base/size in order to restrict NS 1246f625747SDouglas Raillardaccesses. 1256f625747SDouglas Raillard 1266f625747SDouglas Raillardtypedef struct plat\_params\_from\_bl2 { 1276f625747SDouglas Raillard/\* TZ memory size */ 1286f625747SDouglas Raillarduint64\_t tzdram\_size; 1296f625747SDouglas Raillard/* TZ memory base */ 1306f625747SDouglas Raillarduint64\_t tzdram\_base; 1316f625747SDouglas Raillard/* UART port ID \*/ 1326f625747SDouglas Raillardint uart\_id; 133b495791bSHarvey Hsieh/* L2 ECC parity protection disable flag \*/ 134b495791bSHarvey Hsiehint l2\_ecc\_parity\_prot\_dis; 135087cf68aSVarun Wadekar/* SHMEM base address for storing the boot logs \*/ 136087cf68aSVarun Wadekaruint64\_t boot\_profiler\_shmem\_base; 1376f625747SDouglas Raillard} plat\_params\_from\_bl2\_t; 1386f625747SDouglas Raillard 1396f625747SDouglas RaillardPower Management 14024dba2b3SPaul Beesley---------------- 1416f625747SDouglas Raillard 1426f625747SDouglas RaillardThe PSCI implementation expects each platform to expose the 'power state' 1436f625747SDouglas Raillardparameter to be used during the 'SYSTEM SUSPEND' call. The state-id field 1446f625747SDouglas Raillardis implementation defined on Tegra SoCs and is preferably defined by 1456f625747SDouglas Raillardtegra\_def.h. 1466f625747SDouglas Raillard 1476f625747SDouglas RaillardTegra configs 14824dba2b3SPaul Beesley------------- 1496f625747SDouglas Raillard 1506f625747SDouglas Raillard- 'tegra\_enable\_l2\_ecc\_parity\_prot': This flag enables the L2 ECC and Parity 1514def07d5SDan Handley Protection bit, for Arm Cortex-A57 CPUs, during CPU boot. This flag will 1526f625747SDouglas Raillard be enabled by Tegrs SoCs during 'Cluster power up' or 'System Suspend' exit. 153