15b0b7276SDan HandleyTrusted Firmware-A - version 1.5 24def07d5SDan Handley================================ 36f625747SDouglas Raillard 44def07d5SDan HandleyTrusted Firmware-A (TF-A) provides a reference implementation of secure world 55b0b7276SDan Handleysoftware for `Armv7-A and Armv8-A`_, including a `Secure Monitor`_ executing 65b0b7276SDan Handleyat Exception Level 3 (EL3). It implements various Arm interface standards, 75b0b7276SDan Handleysuch as: 84bf3349bSDan Handley 94bf3349bSDan Handley- The `Power State Coordination Interface (PSCI)`_ 104def07d5SDan Handley- Trusted Board Boot Requirements (TBBR, Arm DEN0006C-1) 114bf3349bSDan Handley- `SMC Calling Convention`_ 124bf3349bSDan Handley- `System Control and Management Interface`_ 135b0b7276SDan Handley- `Software Delegated Exception Interface (SDEI)`_ 144bf3349bSDan Handley 155b0b7276SDan HandleyWhere possible, the code is designed for reuse or porting to other Armv7-A and 165b0b7276SDan HandleyArmv8-A model and hardware platforms. 176f625747SDouglas Raillard 184def07d5SDan HandleyArm will continue development in collaboration with interested parties to 194def07d5SDan Handleyprovide a full reference implementation of Secure Monitor code and Arm standards 205b0b7276SDan Handleyto the benefit of all developers working with Armv7-A and Armv8-A TrustZone 215b0b7276SDan Handleytechnology. 226f625747SDouglas Raillard 236f625747SDouglas RaillardLicense 246f625747SDouglas Raillard------- 256f625747SDouglas Raillard 266f625747SDouglas RaillardThe software is provided under a BSD-3-Clause `license`_. Contributions to this 276f625747SDouglas Raillardproject are accepted under the same license with developer sign-off as 286f625747SDouglas Raillarddescribed in the `Contributing Guidelines`_. 296f625747SDouglas Raillard 306f625747SDouglas RaillardThis project contains code from other projects as listed below. The original 316f625747SDouglas Raillardlicense text is included in those source files. 326f625747SDouglas Raillard 33bbd90710SDan Handley- The stdlib source code is derived from FreeBSD code, which uses various 34bbd90710SDan Handley BSD licenses, including BSD-3-Clause and BSD-2-Clause. 356f625747SDouglas Raillard 36*327cfc27SDan Handley- The libfdt source code is disjunctively dual licensed 37*327cfc27SDan Handley (GPL-2.0+ OR BSD-2-Clause). It is used by this project under the terms of 38*327cfc27SDan Handley the BSD-2-Clause license. Any contributions to this code must be made under 39*327cfc27SDan Handley the terms of both licenses. 406f625747SDouglas Raillard 41*327cfc27SDan Handley- The LLVM compiler-rt source code is disjunctively dual licensed 42*327cfc27SDan Handley (NCSA OR MIT). It is used by this project under the terms of the NCSA 43*327cfc27SDan Handley license (also known as the University of Illinois/NCSA Open Source License), 44*327cfc27SDan Handley which is a permissive license compatible with BSD-3-Clause. Any 45*327cfc27SDan Handley contributions to this code must be made under the terms of both licenses. 464bf3349bSDan Handley 475b0b7276SDan Handley- The zlib source code is licensed under the Zlib license, which is a 485b0b7276SDan Handley permissive license compatible with BSD-3-Clause. 495b0b7276SDan Handley 50*327cfc27SDan Handley- Some STMicroelectronics platform source code is disjunctively dual licensed 51*327cfc27SDan Handley (GPL-2.0+ OR BSD-3-Clause). It is used by this project under the terms of the 52*327cfc27SDan Handley BSD-3-Clause license. Any contributions to this code must be made under the 53*327cfc27SDan Handley terms of both licenses. 54*327cfc27SDan Handley 555b0b7276SDan HandleyThis release 566f625747SDouglas Raillard------------ 576f625747SDouglas Raillard 586f625747SDouglas RaillardThis release provides a suitable starting point for productization of secure 594bf3349bSDan Handleyworld boot and runtime firmware, in either the AArch32 or AArch64 execution 604bf3349bSDan Handleystate. 616f625747SDouglas Raillard 626f625747SDouglas RaillardUsers are encouraged to do their own security validation, including penetration 634def07d5SDan Handleytesting, on any secure world code derived from TF-A. 646f625747SDouglas Raillard 656f625747SDouglas RaillardFunctionality 666f625747SDouglas Raillard~~~~~~~~~~~~~ 676f625747SDouglas Raillard 684bf3349bSDan Handley- Initialization of the secure world, for example exception vectors, control 694bf3349bSDan Handley registers and interrupts for the platform. 706f625747SDouglas Raillard 716f625747SDouglas Raillard- Library support for CPU specific reset and power down sequences. This 724def07d5SDan Handley includes support for errata workarounds and the latest Arm DynamIQ CPUs. 736f625747SDouglas Raillard 744def07d5SDan Handley- Drivers to enable standard initialization of Arm System IP, for example 754bf3349bSDan Handley Generic Interrupt Controller (GIC), Cache Coherent Interconnect (CCI), 764bf3349bSDan Handley Cache Coherent Network (CCN), Network Interconnect (NIC) and TrustZone 774bf3349bSDan Handley Controller (TZC). 786f625747SDouglas Raillard 794bf3349bSDan Handley- A generic `SCMI`_ driver to interface with conforming power controllers, for 804def07d5SDan Handley example the Arm System Control Processor (SCP). 816f625747SDouglas Raillard 824bf3349bSDan Handley- SMC (Secure Monitor Call) handling, conforming to the `SMC Calling 834bf3349bSDan Handley Convention`_ using an EL3 runtime services framework. 846f625747SDouglas Raillard 854bf3349bSDan Handley- `PSCI`_ library support for CPU, cluster and system power management 864bf3349bSDan Handley use-cases. 874bf3349bSDan Handley This library is pre-integrated with the AArch64 EL3 Runtime Software, and 884bf3349bSDan Handley is also suitable for integration with other AArch32 EL3 Runtime Software, 894bf3349bSDan Handley for example an AArch32 Secure OS. 904bf3349bSDan Handley 914bf3349bSDan Handley- A minimal AArch32 Secure Payload (SP\_MIN) to demonstrate `PSCI`_ library 924bf3349bSDan Handley integration with AArch32 EL3 Runtime Software. 936f625747SDouglas Raillard 946f625747SDouglas Raillard- Secure Monitor library code such as world switching, EL1 context management 956f625747SDouglas Raillard and interrupt routing. 964bf3349bSDan Handley When a Secure-EL1 Payload (SP) is present, for example a Secure OS, the 974bf3349bSDan Handley AArch64 EL3 Runtime Software must be integrated with a dispatcher component 984bf3349bSDan Handley (SPD) to customize the interaction with the SP. 996f625747SDouglas Raillard 1004bf3349bSDan Handley- A Test SP/SPD to demonstrate AArch64 Secure Monitor functionality and SP 1014bf3349bSDan Handley interaction with PSCI. 1026f625747SDouglas Raillard 1034bf3349bSDan Handley- SPDs for the `OP-TEE Secure OS`_, `NVidia Trusted Little Kernel`_ 1044bf3349bSDan Handley and `Trusty Secure OS`_. 1056f625747SDouglas Raillard 1066f625747SDouglas Raillard- A Trusted Board Boot implementation, conforming to all mandatory TBBR 1074bf3349bSDan Handley requirements. This includes image authentication, Firmware Update (or 1084bf3349bSDan Handley recovery mode), and packaging of the various firmware images into a 1094bf3349bSDan Handley Firmware Image Package (FIP). 1106f625747SDouglas Raillard 1115b0b7276SDan Handley- Pre-integration of TBB with the Arm CryptoCell product, to take advantage of 1125b0b7276SDan Handley its hardware Root of Trust and crypto acceleration services. 1135b0b7276SDan Handley 1145b0b7276SDan Handley- Reliability, Availability, and Serviceability (RAS) functionality, including 1155b0b7276SDan Handley 1165b0b7276SDan Handley - A Secure Partition Manager (SPM) to manage Secure Partitions in 1175b0b7276SDan Handley Secure-EL0, which can be used to implement simple management and 1185b0b7276SDan Handley security services. 1195b0b7276SDan Handley 1205b0b7276SDan Handley - An SDEI dispatcher to route interrupt-based SDEI events. 1215b0b7276SDan Handley 1225b0b7276SDan Handley - An Exception Handling Framework (EHF) that allows dispatching of EL3 1235b0b7276SDan Handley interrupts to their registered handlers, to facilitate firmware-first 1245b0b7276SDan Handley error handling. 1255b0b7276SDan Handley 1265b0b7276SDan Handley- A dynamic configuration framework that enables each of the firmware images 1275b0b7276SDan Handley to be configured at runtime if required by the platform. It also enables 1285b0b7276SDan Handley loading of a hardware configuration (for example, a kernel device tree) 1295b0b7276SDan Handley as part of the FIP, to be passed through the firmware stages. 1304bf3349bSDan Handley 1314bf3349bSDan Handley- Support for alternative boot flows, for example to support platforms where 1324bf3349bSDan Handley the EL3 Runtime Software is loaded using other firmware or a separate 1335b0b7276SDan Handley secure system processor, or where a non-TF-A ROM expects BL2 to be loaded 1345b0b7276SDan Handley at EL3. 1354bf3349bSDan Handley 1364def07d5SDan Handley- Support for the GCC, LLVM and Arm Compiler 6 toolchains. 1376f625747SDouglas Raillard 1386f625747SDouglas RaillardFor a full description of functionality and implementation details, please 1396f625747SDouglas Raillardsee the `Firmware Design`_ and supporting documentation. The `Change Log`_ 1406f625747SDouglas Raillardprovides details of changes made since the last release. 1416f625747SDouglas Raillard 1426f625747SDouglas RaillardPlatforms 1436f625747SDouglas Raillard~~~~~~~~~ 1446f625747SDouglas Raillard 1454bf3349bSDan HandleyVarious AArch32 and AArch64 builds of this release has been tested on variants 1464def07d5SDan Handleyr0, r1 and r2 of the `Juno Arm Development Platform`_. 1476f625747SDouglas Raillard 1484def07d5SDan HandleyVarious AArch64 builds of this release have been tested on the following Arm 1495b0b7276SDan HandleyFixed Virtual Platforms (`FVP`_) without shifted affinities, and that do not 1505b0b7276SDan Handleysupport threaded CPU cores (64-bit host machine only): 1516f625747SDouglas Raillard 1525b0b7276SDan HandleyNOTE: Unless otherwise stated, the FVP Version is 11.2 Build 11.2.33. 1536f625747SDouglas Raillard 1544bf3349bSDan Handley- ``Foundation_Platform`` 1555b0b7276SDan Handley- ``FVP_Base_AEMv8A-AEMv8A`` (and also Version 9.0, Build 0.8.9005) 1564bf3349bSDan Handley- ``FVP_Base_Cortex-A35x4`` 1574bf3349bSDan Handley- ``FVP_Base_Cortex-A53x4`` 1584bf3349bSDan Handley- ``FVP_Base_Cortex-A57x4-A53x4`` 1594bf3349bSDan Handley- ``FVP_Base_Cortex-A57x4`` 1604bf3349bSDan Handley- ``FVP_Base_Cortex-A72x4-A53x4`` 1614bf3349bSDan Handley- ``FVP_Base_Cortex-A72x4`` 1624bf3349bSDan Handley- ``FVP_Base_Cortex-A73x4-A53x4`` 1634bf3349bSDan Handley- ``FVP_Base_Cortex-A73x4`` 1645b0b7276SDan Handley 1655b0b7276SDan HandleyAdditionally, various AArch64 builds were tested on the following Arm `FVP`_ s 1665b0b7276SDan Handleywith shifted affinities, supporting threaded CPU cores (64-bit host machine 1675b0b7276SDan Handleyonly). 1685b0b7276SDan Handley 1695b0b7276SDan Handley- ``FVP_Base_Cortex-A55x4-A75x4`` (Version 0.0, build 0.0.4395) 1705b0b7276SDan Handley- ``FVP_Base_Cortex-A55x4`` (Version 0.0, build 0.0.4395) 1715b0b7276SDan Handley- ``FVP_Base_Cortex-A75x4`` (Version 0.0, build 0.0.4395) 1725b0b7276SDan Handley- ``FVP_Base_RevC-2xAEMv8A`` 1736f625747SDouglas Raillard 1744def07d5SDan HandleyVarious AArch32 builds of this release has been tested on the following Arm 1755b0b7276SDan Handley`FVP`_\ s without shifted affinities, and that do not support threaded CPU cores 1765b0b7276SDan Handley(64-bit host machine only): 1774bf3349bSDan Handley 1785b0b7276SDan Handley- ``FVP_Base_AEMv8A-AEMv8A`` 1794bf3349bSDan Handley- ``FVP_Base_Cortex-A32x4`` 1806f625747SDouglas Raillard 1816f625747SDouglas RaillardThe Foundation FVP can be downloaded free of charge. The Base FVPs can be 1824def07d5SDan Handleylicensed from Arm. See the `Arm FVP website`_. 1834bf3349bSDan Handley 1845b0b7276SDan HandleyAll the above platforms have been tested with `Linaro Release 17.10`_. 1856f625747SDouglas Raillard 1866f625747SDouglas RaillardThis release also contains the following platform support: 1876f625747SDouglas Raillard 1885b0b7276SDan Handley- HiKey, HiKey960 and Poplar boards 1896f625747SDouglas Raillard- MediaTek MT6795 and MT8173 SoCs 1904bf3349bSDan Handley- NVidia T132, T186 and T210 SoCs 1916f625747SDouglas Raillard- QEMU emulator 1925b0b7276SDan Handley- Raspberry Pi 3 board 1934bf3349bSDan Handley- RockChip RK3328, RK3368 and RK3399 SoCs 194150c38e8SSumit Garg- Socionext UniPhier SoC family and SynQuacer SC2A11 SoCs 1951841c533SNishanth Menon- Texas Instruments K3 SoCs 1966f625747SDouglas Raillard- Xilinx Zynq UltraScale + MPSoC 1976f625747SDouglas Raillard 1985b0b7276SDan HandleyStill to come 1996f625747SDouglas Raillard~~~~~~~~~~~~~ 2006f625747SDouglas Raillard 2016f625747SDouglas Raillard- More platform support. 2026f625747SDouglas Raillard 2035b0b7276SDan Handley- Improved dynamic configuration support. 2045b0b7276SDan Handley 2056f625747SDouglas Raillard- Ongoing support for new architectural features, CPUs and System IP. 2066f625747SDouglas Raillard 2075b0b7276SDan Handley- Ongoing support for new Arm system architecture specifications. 2086f625747SDouglas Raillard 2096f625747SDouglas Raillard- Ongoing security hardening, optimization and quality improvements. 2106f625747SDouglas Raillard 2114bf3349bSDan HandleyFor a full list of detailed issues in the current code, please see the `Change 2124bf3349bSDan HandleyLog`_ and the `GitHub issue tracker`_. 2136f625747SDouglas Raillard 2145b0b7276SDan HandleyGetting started 2156f625747SDouglas Raillard--------------- 2166f625747SDouglas Raillard 2174def07d5SDan HandleyGet the TF-A source code from `GitHub`_. 2186f625747SDouglas Raillard 2196f625747SDouglas RaillardSee the `User Guide`_ for instructions on how to install, build and use 2204def07d5SDan Handleythe TF-A with the Arm `FVP`_\ s. 2216f625747SDouglas Raillard 2224def07d5SDan HandleySee the `Firmware Design`_ for information on how the TF-A works. 2236f625747SDouglas Raillard 2246f625747SDouglas RaillardSee the `Porting Guide`_ as well for information about how to use this 2255b0b7276SDan Handleysoftware on another Armv7-A or Armv8-A platform. 2266f625747SDouglas Raillard 2276f625747SDouglas RaillardSee the `Contributing Guidelines`_ for information on how to contribute to this 2286f625747SDouglas Raillardproject and the `Acknowledgments`_ file for a list of contributors to the 2296f625747SDouglas Raillardproject. 2306f625747SDouglas Raillard 2316f625747SDouglas RaillardFeedback and support 2326f625747SDouglas Raillard~~~~~~~~~~~~~~~~~~~~ 2336f625747SDouglas Raillard 2344def07d5SDan HandleyArm welcomes any feedback on TF-A. If you think you have found a security 2354def07d5SDan Handleyvulnerability, please report this using the process defined in the TF-A 2364def07d5SDan Handley`Security Centre`_. For all other feedback, please use the 2374bf3349bSDan Handley`GitHub issue tracker`_. 2386f625747SDouglas Raillard 2394def07d5SDan HandleyArm licensees may contact Arm directly via their partner managers. 2406f625747SDouglas Raillard 2416f625747SDouglas Raillard-------------- 2426f625747SDouglas Raillard 2434def07d5SDan Handley*Copyright (c) 2013-2018, Arm Limited and Contributors. All rights reserved.* 2446f625747SDouglas Raillard 2455b0b7276SDan Handley.. _Armv7-A and Armv8-A: https://developer.arm.com/products/architecture/a-profile 2466f625747SDouglas Raillard.. _Secure Monitor: http://www.arm.com/products/processors/technologies/trustzone/tee-smc.php 2474bf3349bSDan Handley.. _Power State Coordination Interface (PSCI): PSCI_ 2484bf3349bSDan Handley.. _PSCI: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf 2494bf3349bSDan Handley.. _SMC Calling Convention: http://infocenter.arm.com/help/topic/com.arm.doc.den0028b/ARM_DEN0028B_SMC_Calling_Convention.pdf 2504bf3349bSDan Handley.. _System Control and Management Interface: SCMI_ 2514bf3349bSDan Handley.. _SCMI: http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/DEN0056A_System_Control_and_Management_Interface.pdf 252ed811260Sdanh-arm.. _Software Delegated Exception Interface (SDEI): SDEI_ 2535b0b7276SDan Handley.. _SDEI: http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf 2544def07d5SDan Handley.. _Juno Arm Development Platform: http://www.arm.com/products/tools/development-boards/versatile-express/juno-arm-development-platform.php 2554def07d5SDan Handley.. _Arm FVP website: FVP_ 2564bf3349bSDan Handley.. _FVP: https://developer.arm.com/products/system-design/fixed-virtual-platforms 2575b0b7276SDan Handley.. _Linaro Release 17.10: https://community.arm.com/dev-platforms/b/documents/posts/linaro-release-notes-deprecated#LinaroRelease17.10 2586f625747SDouglas Raillard.. _OP-TEE Secure OS: https://github.com/OP-TEE/optee_os 2596f625747SDouglas Raillard.. _NVidia Trusted Little Kernel: http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/ote_partner/tlk.git;a=summary 2604bf3349bSDan Handley.. _Trusty Secure OS: https://source.android.com/security/trusty 2614bf3349bSDan Handley.. _GitHub: https://www.github.com/ARM-software/arm-trusted-firmware 2624bf3349bSDan Handley.. _GitHub issue tracker: https://github.com/ARM-software/tf-issues/issues 2634bf3349bSDan Handley.. _Security Centre: https://github.com/ARM-software/arm-trusted-firmware/wiki/ARM-Trusted-Firmware-Security-Centre 2644bf3349bSDan Handley.. _license: ./license.rst 2654bf3349bSDan Handley.. _Contributing Guidelines: ./contributing.rst 2664bf3349bSDan Handley.. _Acknowledgments: ./acknowledgements.rst 2676f625747SDouglas Raillard.. _Firmware Design: ./docs/firmware-design.rst 2686f625747SDouglas Raillard.. _Change Log: ./docs/change-log.rst 2696f625747SDouglas Raillard.. _User Guide: ./docs/user-guide.rst 2706f625747SDouglas Raillard.. _Porting Guide: ./docs/porting-guide.rst 271