Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 1 | Tegra SoCs - Overview |
| 2 | ===================== |
| 3 | |
Varun Wadekar | 6801c79 | 2019-01-03 15:09:44 -0800 | [diff] [blame] | 4 | - .. rubric:: T186 |
| 5 | :name: t186 |
| 6 | |
| 7 | The NVIDIA® Parker (T186) series system-on-chip (SoC) delivers a heterogeneous |
| 8 | multi-processing (HMP) solution designed to optimize performance and |
| 9 | efficiency. |
| 10 | |
| 11 | T186 has Dual NVIDIA Denver 2 ARM® CPU cores, plus Quad ARM Cortex®-A57 cores, |
| 12 | in a coherent multiprocessor configuration. The Denver 2 and Cortex-A57 cores |
| 13 | support ARMv8, executing both 64-bit Aarch64 code, and 32-bit Aarch32 code |
| 14 | including legacy ARMv7 applications. The Denver 2 processors each have 128 KB |
| 15 | Instruction and 64 KB Data Level 1 caches; and have a 2MB shared Level 2 |
| 16 | unified cache. The Cortex-A57 processors each have 48 KB Instruction and 32 KB |
| 17 | Data Level 1 caches; and also have a 2 MB shared Level 2 unified cache. A |
| 18 | high speed coherency fabric connects these two processor complexes and allows |
| 19 | heterogeneous multi-processing with all six cores if required. |
| 20 | |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 21 | - .. rubric:: T210 |
| 22 | :name: t210 |
| 23 | |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 24 | T210 has Quad Arm® Cortex®-A57 cores in a switched configuration with a |
| 25 | companion set of quad Arm Cortex-A53 cores. The Cortex-A57 and A53 cores |
| 26 | support Armv8-A, executing both 64-bit Aarch64 code, and 32-bit Aarch32 code |
| 27 | including legacy Armv7-A applications. The Cortex-A57 processors each have |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 28 | 48 KB Instruction and 32 KB Data Level 1 caches; and have a 2 MB shared |
| 29 | Level 2 unified cache. The Cortex-A53 processors each have 32 KB Instruction |
| 30 | and 32 KB Data Level 1 caches; and have a 512 KB shared Level 2 unified cache. |
| 31 | |
| 32 | - .. rubric:: T132 |
| 33 | :name: t132 |
| 34 | |
| 35 | Denver is NVIDIA's own custom-designed, 64-bit, dual-core CPU which is |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 36 | fully Armv8-A architecture compatible. Each of the two Denver cores |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 37 | implements a 7-way superscalar microarchitecture (up to 7 concurrent |
| 38 | micro-ops can be executed per clock), and includes a 128KB 4-way L1 |
| 39 | instruction cache, a 64KB 4-way L1 data cache, and a 2MB 16-way L2 |
| 40 | cache, which services both cores. |
| 41 | |
| 42 | Denver implements an innovative process called Dynamic Code Optimization, |
| 43 | which optimizes frequently used software routines at runtime into dense, |
| 44 | highly tuned microcode-equivalent routines. These are stored in a |
| 45 | dedicated, 128MB main-memory-based optimization cache. After being read |
| 46 | into the instruction cache, the optimized micro-ops are executed, |
| 47 | re-fetched and executed from the instruction cache as long as needed and |
| 48 | capacity allows. |
| 49 | |
| 50 | Effectively, this reduces the need to re-optimize the software routines. |
| 51 | Instead of using hardware to extract the instruction-level parallelism |
| 52 | (ILP) inherent in the code, Denver extracts the ILP once via software |
| 53 | techniques, and then executes those routines repeatedly, thus amortizing |
| 54 | the cost of ILP extraction over the many execution instances. |
| 55 | |
| 56 | Denver also features new low latency power-state transitions, in addition |
| 57 | to extensive power-gating and dynamic voltage and clock scaling based on |
| 58 | workloads. |
| 59 | |
| 60 | Directory structure |
| 61 | =================== |
| 62 | |
| 63 | - plat/nvidia/tegra/common - Common code for all Tegra SoCs |
| 64 | - plat/nvidia/tegra/soc/txxx - Chip specific code |
| 65 | |
| 66 | Trusted OS dispatcher |
| 67 | ===================== |
| 68 | |
Varun Wadekar | 6801c79 | 2019-01-03 15:09:44 -0800 | [diff] [blame] | 69 | Tegra supports multiple Trusted OS'. |
| 70 | |
| 71 | - Trusted Little Kernel (TLK): In order to include the 'tlkd' dispatcher in |
| 72 | the image, pass 'SPD=tlkd' on the command line while preparing a bl31 image. |
| 73 | - Trusty: In order to include the 'trusty' dispatcher in the image, pass |
| 74 | 'SPD=trusty' on the command line while preparing a bl31 image. |
| 75 | |
| 76 | This allows other Trusted OS vendors to use the upstream code and include |
| 77 | their dispatchers in the image without changing any makefiles. |
| 78 | |
| 79 | These are the supported Trusted OS' by Tegra platforms. |
| 80 | |
| 81 | Tegra132: TLK |
| 82 | Tegra210: TLK and Trusty |
| 83 | Tegra186: Trusty |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 84 | |
| 85 | Preparing the BL31 image to run on Tegra SoCs |
| 86 | ============================================= |
| 87 | |
| 88 | .. code:: shell |
| 89 | |
| 90 | CROSS_COMPILE=<path-to-aarch64-gcc>/bin/aarch64-none-elf- make PLAT=tegra \ |
Varun Wadekar | 6801c79 | 2019-01-03 15:09:44 -0800 | [diff] [blame] | 91 | TARGET_SOC=<target-soc e.g. t186|t210|t132> SPD=<dispatcher e.g. trusty|tlkd> |
| 92 | bl31 |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 93 | |
| 94 | Platforms wanting to use different TZDRAM\_BASE, can add ``TZDRAM_BASE=<value>`` |
| 95 | to the build command line. |
| 96 | |
| 97 | The Tegra platform code expects a pointer to the following platform specific |
| 98 | structure via 'x1' register from the BL2 layer which is used by the |
| 99 | bl31\_early\_platform\_setup() handler to extract the TZDRAM carveout base and |
| 100 | size for loading the Trusted OS and the UART port ID to be used. The Tegra |
| 101 | memory controller driver programs this base/size in order to restrict NS |
| 102 | accesses. |
| 103 | |
| 104 | typedef struct plat\_params\_from\_bl2 { |
| 105 | /\* TZ memory size */ |
| 106 | uint64\_t tzdram\_size; |
| 107 | /* TZ memory base */ |
| 108 | uint64\_t tzdram\_base; |
| 109 | /* UART port ID \*/ |
| 110 | int uart\_id; |
Harvey Hsieh | fbdfce1 | 2016-11-23 19:13:08 +0800 | [diff] [blame] | 111 | /* L2 ECC parity protection disable flag \*/ |
| 112 | int l2\_ecc\_parity\_prot\_dis; |
Varun Wadekar | 4967c3d | 2017-07-21 13:34:16 -0700 | [diff] [blame] | 113 | /* SHMEM base address for storing the boot logs \*/ |
| 114 | uint64\_t boot\_profiler\_shmem\_base; |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 115 | } plat\_params\_from\_bl2\_t; |
| 116 | |
| 117 | Power Management |
| 118 | ================ |
| 119 | |
| 120 | The PSCI implementation expects each platform to expose the 'power state' |
| 121 | parameter to be used during the 'SYSTEM SUSPEND' call. The state-id field |
| 122 | is implementation defined on Tegra SoCs and is preferably defined by |
| 123 | tegra\_def.h. |
| 124 | |
| 125 | Tegra configs |
| 126 | ============= |
| 127 | |
| 128 | - 'tegra\_enable\_l2\_ecc\_parity\_prot': This flag enables the L2 ECC and Parity |
Dan Handley | 610e7e1 | 2018-03-01 18:44:00 +0000 | [diff] [blame] | 129 | Protection bit, for Arm Cortex-A57 CPUs, during CPU boot. This flag will |
Douglas Raillard | d7c21b7 | 2017-06-28 15:23:03 +0100 | [diff] [blame] | 130 | be enabled by Tegrs SoCs during 'Cluster power up' or 'System Suspend' exit. |