Upstream fork of ATF with a couple of rk3399 patches to remove HDCP blob and increase BAUD_RATE.
Go to file
Petre-Ionut Tudor 60e8f3cfd5 Read-only xlat tables for BL31 memory
This patch introduces a build flag which allows the xlat tables
to be mapped in a read-only region within BL31 memory. It makes it
much harder for someone who has acquired the ability to write to
arbitrary secure memory addresses to gain control of the
translation tables.

The memory attributes of the descriptors describing the tables
themselves are changed to read-only secure data. This change
happens at the end of BL31 runtime setup. Until this point, the
tables have read-write permissions. This gives a window of
opportunity for changes to be made to the tables with the MMU on
(e.g. reclaiming init code). No changes can be made to the tables
with the MMU turned on from this point onwards. This change is also
enabled for sp_min and tspd.

To make all this possible, the base table was moved to .rodata. The
penalty we pay is that now .rodata must be aligned to the size of
the base table (512B alignment). Still, this is better than putting
the base table with the higher level tables in the xlat_table
section, as that would cost us a full 4KB page.

Changing the tables from read-write to read-only cannot be done with
the MMU on, as the break-before-make sequence would invalidate the
descriptor which resolves the level 3 page table where that very
descriptor is located. This would make the translation required for
writing the changes impossible, generating an MMU fault.

The caches are also flushed.

Signed-off-by: Petre-Ionut Tudor <petre-ionut.tudor@arm.com>
Change-Id: Ibe5de307e6dc94c67d6186139ac3973516430466
2020-02-24 16:52:56 +00:00
bl1 Merge "coverity: fix MISRA violations" into integration 2020-02-18 19:19:00 +00:00
bl2 Merge changes from topic "lm/fconf" into integration 2020-02-11 16:15:45 +00:00
bl2u Reduce space lost to object alignment 2019-12-04 02:59:30 -06:00
bl31 Merge changes from topic "spmd" into integration 2020-02-11 08:34:47 +00:00
bl32 TSP: add PIE support 2020-01-24 22:34:25 +09:00
common Merge changes from topic "lm/fconf" into integration 2020-02-11 16:15:45 +00:00
docs cpus: higher performance non-cacheable load forwarding 2020-02-20 09:25:45 -08:00
drivers include: move MHZ_TICKS_PER_SEC to utils_def.h 2020-02-20 09:25:45 -08:00
fdts corstone700: fdts: using DDR memory and XIP rootfs 2020-02-18 21:48:43 +00:00
include Read-only xlat tables for BL31 memory 2020-02-24 16:52:56 +00:00
lib Read-only xlat tables for BL31 memory 2020-02-24 16:52:56 +00:00
make_helpers Read-only xlat tables for BL31 memory 2020-02-24 16:52:56 +00:00
plat Read-only xlat tables for BL31 memory 2020-02-24 16:52:56 +00:00
services Use consistent SMCCC error code 2020-02-20 10:27:40 +00:00
tools SPM: modify sptool to generate individual SP blobs 2020-02-10 11:51:19 +00:00
.checkpatch.conf Re-apply GIT_COMMIT_ID check for checkpatch 2019-07-12 11:06:24 +01:00
.editorconfig doc: Final, pre-release fixes and updates 2019-10-22 13:15:02 +00:00
.gitignore Ignore the ctags file 2020-01-22 16:08:27 +00:00
Makefile Read-only xlat tables for BL31 memory 2020-02-24 16:52:56 +00: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
readme.rst doc: Formatting fixes for readme.rst 2019-10-09 15:37:59 +00:00

readme.rst

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> </head>

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:

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.

</html>