16f625747SDouglas RaillardTegra SoCs - Overview 26f625747SDouglas Raillard===================== 36f625747SDouglas Raillard 46f625747SDouglas Raillard- .. rubric:: T210 56f625747SDouglas Raillard :name: t210 66f625747SDouglas Raillard 7*4def07d5SDan HandleyT210 has Quad Arm® Cortex®-A57 cores in a switched configuration with a 8*4def07d5SDan Handleycompanion set of quad Arm Cortex-A53 cores. The Cortex-A57 and A53 cores 9*4def07d5SDan Handleysupport Armv8-A, executing both 64-bit Aarch64 code, and 32-bit Aarch32 code 10*4def07d5SDan Handleyincluding legacy Armv7-A applications. The Cortex-A57 processors each have 116f625747SDouglas Raillard48 KB Instruction and 32 KB Data Level 1 caches; and have a 2 MB shared 126f625747SDouglas RaillardLevel 2 unified cache. The Cortex-A53 processors each have 32 KB Instruction 136f625747SDouglas Raillardand 32 KB Data Level 1 caches; and have a 512 KB shared Level 2 unified cache. 146f625747SDouglas Raillard 156f625747SDouglas Raillard- .. rubric:: T132 166f625747SDouglas Raillard :name: t132 176f625747SDouglas Raillard 186f625747SDouglas RaillardDenver is NVIDIA's own custom-designed, 64-bit, dual-core CPU which is 19*4def07d5SDan Handleyfully Armv8-A architecture compatible. Each of the two Denver cores 206f625747SDouglas Raillardimplements a 7-way superscalar microarchitecture (up to 7 concurrent 216f625747SDouglas Raillardmicro-ops can be executed per clock), and includes a 128KB 4-way L1 226f625747SDouglas Raillardinstruction cache, a 64KB 4-way L1 data cache, and a 2MB 16-way L2 236f625747SDouglas Raillardcache, which services both cores. 246f625747SDouglas Raillard 256f625747SDouglas RaillardDenver implements an innovative process called Dynamic Code Optimization, 266f625747SDouglas Raillardwhich optimizes frequently used software routines at runtime into dense, 276f625747SDouglas Raillardhighly tuned microcode-equivalent routines. These are stored in a 286f625747SDouglas Raillarddedicated, 128MB main-memory-based optimization cache. After being read 296f625747SDouglas Raillardinto the instruction cache, the optimized micro-ops are executed, 306f625747SDouglas Raillardre-fetched and executed from the instruction cache as long as needed and 316f625747SDouglas Raillardcapacity allows. 326f625747SDouglas Raillard 336f625747SDouglas RaillardEffectively, this reduces the need to re-optimize the software routines. 346f625747SDouglas RaillardInstead of using hardware to extract the instruction-level parallelism 356f625747SDouglas Raillard(ILP) inherent in the code, Denver extracts the ILP once via software 366f625747SDouglas Raillardtechniques, and then executes those routines repeatedly, thus amortizing 376f625747SDouglas Raillardthe cost of ILP extraction over the many execution instances. 386f625747SDouglas Raillard 396f625747SDouglas RaillardDenver also features new low latency power-state transitions, in addition 406f625747SDouglas Raillardto extensive power-gating and dynamic voltage and clock scaling based on 416f625747SDouglas Raillardworkloads. 426f625747SDouglas Raillard 436f625747SDouglas RaillardDirectory structure 446f625747SDouglas Raillard=================== 456f625747SDouglas Raillard 466f625747SDouglas Raillard- plat/nvidia/tegra/common - Common code for all Tegra SoCs 476f625747SDouglas Raillard- plat/nvidia/tegra/soc/txxx - Chip specific code 486f625747SDouglas Raillard 496f625747SDouglas RaillardTrusted OS dispatcher 506f625747SDouglas Raillard===================== 516f625747SDouglas Raillard 526f625747SDouglas RaillardTegra supports multiple Trusted OS', Trusted Little Kernel (TLK) being one of 536f625747SDouglas Raillardthem. In order to include the 'tlkd' dispatcher in the image, pass 'SPD=tlkd' 546f625747SDouglas Raillardon the command line while preparing a bl31 image. This allows other Trusted OS 556f625747SDouglas Raillardvendors to use the upstream code and include their dispatchers in the image 566f625747SDouglas Raillardwithout changing any makefiles. 576f625747SDouglas Raillard 586f625747SDouglas RaillardPreparing the BL31 image to run on Tegra SoCs 596f625747SDouglas Raillard============================================= 606f625747SDouglas Raillard 616f625747SDouglas Raillard.. code:: shell 626f625747SDouglas Raillard 636f625747SDouglas Raillard CROSS_COMPILE=<path-to-aarch64-gcc>/bin/aarch64-none-elf- make PLAT=tegra \ 646f625747SDouglas Raillard TARGET_SOC=<target-soc e.g. t210|t132> SPD=<dispatcher e.g. tlkd> bl31 656f625747SDouglas Raillard 666f625747SDouglas RaillardPlatforms wanting to use different TZDRAM\_BASE, can add ``TZDRAM_BASE=<value>`` 676f625747SDouglas Raillardto the build command line. 686f625747SDouglas Raillard 696f625747SDouglas RaillardThe Tegra platform code expects a pointer to the following platform specific 706f625747SDouglas Raillardstructure via 'x1' register from the BL2 layer which is used by the 716f625747SDouglas Raillardbl31\_early\_platform\_setup() handler to extract the TZDRAM carveout base and 726f625747SDouglas Raillardsize for loading the Trusted OS and the UART port ID to be used. The Tegra 736f625747SDouglas Raillardmemory controller driver programs this base/size in order to restrict NS 746f625747SDouglas Raillardaccesses. 756f625747SDouglas Raillard 766f625747SDouglas Raillardtypedef struct plat\_params\_from\_bl2 { 776f625747SDouglas Raillard/\* TZ memory size */ 786f625747SDouglas Raillarduint64\_t tzdram\_size; 796f625747SDouglas Raillard/* TZ memory base */ 806f625747SDouglas Raillarduint64\_t tzdram\_base; 816f625747SDouglas Raillard/* UART port ID \*/ 826f625747SDouglas Raillardint uart\_id; 836f625747SDouglas Raillard} plat\_params\_from\_bl2\_t; 846f625747SDouglas Raillard 856f625747SDouglas RaillardPower Management 866f625747SDouglas Raillard================ 876f625747SDouglas Raillard 886f625747SDouglas RaillardThe PSCI implementation expects each platform to expose the 'power state' 896f625747SDouglas Raillardparameter to be used during the 'SYSTEM SUSPEND' call. The state-id field 906f625747SDouglas Raillardis implementation defined on Tegra SoCs and is preferably defined by 916f625747SDouglas Raillardtegra\_def.h. 926f625747SDouglas Raillard 936f625747SDouglas RaillardTegra configs 946f625747SDouglas Raillard============= 956f625747SDouglas Raillard 966f625747SDouglas Raillard- 'tegra\_enable\_l2\_ecc\_parity\_prot': This flag enables the L2 ECC and Parity 97*4def07d5SDan Handley Protection bit, for Arm Cortex-A57 CPUs, during CPU boot. This flag will 986f625747SDouglas Raillard be enabled by Tegrs SoCs during 'Cluster power up' or 'System Suspend' exit. 99