1f9f26a5aSJoanna FarleyTrusted Firmware-A - version 2.0 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`_ 123c6261bdSPaul Beesley- `System Control and Management Interface (SCMI)`_ 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 3327989a8eSAntonio Nino Diaz- The libc source code is derived from `FreeBSD`_ and `SCC`_. FreeBSD uses 3427989a8eSAntonio Nino Diaz various BSD licenses, including BSD-3-Clause and BSD-2-Clause. The SCC code 3527989a8eSAntonio Nino Diaz is used under the BSD-3-Clause license with the author's permission. 366f625747SDouglas Raillard 37327cfc27SDan Handley- The libfdt source code is disjunctively dual licensed 38327cfc27SDan Handley (GPL-2.0+ OR BSD-2-Clause). It is used by this project under the terms of 39327cfc27SDan Handley the BSD-2-Clause license. Any contributions to this code must be made under 40327cfc27SDan Handley the terms of both licenses. 416f625747SDouglas Raillard 42327cfc27SDan Handley- The LLVM compiler-rt source code is disjunctively dual licensed 43327cfc27SDan Handley (NCSA OR MIT). It is used by this project under the terms of the NCSA 44327cfc27SDan Handley license (also known as the University of Illinois/NCSA Open Source License), 45327cfc27SDan Handley which is a permissive license compatible with BSD-3-Clause. Any 46327cfc27SDan Handley contributions to this code must be made under the terms of both licenses. 474bf3349bSDan Handley 485b0b7276SDan Handley- The zlib source code is licensed under the Zlib license, which is a 495b0b7276SDan Handley permissive license compatible with BSD-3-Clause. 505b0b7276SDan Handley 51327cfc27SDan Handley- Some STMicroelectronics platform source code is disjunctively dual licensed 52327cfc27SDan Handley (GPL-2.0+ OR BSD-3-Clause). It is used by this project under the terms of the 53327cfc27SDan Handley BSD-3-Clause license. Any contributions to this code must be made under the 54327cfc27SDan Handley terms of both licenses. 55327cfc27SDan Handley 565b0b7276SDan HandleyThis release 576f625747SDouglas Raillard------------ 586f625747SDouglas Raillard 596f625747SDouglas RaillardThis release provides a suitable starting point for productization of secure 604bf3349bSDan Handleyworld boot and runtime firmware, in either the AArch32 or AArch64 execution 61*d1ce4469SPaul Beesleystates. 626f625747SDouglas Raillard 636f625747SDouglas RaillardUsers are encouraged to do their own security validation, including penetration 644def07d5SDan Handleytesting, on any secure world code derived from TF-A. 656f625747SDouglas Raillard 666f625747SDouglas RaillardFunctionality 676f625747SDouglas Raillard~~~~~~~~~~~~~ 686f625747SDouglas Raillard 694bf3349bSDan Handley- Initialization of the secure world, for example exception vectors, control 704bf3349bSDan Handley registers and interrupts for the platform. 716f625747SDouglas Raillard 726f625747SDouglas Raillard- Library support for CPU specific reset and power down sequences. This 734def07d5SDan Handley includes support for errata workarounds and the latest Arm DynamIQ CPUs. 746f625747SDouglas Raillard 754def07d5SDan Handley- Drivers to enable standard initialization of Arm System IP, for example 764bf3349bSDan Handley Generic Interrupt Controller (GIC), Cache Coherent Interconnect (CCI), 774bf3349bSDan Handley Cache Coherent Network (CCN), Network Interconnect (NIC) and TrustZone 784bf3349bSDan Handley Controller (TZC). 796f625747SDouglas Raillard 804bf3349bSDan Handley- A generic `SCMI`_ driver to interface with conforming power controllers, for 814def07d5SDan Handley example the Arm System Control Processor (SCP). 826f625747SDouglas Raillard 834bf3349bSDan Handley- SMC (Secure Monitor Call) handling, conforming to the `SMC Calling 844bf3349bSDan Handley Convention`_ using an EL3 runtime services framework. 856f625747SDouglas Raillard 864bf3349bSDan Handley- `PSCI`_ library support for CPU, cluster and system power management 874bf3349bSDan Handley use-cases. 884bf3349bSDan Handley This library is pre-integrated with the AArch64 EL3 Runtime Software, and 894bf3349bSDan Handley is also suitable for integration with other AArch32 EL3 Runtime Software, 904bf3349bSDan Handley for example an AArch32 Secure OS. 914bf3349bSDan Handley 924bf3349bSDan Handley- A minimal AArch32 Secure Payload (SP\_MIN) to demonstrate `PSCI`_ library 934bf3349bSDan Handley integration with AArch32 EL3 Runtime Software. 946f625747SDouglas Raillard 956f625747SDouglas Raillard- Secure Monitor library code such as world switching, EL1 context management 966f625747SDouglas Raillard and interrupt routing. 974bf3349bSDan Handley When a Secure-EL1 Payload (SP) is present, for example a Secure OS, the 98*d1ce4469SPaul Beesley AArch64 EL3 Runtime Software must be integrated with a Secure Payload 99*d1ce4469SPaul Beesley Dispatcher (SPD) component to customize the interaction with the SP. 1006f625747SDouglas Raillard 101*d1ce4469SPaul Beesley- A Test SP and SPD to demonstrate AArch64 Secure Monitor functionality and SP 1024bf3349bSDan Handley interaction with PSCI. 1036f625747SDouglas Raillard 104be8b4d19SPaul Beesley- SPDs for the `OP-TEE Secure OS`_, `NVIDIA Trusted Little Kernel`_ 1054bf3349bSDan Handley and `Trusty Secure OS`_. 1066f625747SDouglas Raillard 1076f625747SDouglas Raillard- A Trusted Board Boot implementation, conforming to all mandatory TBBR 1084bf3349bSDan Handley requirements. This includes image authentication, Firmware Update (or 1094bf3349bSDan Handley recovery mode), and packaging of the various firmware images into a 1104bf3349bSDan Handley Firmware Image Package (FIP). 1116f625747SDouglas Raillard 1125b0b7276SDan Handley- Pre-integration of TBB with the Arm CryptoCell product, to take advantage of 1135b0b7276SDan Handley its hardware Root of Trust and crypto acceleration services. 1145b0b7276SDan Handley 1155b0b7276SDan Handley- Reliability, Availability, and Serviceability (RAS) functionality, including 1165b0b7276SDan Handley 1175b0b7276SDan Handley - A Secure Partition Manager (SPM) to manage Secure Partitions in 1185b0b7276SDan Handley Secure-EL0, which can be used to implement simple management and 1195b0b7276SDan Handley security services. 1205b0b7276SDan Handley 1215b0b7276SDan Handley - An SDEI dispatcher to route interrupt-based SDEI events. 1225b0b7276SDan Handley 1235b0b7276SDan Handley - An Exception Handling Framework (EHF) that allows dispatching of EL3 1245b0b7276SDan Handley interrupts to their registered handlers, to facilitate firmware-first 1255b0b7276SDan Handley error handling. 1265b0b7276SDan Handley 1275b0b7276SDan Handley- A dynamic configuration framework that enables each of the firmware images 1285b0b7276SDan Handley to be configured at runtime if required by the platform. It also enables 1295b0b7276SDan Handley loading of a hardware configuration (for example, a kernel device tree) 1305b0b7276SDan Handley as part of the FIP, to be passed through the firmware stages. 1314bf3349bSDan Handley 1324bf3349bSDan Handley- Support for alternative boot flows, for example to support platforms where 1334bf3349bSDan Handley the EL3 Runtime Software is loaded using other firmware or a separate 1345b0b7276SDan Handley secure system processor, or where a non-TF-A ROM expects BL2 to be loaded 1355b0b7276SDan Handley at EL3. 1364bf3349bSDan Handley 1374def07d5SDan Handley- Support for the GCC, LLVM and Arm Compiler 6 toolchains. 1386f625747SDouglas Raillard 139*d1ce4469SPaul Beesley- Support for combining several libraries into a self-called "romlib" image 140*d1ce4469SPaul Beesley that may be shared across images to reduce memory footprint. The romlib image 141d83bf0bcSJoanna Farley is stored in ROM but is accessed through a jump-table that may be stored 142d83bf0bcSJoanna Farley in read-write memory, allowing for the library code to be patched. 143d83bf0bcSJoanna Farley 1446f625747SDouglas RaillardFor a full description of functionality and implementation details, please 1456f625747SDouglas Raillardsee the `Firmware Design`_ and supporting documentation. The `Change Log`_ 1466f625747SDouglas Raillardprovides details of changes made since the last release. 1476f625747SDouglas Raillard 1486f625747SDouglas RaillardPlatforms 1496f625747SDouglas Raillard~~~~~~~~~ 1506f625747SDouglas Raillard 151*d1ce4469SPaul BeesleyVarious AArch32 and AArch64 builds of this release have been tested on r0, r1 152*d1ce4469SPaul Beesleyand r2 variants of the `Juno Arm Development Platform`_. 1536f625747SDouglas Raillard 1544def07d5SDan HandleyVarious AArch64 builds of this release have been tested on the following Arm 155d83bf0bcSJoanna FarleyFixed Virtual Platforms (`FVP`_) without shifted affinities that do not 1565b0b7276SDan Handleysupport threaded CPU cores (64-bit host machine only): 1576f625747SDouglas Raillard 158d83bf0bcSJoanna FarleyNOTE: Unless otherwise stated, the model version is Version 11.4 Build 37. 1596f625747SDouglas Raillard 160d83bf0bcSJoanna Farley- ``FVP_Base_Aresx4`` 161d83bf0bcSJoanna Farley- ``FVP_Base_AEMv8A-AEMv8A`` 162d83bf0bcSJoanna Farley- ``FVP_Base_AEMv8A-AEMv8A-AEMv8A-AEMv8A-CCN502`` 163d83bf0bcSJoanna Farley- ``FVP_Base_AEMv8A-AEMv8A`` 164d83bf0bcSJoanna Farley- ``FVP_Base_RevC-2xAEMv8A`` 165d83bf0bcSJoanna Farley- ``FVP_Base_Cortex-A32x4`` 1664bf3349bSDan Handley- ``FVP_Base_Cortex-A35x4`` 1674bf3349bSDan Handley- ``FVP_Base_Cortex-A53x4`` 168d83bf0bcSJoanna Farley- ``FVP_Base_Cortex-A55x4+Cortex-A75x4`` 169d83bf0bcSJoanna Farley- ``FVP_Base_Cortex-A55x4`` 1704bf3349bSDan Handley- ``FVP_Base_Cortex-A57x4-A53x4`` 1714bf3349bSDan Handley- ``FVP_Base_Cortex-A57x4`` 1724bf3349bSDan Handley- ``FVP_Base_Cortex-A72x4-A53x4`` 1734bf3349bSDan Handley- ``FVP_Base_Cortex-A72x4`` 1744bf3349bSDan Handley- ``FVP_Base_Cortex-A73x4-A53x4`` 1754bf3349bSDan Handley- ``FVP_Base_Cortex-A73x4`` 176d83bf0bcSJoanna Farley- ``FVP_Base_Cortex-A75x4`` 177d83bf0bcSJoanna Farley- ``FVP_Base_Cortex-A76x4`` 178d83bf0bcSJoanna Farley- ``FVP_CSS_SGI-575`` (Version 11.3 build 40) 179d83bf0bcSJoanna Farley- ``Foundation_Platform`` 1805b0b7276SDan Handley 181d83bf0bcSJoanna FarleyThe latest version of the AArch32 build of TF-A has been tested on the following 182d83bf0bcSJoanna FarleyArm FVPs without shifted affinities that do not support threaded CPU cores 183d83bf0bcSJoanna Farley(64-bit host machine only). 1844bf3349bSDan Handley 1855b0b7276SDan Handley- ``FVP_Base_AEMv8A-AEMv8A`` 1864bf3349bSDan Handley- ``FVP_Base_Cortex-A32x4`` 1876f625747SDouglas Raillard 1886f625747SDouglas RaillardThe Foundation FVP can be downloaded free of charge. The Base FVPs can be 1894def07d5SDan Handleylicensed from Arm. See the `Arm FVP website`_. 1904bf3349bSDan Handley 191d83bf0bcSJoanna FarleyAll the above platforms have been tested with `Linaro Release 18.04`_. 1926f625747SDouglas Raillard 1936f625747SDouglas RaillardThis release also contains the following platform support: 1946f625747SDouglas Raillard 195d83bf0bcSJoanna Farley- Allwinner sun50i_64 and sun50i_h6 19637f647a4SAntonio Nino Diaz- Amlogic Meson S905 (GXBB) 197d83bf0bcSJoanna Farley- ARM SGI-575 and SGM-775 1985b0b7276SDan Handley- HiKey, HiKey960 and Poplar boards 199f9f26a5aSJoanna Farley- Marvell Armada 8K 2006f625747SDouglas Raillard- MediaTek MT6795 and MT8173 SoCs 2014bf3349bSDan Handley- NVidia T132, T186 and T210 SoCs 202f9f26a5aSJoanna Farley- NXP QorIQ LS1043A, i.MX8QX, i.MX8QM and i.MX7Solo WaRP7 2036f625747SDouglas Raillard- QEMU emulator 2045b0b7276SDan Handley- Raspberry Pi 3 board 2054bf3349bSDan Handley- RockChip RK3328, RK3368 and RK3399 SoCs 206150c38e8SSumit Garg- Socionext UniPhier SoC family and SynQuacer SC2A11 SoCs 207d83bf0bcSJoanna Farley- STMicroelectronics STM32MP1 2081841c533SNishanth Menon- Texas Instruments K3 SoCs 2096f625747SDouglas Raillard- Xilinx Zynq UltraScale + MPSoC 2106f625747SDouglas Raillard 2115b0b7276SDan HandleyStill to come 2126f625747SDouglas Raillard~~~~~~~~~~~~~ 2136f625747SDouglas Raillard 2146f625747SDouglas Raillard- More platform support. 2156f625747SDouglas Raillard 216d83bf0bcSJoanna Farley- Position independent executable (PIE) support. 2175b0b7276SDan Handley 2186f625747SDouglas Raillard- Ongoing support for new architectural features, CPUs and System IP. 2196f625747SDouglas Raillard 2205b0b7276SDan Handley- Ongoing support for new Arm system architecture specifications. 2216f625747SDouglas Raillard 2226f625747SDouglas Raillard- Ongoing security hardening, optimization and quality improvements. 2236f625747SDouglas Raillard 2244bf3349bSDan HandleyFor a full list of detailed issues in the current code, please see the `Change 2254bf3349bSDan HandleyLog`_ and the `GitHub issue tracker`_. 2266f625747SDouglas Raillard 2275b0b7276SDan HandleyGetting started 2286f625747SDouglas Raillard--------------- 2296f625747SDouglas Raillard 2304def07d5SDan HandleyGet the TF-A source code from `GitHub`_. 2316f625747SDouglas Raillard 232*d1ce4469SPaul BeesleySee the `User Guide`_ for instructions on how to install, build and use TF-A 233*d1ce4469SPaul Beesleywith the Arm `FVP`_\ s. 2346f625747SDouglas Raillard 235*d1ce4469SPaul BeesleySee the `Firmware Design`_ for information on how TF-A works. 2366f625747SDouglas Raillard 2376f625747SDouglas RaillardSee the `Porting Guide`_ as well for information about how to use this 2385b0b7276SDan Handleysoftware on another Armv7-A or Armv8-A platform. 2396f625747SDouglas Raillard 2406f625747SDouglas RaillardSee the `Contributing Guidelines`_ for information on how to contribute to this 2416f625747SDouglas Raillardproject and the `Acknowledgments`_ file for a list of contributors to the 2426f625747SDouglas Raillardproject. 2436f625747SDouglas Raillard 2448dd7bc6eSDimitris PapastamosIRC channel 2458dd7bc6eSDimitris Papastamos~~~~~~~~~~~ 2468dd7bc6eSDimitris Papastamos 2478dd7bc6eSDimitris PapastamosDevelopment discussion takes place on the #trusted-firmware-a channel 2488dd7bc6eSDimitris Papastamoson the Freenode IRC network. This is not an official support channel. 2498dd7bc6eSDimitris PapastamosIf you have an issue to raise, please use the `GitHub issue tracker`_. 2508dd7bc6eSDimitris Papastamos 2516f625747SDouglas RaillardFeedback and support 2526f625747SDouglas Raillard~~~~~~~~~~~~~~~~~~~~ 2536f625747SDouglas Raillard 2544def07d5SDan HandleyArm welcomes any feedback on TF-A. If you think you have found a security 2554def07d5SDan Handleyvulnerability, please report this using the process defined in the TF-A 2564def07d5SDan Handley`Security Centre`_. For all other feedback, please use the 2574bf3349bSDan Handley`GitHub issue tracker`_. 2586f625747SDouglas Raillard 2594def07d5SDan HandleyArm licensees may contact Arm directly via their partner managers. 2606f625747SDouglas Raillard 2616f625747SDouglas Raillard-------------- 2626f625747SDouglas Raillard 2634def07d5SDan Handley*Copyright (c) 2013-2018, Arm Limited and Contributors. All rights reserved.* 2646f625747SDouglas Raillard 2655b0b7276SDan Handley.. _Armv7-A and Armv8-A: https://developer.arm.com/products/architecture/a-profile 2666f625747SDouglas Raillard.. _Secure Monitor: http://www.arm.com/products/processors/technologies/trustzone/tee-smc.php 2674bf3349bSDan Handley.. _Power State Coordination Interface (PSCI): PSCI_ 2684bf3349bSDan Handley.. _PSCI: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf 2694bf3349bSDan Handley.. _SMC Calling Convention: http://infocenter.arm.com/help/topic/com.arm.doc.den0028b/ARM_DEN0028B_SMC_Calling_Convention.pdf 2703c6261bdSPaul Beesley.. _System Control and Management Interface (SCMI): SCMI_ 2714bf3349bSDan Handley.. _SCMI: http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/DEN0056A_System_Control_and_Management_Interface.pdf 272ed811260Sdanh-arm.. _Software Delegated Exception Interface (SDEI): SDEI_ 2735b0b7276SDan Handley.. _SDEI: http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf 2744def07d5SDan Handley.. _Juno Arm Development Platform: http://www.arm.com/products/tools/development-boards/versatile-express/juno-arm-development-platform.php 2754def07d5SDan Handley.. _Arm FVP website: FVP_ 2764bf3349bSDan Handley.. _FVP: https://developer.arm.com/products/system-design/fixed-virtual-platforms 277d83bf0bcSJoanna Farley.. _Linaro Release 18.04: https://community.arm.com/dev-platforms/b/documents/posts/linaro-release-notes-deprecated#LinaroRelease18.04 2786f625747SDouglas Raillard.. _OP-TEE Secure OS: https://github.com/OP-TEE/optee_os 279be8b4d19SPaul Beesley.. _NVIDIA Trusted Little Kernel: http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/ote_partner/tlk.git;a=summary 2804bf3349bSDan Handley.. _Trusty Secure OS: https://source.android.com/security/trusty 2814bf3349bSDan Handley.. _GitHub: https://www.github.com/ARM-software/arm-trusted-firmware 2824bf3349bSDan Handley.. _GitHub issue tracker: https://github.com/ARM-software/tf-issues/issues 2834bf3349bSDan Handley.. _Security Centre: https://github.com/ARM-software/arm-trusted-firmware/wiki/ARM-Trusted-Firmware-Security-Centre 2844bf3349bSDan Handley.. _license: ./license.rst 2854bf3349bSDan Handley.. _Contributing Guidelines: ./contributing.rst 2864bf3349bSDan Handley.. _Acknowledgments: ./acknowledgements.rst 2876f625747SDouglas Raillard.. _Firmware Design: ./docs/firmware-design.rst 2886f625747SDouglas Raillard.. _Change Log: ./docs/change-log.rst 2896f625747SDouglas Raillard.. _User Guide: ./docs/user-guide.rst 2906f625747SDouglas Raillard.. _Porting Guide: ./docs/porting-guide.rst 29127989a8eSAntonio Nino Diaz.. _FreeBSD: http://www.freebsd.org 29227989a8eSAntonio Nino Diaz.. _SCC: http://www.simple-cc.org/ 293