xref: /rk3399_ARM-atf/docs/plat/nvidia-tegra.rst (revision 6f62574767546b11199142b1b577a86571051c40)
1*6f625747SDouglas RaillardTegra SoCs - Overview
2*6f625747SDouglas Raillard=====================
3*6f625747SDouglas Raillard
4*6f625747SDouglas Raillard-  .. rubric:: T210
5*6f625747SDouglas Raillard      :name: t210
6*6f625747SDouglas Raillard
7*6f625747SDouglas RaillardT210 has Quad ARM® Cortex®-A57 cores in a switched configuration with a
8*6f625747SDouglas Raillardcompanion set of quad ARM Cortex-A53 cores. The Cortex-A57 and A53 cores
9*6f625747SDouglas Raillardsupport ARMv8, executing both 64-bit Aarch64 code, and 32-bit Aarch32 code
10*6f625747SDouglas Raillardincluding legacy ARMv7 applications. The Cortex-A57 processors each have
11*6f625747SDouglas Raillard48 KB Instruction and 32 KB Data Level 1 caches; and have a 2 MB shared
12*6f625747SDouglas RaillardLevel 2 unified cache. The Cortex-A53 processors each have 32 KB Instruction
13*6f625747SDouglas Raillardand 32 KB Data Level 1 caches; and have a 512 KB shared Level 2 unified cache.
14*6f625747SDouglas Raillard
15*6f625747SDouglas Raillard-  .. rubric:: T132
16*6f625747SDouglas Raillard      :name: t132
17*6f625747SDouglas Raillard
18*6f625747SDouglas RaillardDenver is NVIDIA's own custom-designed, 64-bit, dual-core CPU which is
19*6f625747SDouglas Raillardfully ARMv8 architecture compatible. Each of the two Denver cores
20*6f625747SDouglas Raillardimplements a 7-way superscalar microarchitecture (up to 7 concurrent
21*6f625747SDouglas Raillardmicro-ops can be executed per clock), and includes a 128KB 4-way L1
22*6f625747SDouglas Raillardinstruction cache, a 64KB 4-way L1 data cache, and a 2MB 16-way L2
23*6f625747SDouglas Raillardcache, which services both cores.
24*6f625747SDouglas Raillard
25*6f625747SDouglas RaillardDenver implements an innovative process called Dynamic Code Optimization,
26*6f625747SDouglas Raillardwhich optimizes frequently used software routines at runtime into dense,
27*6f625747SDouglas Raillardhighly tuned microcode-equivalent routines. These are stored in a
28*6f625747SDouglas Raillarddedicated, 128MB main-memory-based optimization cache. After being read
29*6f625747SDouglas Raillardinto the instruction cache, the optimized micro-ops are executed,
30*6f625747SDouglas Raillardre-fetched and executed from the instruction cache as long as needed and
31*6f625747SDouglas Raillardcapacity allows.
32*6f625747SDouglas Raillard
33*6f625747SDouglas RaillardEffectively, this reduces the need to re-optimize the software routines.
34*6f625747SDouglas RaillardInstead of using hardware to extract the instruction-level parallelism
35*6f625747SDouglas Raillard(ILP) inherent in the code, Denver extracts the ILP once via software
36*6f625747SDouglas Raillardtechniques, and then executes those routines repeatedly, thus amortizing
37*6f625747SDouglas Raillardthe cost of ILP extraction over the many execution instances.
38*6f625747SDouglas Raillard
39*6f625747SDouglas RaillardDenver also features new low latency power-state transitions, in addition
40*6f625747SDouglas Raillardto extensive power-gating and dynamic voltage and clock scaling based on
41*6f625747SDouglas Raillardworkloads.
42*6f625747SDouglas Raillard
43*6f625747SDouglas RaillardDirectory structure
44*6f625747SDouglas Raillard===================
45*6f625747SDouglas Raillard
46*6f625747SDouglas Raillard-  plat/nvidia/tegra/common - Common code for all Tegra SoCs
47*6f625747SDouglas Raillard-  plat/nvidia/tegra/soc/txxx - Chip specific code
48*6f625747SDouglas Raillard
49*6f625747SDouglas RaillardTrusted OS dispatcher
50*6f625747SDouglas Raillard=====================
51*6f625747SDouglas Raillard
52*6f625747SDouglas RaillardTegra supports multiple Trusted OS', Trusted Little Kernel (TLK) being one of
53*6f625747SDouglas Raillardthem. In order to include the 'tlkd' dispatcher in the image, pass 'SPD=tlkd'
54*6f625747SDouglas Raillardon the command line while preparing a bl31 image. This allows other Trusted OS
55*6f625747SDouglas Raillardvendors to use the upstream code and include their dispatchers in the image
56*6f625747SDouglas Raillardwithout changing any makefiles.
57*6f625747SDouglas Raillard
58*6f625747SDouglas RaillardPreparing the BL31 image to run on Tegra SoCs
59*6f625747SDouglas Raillard=============================================
60*6f625747SDouglas Raillard
61*6f625747SDouglas Raillard.. code:: shell
62*6f625747SDouglas Raillard
63*6f625747SDouglas Raillard    CROSS_COMPILE=<path-to-aarch64-gcc>/bin/aarch64-none-elf- make PLAT=tegra \
64*6f625747SDouglas Raillard    TARGET_SOC=<target-soc e.g. t210|t132> SPD=<dispatcher e.g. tlkd> bl31
65*6f625747SDouglas Raillard
66*6f625747SDouglas RaillardPlatforms wanting to use different TZDRAM\_BASE, can add ``TZDRAM_BASE=<value>``
67*6f625747SDouglas Raillardto the build command line.
68*6f625747SDouglas Raillard
69*6f625747SDouglas RaillardThe Tegra platform code expects a pointer to the following platform specific
70*6f625747SDouglas Raillardstructure via 'x1' register from the BL2 layer which is used by the
71*6f625747SDouglas Raillardbl31\_early\_platform\_setup() handler to extract the TZDRAM carveout base and
72*6f625747SDouglas Raillardsize for loading the Trusted OS and the UART port ID to be used. The Tegra
73*6f625747SDouglas Raillardmemory controller driver programs this base/size in order to restrict NS
74*6f625747SDouglas Raillardaccesses.
75*6f625747SDouglas Raillard
76*6f625747SDouglas Raillardtypedef struct plat\_params\_from\_bl2 {
77*6f625747SDouglas Raillard/\* TZ memory size */
78*6f625747SDouglas Raillarduint64\_t tzdram\_size;
79*6f625747SDouglas Raillard/* TZ memory base */
80*6f625747SDouglas Raillarduint64\_t tzdram\_base;
81*6f625747SDouglas Raillard/* UART port ID \*/
82*6f625747SDouglas Raillardint uart\_id;
83*6f625747SDouglas Raillard} plat\_params\_from\_bl2\_t;
84*6f625747SDouglas Raillard
85*6f625747SDouglas RaillardPower Management
86*6f625747SDouglas Raillard================
87*6f625747SDouglas Raillard
88*6f625747SDouglas RaillardThe PSCI implementation expects each platform to expose the 'power state'
89*6f625747SDouglas Raillardparameter to be used during the 'SYSTEM SUSPEND' call. The state-id field
90*6f625747SDouglas Raillardis implementation defined on Tegra SoCs and is preferably defined by
91*6f625747SDouglas Raillardtegra\_def.h.
92*6f625747SDouglas Raillard
93*6f625747SDouglas RaillardTegra configs
94*6f625747SDouglas Raillard=============
95*6f625747SDouglas Raillard
96*6f625747SDouglas Raillard-  'tegra\_enable\_l2\_ecc\_parity\_prot': This flag enables the L2 ECC and Parity
97*6f625747SDouglas Raillard   Protection bit, for ARM Cortex-A57 CPUs, during CPU boot. This flag will
98*6f625747SDouglas Raillard   be enabled by Tegrs SoCs during 'Cluster power up' or 'System Suspend' exit.
99