No description
Find a file
Jayanth Dodderi Chidanand 6a0da73647 refactor(el3-runtime): add arch-features detection mechanism
This patch adds architectural features detection procedure to ensure
features enabled are present in the given hardware implementation.

It verifies whether the architecture build flags passed during
compilation match the respective features by reading their ID
registers. It reads through all the enabled feature specific ID
registers at once and panics in case of mismatch(feature enabled
but not implemented in PE).

Feature flags are used at sections (context_management,
save and restore routines of registers) during context switch.
If the enabled feature flag is not supported by the PE, it causes an
exception while saving or restoring the registers guarded by them.

With this mechanism, the build flags are validated at an early
phase prior to their usage, thereby preventing any undefined action
under their control.

This implementation is based on tristate approach for each feature and
currently FEAT_STATE=0 and FEAT_STATE=1 are covered as part of this
patch. FEAT_STATE=2 is planned for phase-2 implementation and will be
taken care separately.

The patch has been explicitly tested, by adding a new test_config
with build config enabling majority of the features and detected
all of them under FVP launched with parameters enabling v8.7 features.

Note: This is an experimental procedure and the mechanism itself is
      guarded by a macro "FEATURE_DETECTION", which is currently being
      disabled by default.

The "FEATURE_DETECTION" macro is documented and the platforms are
encouraged to make use of this diagnostic tool by enabling this
"FEATURE_DETECTION" flag explicitly and get used to its behaviour
during booting before the procedure gets mandated.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Ia23d95430fe82d417a938b672bfb5edc401b0f43
2022-04-04 10:24:51 +01:00
.husky build(hooks): add commitlint hook 2021-04-19 14:06:25 +01:00
bl1 refactor(el3-runtime): add prepare_el3_entry func 2022-01-31 11:27:11 +00:00
bl2 feat(bl2): add support to separate no-loadable sections 2022-03-27 23:24:24 +08:00
bl2u Avoid the use of linker *_SIZE__ macros 2021-04-21 15:05:57 +02:00
bl31 refactor(el3-runtime): add arch-features detection mechanism 2022-04-04 10:24:51 +01:00
bl32 test(el3-runtime): dit is retained on world switch 2022-02-03 11:33:55 +00:00
common refactor(el3-runtime): add arch-features detection mechanism 2022-04-04 10:24:51 +01:00
docs Merge changes Ic1796898,I93bd392a into integration 2022-03-29 00:21:37 +02:00
drivers Merge changes I84e257b3,I1317e482 into integration 2022-03-30 09:38:52 +02:00
fdts feat(stm32mp1-fdts): add support for STM32MP13 DK board 2022-03-22 09:09:23 +01:00
include refactor(el3-runtime): add arch-features detection mechanism 2022-04-04 10:24:51 +01:00
lib fix(errata): workaround for Cortex A78 AE erratum 2395408 2022-03-24 10:55:48 +00:00
licenses docs(license): rectify arm-gic.h license 2021-04-26 12:36:00 +01:00
make_helpers refactor(el3-runtime): add arch-features detection mechanism 2022-04-04 10:24:51 +01:00
plat fix(layerscape): fix coverity issue 2022-03-30 10:38:22 +08:00
services feat(rme): add dummy realm attestation key to RMMD 2022-03-28 15:02:01 +02:00
tools fix(nxp-tools): fix create_pbl print log 2022-03-27 23:24:24 +08:00
.checkpatch.conf Re-apply GIT_COMMIT_ID check for checkpatch 2019-07-12 11:06:24 +01:00
.commitlintrc.js refactor(hooks): replace cz-conventional-changelog with cz-commitlint 2022-01-24 12:55:00 +00:00
.cz.json refactor(hooks): replace cz-conventional-changelog with cz-commitlint 2022-01-24 12:55:00 +00:00
.editorconfig .editorconfig: set max line length to 100 2020-12-03 15:39:23 +00:00
.gitignore build(hooks): add Husky configuration 2021-04-19 14:06:25 +01:00
.gitreview Specify integration as the default branch for git-review 2020-04-02 07:57:17 +00:00
.versionrc.js docs(changelog): fix broken version bumping 2022-01-24 12:55:34 +00:00
changelog.yaml build(changelog): add new scopes for ls1088a 2022-03-27 23:24:24 +08:00
dco.txt Drop requirement for CLA in contribution.md 2016-09-27 21:52:03 +01:00
license.rst doc: De-duplicate readme and license files 2019-10-08 16:36:15 +00:00
Makefile refactor(el3-runtime): add arch-features detection mechanism 2022-04-04 10:24:51 +01:00
package-lock.json build(npm): mandate Node.js engine version 2022-01-24 12:55:34 +00:00
package.json build(npm): mandate Node.js engine version 2022-01-24 12:55:34 +00:00
readme.rst doc: Formatting fixes for readme.rst 2019-10-09 15:37:59 +00:00

Trusted Firmware-A
==================

Trusted Firmware-A (TF-A) is a reference implementation of secure world software
for `Arm A-Profile architectures`_ (Armv8-A and Armv7-A), including an Exception
Level 3 (EL3) `Secure Monitor`_. It provides a suitable starting point for
productization of secure world boot and runtime firmware, in either the AArch32
or AArch64 execution states.

TF-A implements Arm interface standards, including:

-  `Power State Coordination Interface (PSCI)`_
-  `Trusted Board Boot Requirements CLIENT (TBBR-CLIENT)`_
-  `SMC Calling Convention`_
-  `System Control and Management Interface (SCMI)`_
-  `Software Delegated Exception Interface (SDEI)`_

The code is designed to be portable and reusable across hardware platforms and
software models that are based on the Armv8-A and Armv7-A architectures.

In collaboration with interested parties, we will continue to enhance TF-A
with reference implementations of Arm standards to benefit developers working
with Armv7-A and Armv8-A TrustZone technology.

Users are encouraged to do their own security validation, including penetration
testing, on any secure world code derived from TF-A.

More Info and Documentation
---------------------------

To find out more about Trusted Firmware-A, please `view the full documentation`_
that is available through `trustedfirmware.org`_.

--------------

*Copyright (c) 2013-2019, Arm Limited and Contributors. All rights reserved.*

.. _Armv7-A and Armv8-A: https://developer.arm.com/products/architecture/a-profile
.. _Secure Monitor: http://www.arm.com/products/processors/technologies/trustzone/tee-smc.php
.. _Power State Coordination Interface (PSCI): PSCI_
.. _PSCI: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf
.. _Trusted Board Boot Requirements CLIENT (TBBR-CLIENT): https://developer.arm.com/docs/den0006/latest/trusted-board-boot-requirements-client-tbbr-client-armv8-a
.. _SMC Calling Convention: http://infocenter.arm.com/help/topic/com.arm.doc.den0028b/ARM_DEN0028B_SMC_Calling_Convention.pdf
.. _System Control and Management Interface (SCMI): SCMI_
.. _SCMI: http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/DEN0056A_System_Control_and_Management_Interface.pdf
.. _Software Delegated Exception Interface (SDEI): SDEI_
.. _SDEI: http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf
.. _Arm A-Profile architectures: https://developer.arm.com/architectures/cpu-architecture/a-profile
.. _view the full documentation: https://www.trustedfirmware.org/docs/tf-a
.. _trustedfirmware.org: http://www.trustedfirmware.org