140d553cfSPaul BeesleyTrusted Firmware-A Documentation 240d553cfSPaul Beesley================================ 3653279b0SPaul Beesley 4653279b0SPaul Beesley.. toctree:: 5653279b0SPaul Beesley :maxdepth: 1 657354abbSPaul Beesley :hidden: 7653279b0SPaul Beesley 89f1622b0SPaul Beesley Home<self> 940d553cfSPaul Beesley getting_started/index 1040d553cfSPaul Beesley process/index 1140d553cfSPaul Beesley components/index 1240d553cfSPaul Beesley design/index 1340d553cfSPaul Beesley plat/index 1440d553cfSPaul Beesley perf/index 1540d553cfSPaul Beesley security_advisories/index 16653279b0SPaul Beesley change-log 1740d553cfSPaul Beesley acknowledgements 188f62ca7bSPaul Beesley glossary 198aa05055SPaul Beesley maintainers 209f1622b0SPaul Beesley license 21653279b0SPaul Beesley 2257354abbSPaul Beesley.. contents:: On This Page 2357354abbSPaul Beesley :depth: 3 2457354abbSPaul Beesley 259f1622b0SPaul BeesleyTrusted Firmware-A (TF-A) provides a reference implementation of secure world 269f1622b0SPaul Beesleysoftware for `Armv7-A and Armv8-A`_, including a `Secure Monitor`_ executing 279f1622b0SPaul Beesleyat Exception Level 3 (EL3). It implements various Arm interface standards, 289f1622b0SPaul Beesleysuch as: 29653279b0SPaul Beesley 309f1622b0SPaul Beesley- The `Power State Coordination Interface (PSCI)`_ 319f1622b0SPaul Beesley- `Trusted Board Boot Requirements CLIENT (TBBR-CLIENT)`_ 329f1622b0SPaul Beesley- `SMC Calling Convention`_ 339f1622b0SPaul Beesley- `System Control and Management Interface (SCMI)`_ 349f1622b0SPaul Beesley- `Software Delegated Exception Interface (SDEI)`_ 359f1622b0SPaul Beesley 369f1622b0SPaul BeesleyWhere possible, the code is designed for reuse or porting to other Armv7-A and 379f1622b0SPaul BeesleyArmv8-A model and hardware platforms. 389f1622b0SPaul Beesley 399f1622b0SPaul BeesleyThis release provides a suitable starting point for productization of secure 409f1622b0SPaul Beesleyworld boot and runtime firmware, in either the AArch32 or AArch64 execution 419f1622b0SPaul Beesleystates. 429f1622b0SPaul Beesley 439f1622b0SPaul BeesleyUsers are encouraged to do their own security validation, including penetration 449f1622b0SPaul Beesleytesting, on any secure world code derived from TF-A. 459f1622b0SPaul Beesley 469f1622b0SPaul BeesleyArm will continue development in collaboration with interested parties to 479f1622b0SPaul Beesleyprovide a full reference implementation of Secure Monitor code and Arm standards 489f1622b0SPaul Beesleyto the benefit of all developers working with Armv7-A and Armv8-A TrustZone 499f1622b0SPaul Beesleytechnology. 509f1622b0SPaul Beesley 519f1622b0SPaul BeesleyFunctionality 529f1622b0SPaul Beesley------------- 539f1622b0SPaul Beesley 549f1622b0SPaul Beesley- Initialization of the secure world, for example exception vectors, control 559f1622b0SPaul Beesley registers and interrupts for the platform. 569f1622b0SPaul Beesley 579f1622b0SPaul Beesley- Library support for CPU specific reset and power down sequences. This 589f1622b0SPaul Beesley includes support for errata workarounds and the latest Arm DynamIQ CPUs. 599f1622b0SPaul Beesley 609f1622b0SPaul Beesley- Drivers to enable standard initialization of Arm System IP, for example 619f1622b0SPaul Beesley Generic Interrupt Controller (GIC), Cache Coherent Interconnect (CCI), 629f1622b0SPaul Beesley Cache Coherent Network (CCN), Network Interconnect (NIC) and TrustZone 639f1622b0SPaul Beesley Controller (TZC). 649f1622b0SPaul Beesley 659f1622b0SPaul Beesley- A generic `SCMI`_ driver to interface with conforming power controllers, for 669f1622b0SPaul Beesley example the Arm System Control Processor (SCP). 679f1622b0SPaul Beesley 689f1622b0SPaul Beesley- SMC (Secure Monitor Call) handling, conforming to the `SMC Calling 699f1622b0SPaul Beesley Convention`_ using an EL3 runtime services framework. 709f1622b0SPaul Beesley 719f1622b0SPaul Beesley- `PSCI`_ library support for CPU, cluster and system power management 729f1622b0SPaul Beesley use-cases. 739f1622b0SPaul Beesley This library is pre-integrated with the AArch64 EL3 Runtime Software, and 749f1622b0SPaul Beesley is also suitable for integration with other AArch32 EL3 Runtime Software, 759f1622b0SPaul Beesley for example an AArch32 Secure OS. 769f1622b0SPaul Beesley 779f1622b0SPaul Beesley- A minimal AArch32 Secure Payload (SP\_MIN) to demonstrate `PSCI`_ library 789f1622b0SPaul Beesley integration with AArch32 EL3 Runtime Software. 799f1622b0SPaul Beesley 809f1622b0SPaul Beesley- Secure Monitor library code such as world switching, EL1 context management 819f1622b0SPaul Beesley and interrupt routing. 829f1622b0SPaul Beesley When a Secure-EL1 Payload (SP) is present, for example a Secure OS, the 839f1622b0SPaul Beesley AArch64 EL3 Runtime Software must be integrated with a Secure Payload 849f1622b0SPaul Beesley Dispatcher (SPD) component to customize the interaction with the SP. 859f1622b0SPaul Beesley 869f1622b0SPaul Beesley- A Test SP and SPD to demonstrate AArch64 Secure Monitor functionality and SP 879f1622b0SPaul Beesley interaction with PSCI. 889f1622b0SPaul Beesley 899f1622b0SPaul Beesley- SPDs for the `OP-TEE Secure OS`_, `NVIDIA Trusted Little Kernel`_ 909f1622b0SPaul Beesley and `Trusty Secure OS`_. 919f1622b0SPaul Beesley 929f1622b0SPaul Beesley- A Trusted Board Boot implementation, conforming to all mandatory TBBR 939f1622b0SPaul Beesley requirements. This includes image authentication, Firmware Update (or 949f1622b0SPaul Beesley recovery mode), and packaging of the various firmware images into a 959f1622b0SPaul Beesley Firmware Image Package (FIP). 969f1622b0SPaul Beesley 979f1622b0SPaul Beesley- Pre-integration of TBB with the Arm CryptoCell product, to take advantage of 989f1622b0SPaul Beesley its hardware Root of Trust and crypto acceleration services. 999f1622b0SPaul Beesley 1009f1622b0SPaul Beesley- Reliability, Availability, and Serviceability (RAS) functionality, including 1019f1622b0SPaul Beesley 1029f1622b0SPaul Beesley - A Secure Partition Manager (SPM) to manage Secure Partitions in 1039f1622b0SPaul Beesley Secure-EL0, which can be used to implement simple management and 1049f1622b0SPaul Beesley security services. 1059f1622b0SPaul Beesley 1068f62ca7bSPaul Beesley - An |SDEI| dispatcher to route interrupt-based |SDEI| events. 1079f1622b0SPaul Beesley 1089f1622b0SPaul Beesley - An Exception Handling Framework (EHF) that allows dispatching of EL3 1099f1622b0SPaul Beesley interrupts to their registered handlers, to facilitate firmware-first 1109f1622b0SPaul Beesley error handling. 1119f1622b0SPaul Beesley 1129f1622b0SPaul Beesley- A dynamic configuration framework that enables each of the firmware images 1139f1622b0SPaul Beesley to be configured at runtime if required by the platform. It also enables 1149f1622b0SPaul Beesley loading of a hardware configuration (for example, a kernel device tree) 1159f1622b0SPaul Beesley as part of the FIP, to be passed through the firmware stages. 1169f1622b0SPaul Beesley 1179f1622b0SPaul Beesley- Support for alternative boot flows, for example to support platforms where 1189f1622b0SPaul Beesley the EL3 Runtime Software is loaded using other firmware or a separate 1199f1622b0SPaul Beesley secure system processor, or where a non-TF-A ROM expects BL2 to be loaded 1209f1622b0SPaul Beesley at EL3. 1219f1622b0SPaul Beesley 1229f1622b0SPaul Beesley- Support for the GCC, LLVM and Arm Compiler 6 toolchains. 1239f1622b0SPaul Beesley 1249f1622b0SPaul Beesley- Support for combining several libraries into a "romlib" image that may be 1259f1622b0SPaul Beesley shared across images to reduce memory footprint. The romlib image is stored 1269f1622b0SPaul Beesley in ROM but is accessed through a jump-table that may be stored 1279f1622b0SPaul Beesley in read-write memory, allowing for the library code to be patched. 1289f1622b0SPaul Beesley 1299f1622b0SPaul Beesley- A prototype implementation of a Secure Partition Manager (SPM) that is based 1309f1622b0SPaul Beesley on the SPCI Alpha 1 and SPRT draft specifications. 1319f1622b0SPaul Beesley 1329f1622b0SPaul Beesley- Support for ARMv8.3 pointer authentication in the normal and secure worlds. 1339f1622b0SPaul Beesley The use of pointer authentication in the normal world is enabled whenever 1349f1622b0SPaul Beesley architectural support is available, without the need for additional build 1359f1622b0SPaul Beesley flags. Use of pointer authentication in the secure world remains an 1369f1622b0SPaul Beesley experimental configuration at this time and requires the ``ENABLE_PAUTH`` 1379f1622b0SPaul Beesley build flag to be set. 1389f1622b0SPaul Beesley 1399f1622b0SPaul Beesley- Position-Independent Executable (PIE) support. Initially for BL31 only, with 1409f1622b0SPaul Beesley further support to be added in a future release. 1419f1622b0SPaul Beesley 1429f1622b0SPaul BeesleyFor a full description of functionality and implementation details, please 143*34760951SPaul Beesleysee :ref:`Firmware Design` and supporting documentation. The 144*34760951SPaul Beesley:ref:`Change Log & Release Notes` provides details of changes made since the 145*34760951SPaul Beesleylast release. 1469f1622b0SPaul Beesley 1479f1622b0SPaul BeesleyPlatforms 1489f1622b0SPaul Beesley--------- 1499f1622b0SPaul Beesley 1509f1622b0SPaul BeesleyVarious AArch32 and AArch64 builds of this release have been tested on r0, r1 1519f1622b0SPaul Beesleyand r2 variants of the `Juno Arm Development Platform`_. 1529f1622b0SPaul Beesley 1539f1622b0SPaul BeesleyThe latest version of the AArch64 build of TF-A has been tested on the following 1549f1622b0SPaul BeesleyArm FVPs without shifted affinities, and that do not support threaded CPU cores 1559f1622b0SPaul Beesley(64-bit host machine only). 1569f1622b0SPaul Beesley 157e1c5026aSPaul Beesley.. note:: 1589f1622b0SPaul Beesley The FVP models used are Version 11.5 Build 33, unless otherwise stated. 1599f1622b0SPaul Beesley 1609f1622b0SPaul Beesley- ``FVP_Base_AEMv8A-AEMv8A`` 1619f1622b0SPaul Beesley- ``FVP_Base_AEMv8A-AEMv8A-AEMv8A-AEMv8A-CCN502`` 1629f1622b0SPaul Beesley- ``FVP_Base_RevC-2xAEMv8A`` 1639f1622b0SPaul Beesley- ``FVP_Base_Cortex-A32x4`` 1649f1622b0SPaul Beesley- ``FVP_Base_Cortex-A35x4`` 1659f1622b0SPaul Beesley- ``FVP_Base_Cortex-A53x4`` 1669f1622b0SPaul Beesley- ``FVP_Base_Cortex-A55x4+Cortex-A75x4`` 1679f1622b0SPaul Beesley- ``FVP_Base_Cortex-A55x4`` 1689f1622b0SPaul Beesley- ``FVP_Base_Cortex-A57x1-A53x1`` 1699f1622b0SPaul Beesley- ``FVP_Base_Cortex-A57x2-A53x4`` 1709f1622b0SPaul Beesley- ``FVP_Base_Cortex-A57x4-A53x4`` 1719f1622b0SPaul Beesley- ``FVP_Base_Cortex-A57x4`` 1729f1622b0SPaul Beesley- ``FVP_Base_Cortex-A72x4-A53x4`` 1739f1622b0SPaul Beesley- ``FVP_Base_Cortex-A72x4`` 1749f1622b0SPaul Beesley- ``FVP_Base_Cortex-A73x4-A53x4`` 1759f1622b0SPaul Beesley- ``FVP_Base_Cortex-A73x4`` 1769f1622b0SPaul Beesley- ``FVP_Base_Cortex-A75x4`` 1779f1622b0SPaul Beesley- ``FVP_Base_Cortex-A76x4`` 1789f1622b0SPaul Beesley- ``FVP_Base_Cortex-A76AEx4`` (Tested with internal model) 1799f1622b0SPaul Beesley- ``FVP_Base_Cortex-A76AEx8`` (Tested with internal model) 180f363deb6SBalint Dobszay- ``FVP_Base_Cortex-A77x4`` (Version 11.7 build 36) 1819f1622b0SPaul Beesley- ``FVP_Base_Neoverse-N1x4`` (Tested with internal model) 1829f1622b0SPaul Beesley- ``FVP_CSS_SGI-575`` (Version 11.3 build 42) 1839f1622b0SPaul Beesley- ``FVP_CSS_SGM-775`` (Version 11.3 build 42) 1849f1622b0SPaul Beesley- ``FVP_RD_E1Edge`` (Version 11.3 build 42) 1859f1622b0SPaul Beesley- ``FVP_RD_N1Edge`` (Version 11.3 build 42) 1869f1622b0SPaul Beesley- ``Foundation_Platform`` 1879f1622b0SPaul Beesley 1889f1622b0SPaul BeesleyThe latest version of the AArch32 build of TF-A has been tested on the following 1899f1622b0SPaul BeesleyArm FVPs without shifted affinities, and that do not support threaded CPU cores 1909f1622b0SPaul Beesley(64-bit host machine only). 1919f1622b0SPaul Beesley 1929f1622b0SPaul Beesley- ``FVP_Base_AEMv8A-AEMv8A`` 1939f1622b0SPaul Beesley- ``FVP_Base_Cortex-A32x4`` 1949f1622b0SPaul Beesley 195e1c5026aSPaul Beesley.. note:: 196e1c5026aSPaul Beesley The ``FVP_Base_RevC-2xAEMv8A`` FVP only supports shifted affinities. 1979f1622b0SPaul Beesley 1989f1622b0SPaul BeesleyThe Foundation FVP can be downloaded free of charge. The Base FVPs can be 1999f1622b0SPaul Beesleylicensed from Arm. See the `Arm FVP website`_. 2009f1622b0SPaul Beesley 2019f1622b0SPaul BeesleyAll the above platforms have been tested with `Linaro Release 18.04`_. 2029f1622b0SPaul Beesley 2039f1622b0SPaul BeesleyThis release also contains the following platform support: 2049f1622b0SPaul Beesley 2059f1622b0SPaul Beesley- Allwinner sun50i_a64 and sun50i_h6 2069f1622b0SPaul Beesley- Amlogic Meson S905 (GXBB) 2079f1622b0SPaul Beesley- Arm Juno Software Development Platform 2089f1622b0SPaul Beesley- Arm Neoverse N1 System Development Platform (N1SDP) 2099f1622b0SPaul Beesley- Arm Neoverse Reference Design N1 Edge (RD-N1-Edge) FVP 2109f1622b0SPaul Beesley- Arm Neoverse Reference Design E1 Edge (RD-E1-Edge) FVP 2119f1622b0SPaul Beesley- Arm SGI-575 and SGM-775 2129f1622b0SPaul Beesley- Arm Versatile Express FVP 2139f1622b0SPaul Beesley- HiKey, HiKey960 and Poplar boards 2149f1622b0SPaul Beesley- Intel Stratix 10 SoC FPGA 2159f1622b0SPaul Beesley- Marvell Armada 3700 and 8K 2169f1622b0SPaul Beesley- MediaTek MT6795 and MT8173 SoCs 2179f1622b0SPaul Beesley- NVIDIA T132, T186 and T210 SoCs 2189f1622b0SPaul Beesley- NXP QorIQ LS1043A, i.MX8MM, i.MX8MQ, i.MX8QX, i.MX8QM and i.MX7Solo WaRP7 2199f1622b0SPaul Beesley- QEMU 2209f1622b0SPaul Beesley- Raspberry Pi 3 2219f1622b0SPaul Beesley- Renesas R-Car Generation 3 2229f1622b0SPaul Beesley- RockChip RK3328, RK3368 and RK3399 SoCs 2239f1622b0SPaul Beesley- Socionext UniPhier SoC family and SynQuacer SC2A11 SoCs 2249f1622b0SPaul Beesley- STMicroelectronics STM32MP1 2259f1622b0SPaul Beesley- Texas Instruments K3 SoCs 2269f1622b0SPaul Beesley- Xilinx Versal and Zynq UltraScale + MPSoC 2279f1622b0SPaul Beesley 2289f1622b0SPaul BeesleyStill to come 2299f1622b0SPaul Beesley------------- 2309f1622b0SPaul Beesley 2319f1622b0SPaul Beesley- Support for additional platforms. 2329f1622b0SPaul Beesley 2339f1622b0SPaul Beesley- Refinements to Position Independent Executable (PIE) support. 2349f1622b0SPaul Beesley 2359f1622b0SPaul Beesley- Refinements to the SPCI-based SPM implementation as the draft SPCI and SPRT 2369f1622b0SPaul Beesley specifications continue to evolve. 2379f1622b0SPaul Beesley 2389f1622b0SPaul Beesley- Documentation enhancements. 2399f1622b0SPaul Beesley 2409f1622b0SPaul Beesley- Ongoing support for new architectural features, CPUs and System IP. 2419f1622b0SPaul Beesley 2429f1622b0SPaul Beesley- Ongoing support for new Arm system architecture specifications. 2439f1622b0SPaul Beesley 2449f1622b0SPaul Beesley- Ongoing security hardening, optimization and quality improvements. 2459f1622b0SPaul Beesley 246*34760951SPaul BeesleyFor a full list of detailed issues in the current code, please see the 247*34760951SPaul Beesley:ref:`Change Log & Release Notes` and the `issue tracker`_. 2489f1622b0SPaul Beesley 2499f1622b0SPaul BeesleyGetting started 2509f1622b0SPaul Beesley--------------- 2519f1622b0SPaul Beesley 252*34760951SPaul BeesleySee the :ref:`User Guide` for instructions on how to download, install, build 253*34760951SPaul Beesleyand use TF-A with the Arm `FVP`_\ s. 2549f1622b0SPaul Beesley 255*34760951SPaul BeesleySee the :ref:`Firmware Design` for information on how TF-A works. 2569f1622b0SPaul Beesley 257*34760951SPaul BeesleySee the :ref:`Porting Guide` as well for information about how to use this 2589f1622b0SPaul Beesleysoftware on another Armv7-A or Armv8-A platform. 2599f1622b0SPaul Beesley 260*34760951SPaul BeesleySee the :ref:`Contributor's Guide` for information on how to contribute to this 261*34760951SPaul Beesleyproject and the :ref:`Contributor Acknowledgements` file for a list of 262*34760951SPaul Beesleycontributors to the project. 2639f1622b0SPaul Beesley 264*34760951SPaul BeesleyContact Us 265d2944096SJohn Tsichritzis~~~~~~~~~~ 2669f1622b0SPaul Beesley 267d2944096SJohn TsichritzisWe welcome any feedback on TF-A. If you think you have found a security 2689f1622b0SPaul Beesleyvulnerability, please report this using the process defined in the TF-A 269*34760951SPaul Beesley:ref:`Security Handling` document. 270*34760951SPaul Beesley 271*34760951SPaul BeesleyFor all other feedback, please use the `issue tracker`_ or our `mailing list`_. 2729f1622b0SPaul Beesley 2739f1622b0SPaul BeesleyArm licensees may contact Arm directly via their partner managers. 2749f1622b0SPaul Beesley 2759f1622b0SPaul Beesley-------------- 2769f1622b0SPaul Beesley 2779f1622b0SPaul Beesley*Copyright (c) 2013-2019, Arm Limited and Contributors. All rights reserved.* 2789f1622b0SPaul Beesley 2799f1622b0SPaul Beesley.. _Armv7-A and Armv8-A: https://developer.arm.com/products/architecture/a-profile 2809f1622b0SPaul Beesley.. _Secure Monitor: http://www.arm.com/products/processors/technologies/trustzone/tee-smc.php 2819f1622b0SPaul Beesley.. _Power State Coordination Interface (PSCI): PSCI_ 2829f1622b0SPaul Beesley.. _PSCI: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf 2839f1622b0SPaul Beesley.. _Trusted Board Boot Requirements CLIENT (TBBR-CLIENT): https://developer.arm.com/docs/den0006/latest/trusted-board-boot-requirements-client-tbbr-client-armv8-a 2849f1622b0SPaul Beesley.. _SMC Calling Convention: http://infocenter.arm.com/help/topic/com.arm.doc.den0028b/ARM_DEN0028B_SMC_Calling_Convention.pdf 2859f1622b0SPaul Beesley.. _System Control and Management Interface (SCMI): SCMI_ 2869f1622b0SPaul Beesley.. _SCMI: http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/DEN0056A_System_Control_and_Management_Interface.pdf 2879f1622b0SPaul Beesley.. _Software Delegated Exception Interface (SDEI): SDEI_ 2889f1622b0SPaul Beesley.. _SDEI: http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf 2899f1622b0SPaul Beesley.. _Juno Arm Development Platform: http://www.arm.com/products/tools/development-boards/versatile-express/juno-arm-development-platform.php 2909f1622b0SPaul Beesley.. _Arm FVP website: FVP_ 2919f1622b0SPaul Beesley.. _FVP: https://developer.arm.com/products/system-design/fixed-virtual-platforms 2929f1622b0SPaul Beesley.. _Linaro Release 18.04: https://community.arm.com/dev-platforms/b/documents/posts/linaro-release-notes-deprecated#LinaroRelease18.04 2939f1622b0SPaul Beesley.. _OP-TEE Secure OS: https://github.com/OP-TEE/optee_os 2949f1622b0SPaul Beesley.. _NVIDIA Trusted Little Kernel: http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/ote_partner/tlk.git;a=summary 2959f1622b0SPaul Beesley.. _Trusty Secure OS: https://source.android.com/security/trusty 2969f1622b0SPaul Beesley.. _trustedfirmware.org: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git 2979f1622b0SPaul Beesley.. _issue tracker: https://issues.trustedfirmware.org 298d2944096SJohn Tsichritzis.. _mailing list: https://lists.trustedfirmware.org/mailman/listinfo/tf-a 299