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 366f625747SDouglas Raillard- The libfdt source code is dual licensed. It is used by this project under 376f625747SDouglas Raillard the terms of the BSD-2-Clause license. 386f625747SDouglas Raillard 394bf3349bSDan Handley- The LLVM compiler-rt source code is dual licensed. It is used by this 40bbd90710SDan Handley project under the terms of the NCSA license (also known as the University of 41bbd90710SDan Handley Illinois/NCSA Open Source License). 424bf3349bSDan Handley 435b0b7276SDan Handley- The zlib source code is licensed under the Zlib license, which is a 445b0b7276SDan Handley permissive license compatible with BSD-3-Clause. 455b0b7276SDan Handley 465b0b7276SDan HandleyThis release 476f625747SDouglas Raillard------------ 486f625747SDouglas Raillard 496f625747SDouglas RaillardThis release provides a suitable starting point for productization of secure 504bf3349bSDan Handleyworld boot and runtime firmware, in either the AArch32 or AArch64 execution 514bf3349bSDan Handleystate. 526f625747SDouglas Raillard 536f625747SDouglas RaillardUsers are encouraged to do their own security validation, including penetration 544def07d5SDan Handleytesting, on any secure world code derived from TF-A. 556f625747SDouglas Raillard 566f625747SDouglas RaillardFunctionality 576f625747SDouglas Raillard~~~~~~~~~~~~~ 586f625747SDouglas Raillard 594bf3349bSDan Handley- Initialization of the secure world, for example exception vectors, control 604bf3349bSDan Handley registers and interrupts for the platform. 616f625747SDouglas Raillard 626f625747SDouglas Raillard- Library support for CPU specific reset and power down sequences. This 634def07d5SDan Handley includes support for errata workarounds and the latest Arm DynamIQ CPUs. 646f625747SDouglas Raillard 654def07d5SDan Handley- Drivers to enable standard initialization of Arm System IP, for example 664bf3349bSDan Handley Generic Interrupt Controller (GIC), Cache Coherent Interconnect (CCI), 674bf3349bSDan Handley Cache Coherent Network (CCN), Network Interconnect (NIC) and TrustZone 684bf3349bSDan Handley Controller (TZC). 696f625747SDouglas Raillard 704bf3349bSDan Handley- A generic `SCMI`_ driver to interface with conforming power controllers, for 714def07d5SDan Handley example the Arm System Control Processor (SCP). 726f625747SDouglas Raillard 734bf3349bSDan Handley- SMC (Secure Monitor Call) handling, conforming to the `SMC Calling 744bf3349bSDan Handley Convention`_ using an EL3 runtime services framework. 756f625747SDouglas Raillard 764bf3349bSDan Handley- `PSCI`_ library support for CPU, cluster and system power management 774bf3349bSDan Handley use-cases. 784bf3349bSDan Handley This library is pre-integrated with the AArch64 EL3 Runtime Software, and 794bf3349bSDan Handley is also suitable for integration with other AArch32 EL3 Runtime Software, 804bf3349bSDan Handley for example an AArch32 Secure OS. 814bf3349bSDan Handley 824bf3349bSDan Handley- A minimal AArch32 Secure Payload (SP\_MIN) to demonstrate `PSCI`_ library 834bf3349bSDan Handley integration with AArch32 EL3 Runtime Software. 846f625747SDouglas Raillard 856f625747SDouglas Raillard- Secure Monitor library code such as world switching, EL1 context management 866f625747SDouglas Raillard and interrupt routing. 874bf3349bSDan Handley When a Secure-EL1 Payload (SP) is present, for example a Secure OS, the 884bf3349bSDan Handley AArch64 EL3 Runtime Software must be integrated with a dispatcher component 894bf3349bSDan Handley (SPD) to customize the interaction with the SP. 906f625747SDouglas Raillard 914bf3349bSDan Handley- A Test SP/SPD to demonstrate AArch64 Secure Monitor functionality and SP 924bf3349bSDan Handley interaction with PSCI. 936f625747SDouglas Raillard 944bf3349bSDan Handley- SPDs for the `OP-TEE Secure OS`_, `NVidia Trusted Little Kernel`_ 954bf3349bSDan Handley and `Trusty Secure OS`_. 966f625747SDouglas Raillard 976f625747SDouglas Raillard- A Trusted Board Boot implementation, conforming to all mandatory TBBR 984bf3349bSDan Handley requirements. This includes image authentication, Firmware Update (or 994bf3349bSDan Handley recovery mode), and packaging of the various firmware images into a 1004bf3349bSDan Handley Firmware Image Package (FIP). 1016f625747SDouglas Raillard 1025b0b7276SDan Handley- Pre-integration of TBB with the Arm CryptoCell product, to take advantage of 1035b0b7276SDan Handley its hardware Root of Trust and crypto acceleration services. 1045b0b7276SDan Handley 1055b0b7276SDan Handley- Reliability, Availability, and Serviceability (RAS) functionality, including 1065b0b7276SDan Handley 1075b0b7276SDan Handley - A Secure Partition Manager (SPM) to manage Secure Partitions in 1085b0b7276SDan Handley Secure-EL0, which can be used to implement simple management and 1095b0b7276SDan Handley security services. 1105b0b7276SDan Handley 1115b0b7276SDan Handley - An SDEI dispatcher to route interrupt-based SDEI events. 1125b0b7276SDan Handley 1135b0b7276SDan Handley - An Exception Handling Framework (EHF) that allows dispatching of EL3 1145b0b7276SDan Handley interrupts to their registered handlers, to facilitate firmware-first 1155b0b7276SDan Handley error handling. 1165b0b7276SDan Handley 1175b0b7276SDan Handley- A dynamic configuration framework that enables each of the firmware images 1185b0b7276SDan Handley to be configured at runtime if required by the platform. It also enables 1195b0b7276SDan Handley loading of a hardware configuration (for example, a kernel device tree) 1205b0b7276SDan Handley as part of the FIP, to be passed through the firmware stages. 1214bf3349bSDan Handley 1224bf3349bSDan Handley- Support for alternative boot flows, for example to support platforms where 1234bf3349bSDan Handley the EL3 Runtime Software is loaded using other firmware or a separate 1245b0b7276SDan Handley secure system processor, or where a non-TF-A ROM expects BL2 to be loaded 1255b0b7276SDan Handley at EL3. 1264bf3349bSDan Handley 1274def07d5SDan Handley- Support for the GCC, LLVM and Arm Compiler 6 toolchains. 1286f625747SDouglas Raillard 1296f625747SDouglas RaillardFor a full description of functionality and implementation details, please 1306f625747SDouglas Raillardsee the `Firmware Design`_ and supporting documentation. The `Change Log`_ 1316f625747SDouglas Raillardprovides details of changes made since the last release. 1326f625747SDouglas Raillard 1336f625747SDouglas RaillardPlatforms 1346f625747SDouglas Raillard~~~~~~~~~ 1356f625747SDouglas Raillard 1364bf3349bSDan HandleyVarious AArch32 and AArch64 builds of this release has been tested on variants 1374def07d5SDan Handleyr0, r1 and r2 of the `Juno Arm Development Platform`_. 1386f625747SDouglas Raillard 1394def07d5SDan HandleyVarious AArch64 builds of this release have been tested on the following Arm 1405b0b7276SDan HandleyFixed Virtual Platforms (`FVP`_) without shifted affinities, and that do not 1415b0b7276SDan Handleysupport threaded CPU cores (64-bit host machine only): 1426f625747SDouglas Raillard 1435b0b7276SDan HandleyNOTE: Unless otherwise stated, the FVP Version is 11.2 Build 11.2.33. 1446f625747SDouglas Raillard 1454bf3349bSDan Handley- ``Foundation_Platform`` 1465b0b7276SDan Handley- ``FVP_Base_AEMv8A-AEMv8A`` (and also Version 9.0, Build 0.8.9005) 1474bf3349bSDan Handley- ``FVP_Base_Cortex-A35x4`` 1484bf3349bSDan Handley- ``FVP_Base_Cortex-A53x4`` 1494bf3349bSDan Handley- ``FVP_Base_Cortex-A57x4-A53x4`` 1504bf3349bSDan Handley- ``FVP_Base_Cortex-A57x4`` 1514bf3349bSDan Handley- ``FVP_Base_Cortex-A72x4-A53x4`` 1524bf3349bSDan Handley- ``FVP_Base_Cortex-A72x4`` 1534bf3349bSDan Handley- ``FVP_Base_Cortex-A73x4-A53x4`` 1544bf3349bSDan Handley- ``FVP_Base_Cortex-A73x4`` 1555b0b7276SDan Handley 1565b0b7276SDan HandleyAdditionally, various AArch64 builds were tested on the following Arm `FVP`_ s 1575b0b7276SDan Handleywith shifted affinities, supporting threaded CPU cores (64-bit host machine 1585b0b7276SDan Handleyonly). 1595b0b7276SDan Handley 1605b0b7276SDan Handley- ``FVP_Base_Cortex-A55x4-A75x4`` (Version 0.0, build 0.0.4395) 1615b0b7276SDan Handley- ``FVP_Base_Cortex-A55x4`` (Version 0.0, build 0.0.4395) 1625b0b7276SDan Handley- ``FVP_Base_Cortex-A75x4`` (Version 0.0, build 0.0.4395) 1635b0b7276SDan Handley- ``FVP_Base_RevC-2xAEMv8A`` 1646f625747SDouglas Raillard 1654def07d5SDan HandleyVarious AArch32 builds of this release has been tested on the following Arm 1665b0b7276SDan Handley`FVP`_\ s without shifted affinities, and that do not support threaded CPU cores 1675b0b7276SDan Handley(64-bit host machine only): 1684bf3349bSDan Handley 1695b0b7276SDan Handley- ``FVP_Base_AEMv8A-AEMv8A`` 1704bf3349bSDan Handley- ``FVP_Base_Cortex-A32x4`` 1716f625747SDouglas Raillard 1726f625747SDouglas RaillardThe Foundation FVP can be downloaded free of charge. The Base FVPs can be 1734def07d5SDan Handleylicensed from Arm. See the `Arm FVP website`_. 1744bf3349bSDan Handley 1755b0b7276SDan HandleyAll the above platforms have been tested with `Linaro Release 17.10`_. 1766f625747SDouglas Raillard 1776f625747SDouglas RaillardThis release also contains the following platform support: 1786f625747SDouglas Raillard 1795b0b7276SDan Handley- HiKey, HiKey960 and Poplar boards 1806f625747SDouglas Raillard- MediaTek MT6795 and MT8173 SoCs 1814bf3349bSDan Handley- NVidia T132, T186 and T210 SoCs 1826f625747SDouglas Raillard- QEMU emulator 1835b0b7276SDan Handley- Raspberry Pi 3 board 1844bf3349bSDan Handley- RockChip RK3328, RK3368 and RK3399 SoCs 185150c38e8SSumit Garg- Socionext UniPhier SoC family and SynQuacer SC2A11 SoCs 1861841c533SNishanth Menon- Texas Instruments K3 SoCs 1876f625747SDouglas Raillard- Xilinx Zynq UltraScale + MPSoC 1886f625747SDouglas Raillard 1895b0b7276SDan HandleyStill to come 1906f625747SDouglas Raillard~~~~~~~~~~~~~ 1916f625747SDouglas Raillard 1926f625747SDouglas Raillard- More platform support. 1936f625747SDouglas Raillard 1945b0b7276SDan Handley- Improved dynamic configuration support. 1955b0b7276SDan Handley 1966f625747SDouglas Raillard- Ongoing support for new architectural features, CPUs and System IP. 1976f625747SDouglas Raillard 1985b0b7276SDan Handley- Ongoing support for new Arm system architecture specifications. 1996f625747SDouglas Raillard 2006f625747SDouglas Raillard- Ongoing security hardening, optimization and quality improvements. 2016f625747SDouglas Raillard 2024bf3349bSDan HandleyFor a full list of detailed issues in the current code, please see the `Change 2034bf3349bSDan HandleyLog`_ and the `GitHub issue tracker`_. 2046f625747SDouglas Raillard 2055b0b7276SDan HandleyGetting started 2066f625747SDouglas Raillard--------------- 2076f625747SDouglas Raillard 2084def07d5SDan HandleyGet the TF-A source code from `GitHub`_. 2096f625747SDouglas Raillard 2106f625747SDouglas RaillardSee the `User Guide`_ for instructions on how to install, build and use 2114def07d5SDan Handleythe TF-A with the Arm `FVP`_\ s. 2126f625747SDouglas Raillard 2134def07d5SDan HandleySee the `Firmware Design`_ for information on how the TF-A works. 2146f625747SDouglas Raillard 2156f625747SDouglas RaillardSee the `Porting Guide`_ as well for information about how to use this 2165b0b7276SDan Handleysoftware on another Armv7-A or Armv8-A platform. 2176f625747SDouglas Raillard 2186f625747SDouglas RaillardSee the `Contributing Guidelines`_ for information on how to contribute to this 2196f625747SDouglas Raillardproject and the `Acknowledgments`_ file for a list of contributors to the 2206f625747SDouglas Raillardproject. 2216f625747SDouglas Raillard 222*8dd7bc6eSDimitris PapastamosIRC channel 223*8dd7bc6eSDimitris Papastamos~~~~~~~~~~~ 224*8dd7bc6eSDimitris Papastamos 225*8dd7bc6eSDimitris PapastamosDevelopment discussion takes place on the #trusted-firmware-a channel 226*8dd7bc6eSDimitris Papastamoson the Freenode IRC network. This is not an official support channel. 227*8dd7bc6eSDimitris PapastamosIf you have an issue to raise, please use the `GitHub issue tracker`_. 228*8dd7bc6eSDimitris Papastamos 2296f625747SDouglas RaillardFeedback and support 2306f625747SDouglas Raillard~~~~~~~~~~~~~~~~~~~~ 2316f625747SDouglas Raillard 2324def07d5SDan HandleyArm welcomes any feedback on TF-A. If you think you have found a security 2334def07d5SDan Handleyvulnerability, please report this using the process defined in the TF-A 2344def07d5SDan Handley`Security Centre`_. For all other feedback, please use the 2354bf3349bSDan Handley`GitHub issue tracker`_. 2366f625747SDouglas Raillard 2374def07d5SDan HandleyArm licensees may contact Arm directly via their partner managers. 2386f625747SDouglas Raillard 2396f625747SDouglas Raillard-------------- 2406f625747SDouglas Raillard 2414def07d5SDan Handley*Copyright (c) 2013-2018, Arm Limited and Contributors. All rights reserved.* 2426f625747SDouglas Raillard 2435b0b7276SDan Handley.. _Armv7-A and Armv8-A: https://developer.arm.com/products/architecture/a-profile 2446f625747SDouglas Raillard.. _Secure Monitor: http://www.arm.com/products/processors/technologies/trustzone/tee-smc.php 2454bf3349bSDan Handley.. _Power State Coordination Interface (PSCI): PSCI_ 2464bf3349bSDan Handley.. _PSCI: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf 2474bf3349bSDan Handley.. _SMC Calling Convention: http://infocenter.arm.com/help/topic/com.arm.doc.den0028b/ARM_DEN0028B_SMC_Calling_Convention.pdf 2484bf3349bSDan Handley.. _System Control and Management Interface: SCMI_ 2494bf3349bSDan Handley.. _SCMI: http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/DEN0056A_System_Control_and_Management_Interface.pdf 250ed811260Sdanh-arm.. _Software Delegated Exception Interface (SDEI): SDEI_ 2515b0b7276SDan Handley.. _SDEI: http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf 2524def07d5SDan Handley.. _Juno Arm Development Platform: http://www.arm.com/products/tools/development-boards/versatile-express/juno-arm-development-platform.php 2534def07d5SDan Handley.. _Arm FVP website: FVP_ 2544bf3349bSDan Handley.. _FVP: https://developer.arm.com/products/system-design/fixed-virtual-platforms 2555b0b7276SDan Handley.. _Linaro Release 17.10: https://community.arm.com/dev-platforms/b/documents/posts/linaro-release-notes-deprecated#LinaroRelease17.10 2566f625747SDouglas Raillard.. _OP-TEE Secure OS: https://github.com/OP-TEE/optee_os 2576f625747SDouglas Raillard.. _NVidia Trusted Little Kernel: http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/ote_partner/tlk.git;a=summary 2584bf3349bSDan Handley.. _Trusty Secure OS: https://source.android.com/security/trusty 2594bf3349bSDan Handley.. _GitHub: https://www.github.com/ARM-software/arm-trusted-firmware 2604bf3349bSDan Handley.. _GitHub issue tracker: https://github.com/ARM-software/tf-issues/issues 2614bf3349bSDan Handley.. _Security Centre: https://github.com/ARM-software/arm-trusted-firmware/wiki/ARM-Trusted-Firmware-Security-Centre 2624bf3349bSDan Handley.. _license: ./license.rst 2634bf3349bSDan Handley.. _Contributing Guidelines: ./contributing.rst 2644bf3349bSDan Handley.. _Acknowledgments: ./acknowledgements.rst 2656f625747SDouglas Raillard.. _Firmware Design: ./docs/firmware-design.rst 2666f625747SDouglas Raillard.. _Change Log: ./docs/change-log.rst 2676f625747SDouglas Raillard.. _User Guide: ./docs/user-guide.rst 2686f625747SDouglas Raillard.. _Porting Guide: ./docs/porting-guide.rst 269