Upstream fork of ATF with a couple of rk3399 patches to remove HDCP blob and increase BAUD_RATE.
Go to file
Andre Przywara ff4e6c35c9 fdt/wrappers: Replace fdtw_read_cells() implementation
Our fdtw_read_cells() implementation goes to great lengths to
sanity-check every parameter and result, but leaves a big hole open:
The size of the storage the value pointer points at needs to match the
number of cells given. This can't be easily checked at compile time,
since we lose the size information by using a void pointer.
Regardless the current usage of this function is somewhat wrong anyways,
since we use it on single-element, fixed-length properties only, for
which the DT binding specifies the size.
Typically we use those functions dealing with a number of cells in DT
context to deal with *dynamically* sized properties, which depend on
other properties (#size-cells, #clock-cells, ...), to specify the number
of cells needed.

Another problem with the current implementation is the use of
ambiguously sized types (uintptr_t, size_t) together with a certain
expectation about their size. In general there is no relation between
the length of a DT property and the bitness of the code that parses the
DTB: AArch64 code could encounter 32-bit addresses (where the physical
address space is limited to 4GB [1]), while AArch32 code could read
64-bit sized properties (/memory nodes on LPAE systems, [2]).

To make this more clear, fix the potential issues and also align more
with other DT users (Linux and U-Boot), introduce functions to explicitly
read uint32 and uint64 properties. As the other DT consumers, we do this
based on the generic "read array" function.
Convert all users to use either of those two new functions, and make
sure we never use a pointer to anything other than uint32_t or uint64_t
variables directly.

This reveals (and fixes) a bug in plat_spmd_manifest.c, where we write
4 bytes into a uint16_t variable (passed via a void pointer).

Also we change the implementation of the function to better align with
other libfdt users, by using the right types (fdt32_t) and common
variable names (*prop, prop_names).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi#n874
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/ecx-2000.dts

Change-Id: I718de960515117ac7a3331a1b177d2ec224a3890
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2020-04-29 10:19:17 +01:00
bl1 linker_script: move .data section to bl_common.ld.h 2020-04-25 20:09:08 +09:00
bl2 linker_script: move .data section to bl_common.ld.h 2020-04-25 20:09:08 +09:00
bl2u linker_script: move .data section to bl_common.ld.h 2020-04-25 20:09:08 +09:00
bl31 linker_script: move .data section to bl_common.ld.h 2020-04-25 20:09:08 +09:00
bl32 linker_script: move .data section to bl_common.ld.h 2020-04-25 20:09:08 +09:00
common fdt/wrappers: Replace fdtw_read_cells() implementation 2020-04-29 10:19:17 +01:00
docs doc: Treat Sphinx warnings as errors 2020-04-21 09:37:47 +00:00
drivers plat/stm32: Use generic fdt_read_uint32_array() implementation 2020-04-28 15:56:31 +01:00
fdts fdts: a5ds: Fix for the system timer issue. 2020-04-17 21:12:15 +01:00
include fdt/wrappers: Replace fdtw_read_cells() implementation 2020-04-29 10:19:17 +01:00
lib fdt/wrappers: Replace fdtw_read_cells() implementation 2020-04-29 10:19:17 +01:00
make_helpers Enable MTE support 2020-04-01 16:40:16 +02:00
plat fdt/wrappers: Replace fdtw_read_cells() implementation 2020-04-29 10:19:17 +01:00
services spd: tlkd: support new TLK SMCs for RPMB service 2020-03-21 19:00:05 -07:00
tools Merge changes from topic "sb/dualroot" into integration 2020-03-10 13:47:47 +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
.gitreview Specify integration as the default branch for git-review 2020-04-02 07:57:17 +00:00
Makefile Incrementing the minor version to reflect upcoming v2.3 release 2020-04-20 00:01:09 -05: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>