xref: /rk3399_ARM-atf/readme.rst (revision 27989a8e34a44ff8e6a2e5b011123a09fd8a82c7)
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
33*27989a8eSAntonio Nino Diaz-  The libc source code is derived from `FreeBSD`_ and `SCC`_. FreeBSD uses
34*27989a8eSAntonio Nino Diaz   various BSD licenses, including BSD-3-Clause and BSD-2-Clause. The SCC code
35*27989a8eSAntonio 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
614bf3349bSDan Handleystate.
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
984bf3349bSDan Handley   AArch64 EL3 Runtime Software must be integrated with a dispatcher component
994bf3349bSDan Handley   (SPD) to customize the interaction with the SP.
1006f625747SDouglas Raillard
1014bf3349bSDan Handley-  A Test SP/SPD to demonstrate AArch64 Secure Monitor functionality and SP
1024bf3349bSDan Handley   interaction with PSCI.
1036f625747SDouglas Raillard
1044bf3349bSDan Handley-  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
1396f625747SDouglas RaillardFor a full description of functionality and implementation details, please
1406f625747SDouglas Raillardsee the `Firmware Design`_ and supporting documentation. The `Change Log`_
1416f625747SDouglas Raillardprovides details of changes made since the last release.
1426f625747SDouglas Raillard
1436f625747SDouglas RaillardPlatforms
1446f625747SDouglas Raillard~~~~~~~~~
1456f625747SDouglas Raillard
1464bf3349bSDan HandleyVarious AArch32 and AArch64 builds of this release has been tested on variants
1474def07d5SDan Handleyr0, r1 and r2 of the `Juno Arm Development Platform`_.
1486f625747SDouglas Raillard
1494def07d5SDan HandleyVarious AArch64 builds of this release have been tested on the following Arm
1505b0b7276SDan HandleyFixed Virtual Platforms (`FVP`_) without shifted affinities, and that do not
1515b0b7276SDan Handleysupport threaded CPU cores (64-bit host machine only):
1526f625747SDouglas Raillard
1535b0b7276SDan HandleyNOTE: Unless otherwise stated, the FVP Version is 11.2 Build 11.2.33.
1546f625747SDouglas Raillard
1554bf3349bSDan Handley-  ``Foundation_Platform``
1565b0b7276SDan Handley-  ``FVP_Base_AEMv8A-AEMv8A`` (and also Version 9.0, Build 0.8.9005)
1574bf3349bSDan Handley-  ``FVP_Base_Cortex-A35x4``
1584bf3349bSDan Handley-  ``FVP_Base_Cortex-A53x4``
1594bf3349bSDan Handley-  ``FVP_Base_Cortex-A57x4-A53x4``
1604bf3349bSDan Handley-  ``FVP_Base_Cortex-A57x4``
1614bf3349bSDan Handley-  ``FVP_Base_Cortex-A72x4-A53x4``
1624bf3349bSDan Handley-  ``FVP_Base_Cortex-A72x4``
1634bf3349bSDan Handley-  ``FVP_Base_Cortex-A73x4-A53x4``
1644bf3349bSDan Handley-  ``FVP_Base_Cortex-A73x4``
1655b0b7276SDan Handley
1665b0b7276SDan HandleyAdditionally, various AArch64 builds were tested on the following Arm `FVP`_ s
1675b0b7276SDan Handleywith shifted affinities, supporting threaded CPU cores (64-bit host machine
1685b0b7276SDan Handleyonly).
1695b0b7276SDan Handley
1705b0b7276SDan Handley-  ``FVP_Base_Cortex-A55x4-A75x4`` (Version 0.0, build 0.0.4395)
1715b0b7276SDan Handley-  ``FVP_Base_Cortex-A55x4`` (Version 0.0, build 0.0.4395)
1725b0b7276SDan Handley-  ``FVP_Base_Cortex-A75x4`` (Version 0.0, build 0.0.4395)
1735b0b7276SDan Handley-  ``FVP_Base_RevC-2xAEMv8A``
1746f625747SDouglas Raillard
1754def07d5SDan HandleyVarious AArch32 builds of this release has been tested on the following Arm
1765b0b7276SDan Handley`FVP`_\ s without shifted affinities, and that do not support threaded CPU cores
1775b0b7276SDan Handley(64-bit host machine only):
1784bf3349bSDan Handley
1795b0b7276SDan Handley-  ``FVP_Base_AEMv8A-AEMv8A``
1804bf3349bSDan Handley-  ``FVP_Base_Cortex-A32x4``
1816f625747SDouglas Raillard
1826f625747SDouglas RaillardThe Foundation FVP can be downloaded free of charge. The Base FVPs can be
1834def07d5SDan Handleylicensed from Arm. See the `Arm FVP website`_.
1844bf3349bSDan Handley
1855b0b7276SDan HandleyAll the above platforms have been tested with `Linaro Release 17.10`_.
1866f625747SDouglas Raillard
1876f625747SDouglas RaillardThis release also contains the following platform support:
1886f625747SDouglas Raillard
1895b0b7276SDan Handley-  HiKey, HiKey960 and Poplar boards
1906f625747SDouglas Raillard-  MediaTek MT6795 and MT8173 SoCs
1914bf3349bSDan Handley-  NVidia T132, T186 and T210 SoCs
1926f625747SDouglas Raillard-  QEMU emulator
1935b0b7276SDan Handley-  Raspberry Pi 3 board
1944bf3349bSDan Handley-  RockChip RK3328, RK3368 and RK3399 SoCs
195150c38e8SSumit Garg-  Socionext UniPhier SoC family and SynQuacer SC2A11 SoCs
1961841c533SNishanth Menon-  Texas Instruments K3 SoCs
1976f625747SDouglas Raillard-  Xilinx Zynq UltraScale + MPSoC
1986f625747SDouglas Raillard
1995b0b7276SDan HandleyStill to come
2006f625747SDouglas Raillard~~~~~~~~~~~~~
2016f625747SDouglas Raillard
2026f625747SDouglas Raillard-  More platform support.
2036f625747SDouglas Raillard
2045b0b7276SDan Handley-  Improved dynamic configuration support.
2055b0b7276SDan Handley
2066f625747SDouglas Raillard-  Ongoing support for new architectural features, CPUs and System IP.
2076f625747SDouglas Raillard
2085b0b7276SDan Handley-  Ongoing support for new Arm system architecture specifications.
2096f625747SDouglas Raillard
2106f625747SDouglas Raillard-  Ongoing security hardening, optimization and quality improvements.
2116f625747SDouglas Raillard
2124bf3349bSDan HandleyFor a full list of detailed issues in the current code, please see the `Change
2134bf3349bSDan HandleyLog`_ and the `GitHub issue tracker`_.
2146f625747SDouglas Raillard
2155b0b7276SDan HandleyGetting started
2166f625747SDouglas Raillard---------------
2176f625747SDouglas Raillard
2184def07d5SDan HandleyGet the TF-A source code from `GitHub`_.
2196f625747SDouglas Raillard
2206f625747SDouglas RaillardSee the `User Guide`_ for instructions on how to install, build and use
2214def07d5SDan Handleythe TF-A with the Arm `FVP`_\ s.
2226f625747SDouglas Raillard
2234def07d5SDan HandleySee the `Firmware Design`_ for information on how the TF-A works.
2246f625747SDouglas Raillard
2256f625747SDouglas RaillardSee the `Porting Guide`_ as well for information about how to use this
2265b0b7276SDan Handleysoftware on another Armv7-A or Armv8-A platform.
2276f625747SDouglas Raillard
2286f625747SDouglas RaillardSee the `Contributing Guidelines`_ for information on how to contribute to this
2296f625747SDouglas Raillardproject and the `Acknowledgments`_ file for a list of contributors to the
2306f625747SDouglas Raillardproject.
2316f625747SDouglas Raillard
2328dd7bc6eSDimitris PapastamosIRC channel
2338dd7bc6eSDimitris Papastamos~~~~~~~~~~~
2348dd7bc6eSDimitris Papastamos
2358dd7bc6eSDimitris PapastamosDevelopment discussion takes place on the #trusted-firmware-a channel
2368dd7bc6eSDimitris Papastamoson the Freenode IRC network. This is not an official support channel.
2378dd7bc6eSDimitris PapastamosIf you have an issue to raise, please use the `GitHub issue tracker`_.
2388dd7bc6eSDimitris Papastamos
2396f625747SDouglas RaillardFeedback and support
2406f625747SDouglas Raillard~~~~~~~~~~~~~~~~~~~~
2416f625747SDouglas Raillard
2424def07d5SDan HandleyArm welcomes any feedback on TF-A. If you think you have found a security
2434def07d5SDan Handleyvulnerability, please report this using the process defined in the TF-A
2444def07d5SDan Handley`Security Centre`_. For all other feedback, please use the
2454bf3349bSDan Handley`GitHub issue tracker`_.
2466f625747SDouglas Raillard
2474def07d5SDan HandleyArm licensees may contact Arm directly via their partner managers.
2486f625747SDouglas Raillard
2496f625747SDouglas Raillard--------------
2506f625747SDouglas Raillard
2514def07d5SDan Handley*Copyright (c) 2013-2018, Arm Limited and Contributors. All rights reserved.*
2526f625747SDouglas Raillard
2535b0b7276SDan Handley.. _Armv7-A and Armv8-A: https://developer.arm.com/products/architecture/a-profile
2546f625747SDouglas Raillard.. _Secure Monitor: http://www.arm.com/products/processors/technologies/trustzone/tee-smc.php
2554bf3349bSDan Handley.. _Power State Coordination Interface (PSCI): PSCI_
2564bf3349bSDan Handley.. _PSCI: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf
2574bf3349bSDan Handley.. _SMC Calling Convention: http://infocenter.arm.com/help/topic/com.arm.doc.den0028b/ARM_DEN0028B_SMC_Calling_Convention.pdf
2584bf3349bSDan Handley.. _System Control and Management Interface: SCMI_
2594bf3349bSDan Handley.. _SCMI: http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/DEN0056A_System_Control_and_Management_Interface.pdf
260ed811260Sdanh-arm.. _Software Delegated Exception Interface (SDEI): SDEI_
2615b0b7276SDan Handley.. _SDEI: http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf
2624def07d5SDan Handley.. _Juno Arm Development Platform: http://www.arm.com/products/tools/development-boards/versatile-express/juno-arm-development-platform.php
2634def07d5SDan Handley.. _Arm FVP website: FVP_
2644bf3349bSDan Handley.. _FVP: https://developer.arm.com/products/system-design/fixed-virtual-platforms
2655b0b7276SDan Handley.. _Linaro Release 17.10: https://community.arm.com/dev-platforms/b/documents/posts/linaro-release-notes-deprecated#LinaroRelease17.10
2666f625747SDouglas Raillard.. _OP-TEE Secure OS: https://github.com/OP-TEE/optee_os
2676f625747SDouglas Raillard.. _NVidia Trusted Little Kernel: http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/ote_partner/tlk.git;a=summary
2684bf3349bSDan Handley.. _Trusty Secure OS: https://source.android.com/security/trusty
2694bf3349bSDan Handley.. _GitHub: https://www.github.com/ARM-software/arm-trusted-firmware
2704bf3349bSDan Handley.. _GitHub issue tracker: https://github.com/ARM-software/tf-issues/issues
2714bf3349bSDan Handley.. _Security Centre: https://github.com/ARM-software/arm-trusted-firmware/wiki/ARM-Trusted-Firmware-Security-Centre
2724bf3349bSDan Handley.. _license: ./license.rst
2734bf3349bSDan Handley.. _Contributing Guidelines: ./contributing.rst
2744bf3349bSDan Handley.. _Acknowledgments: ./acknowledgements.rst
2756f625747SDouglas Raillard.. _Firmware Design: ./docs/firmware-design.rst
2766f625747SDouglas Raillard.. _Change Log: ./docs/change-log.rst
2776f625747SDouglas Raillard.. _User Guide: ./docs/user-guide.rst
2786f625747SDouglas Raillard.. _Porting Guide: ./docs/porting-guide.rst
279*27989a8eSAntonio Nino Diaz.. _FreeBSD: http://www.freebsd.org
280*27989a8eSAntonio Nino Diaz.. _SCC: http://www.simple-cc.org/
281