Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files
Masahiro Yamada authored
The build system defines the IMAGE_BL* macro when compiling each image.
This is useful to distinguish which image the current file is being
built for by using #if defined(IMAGE_BL2) or #if defined(IMAGE_BL31),
or whatever.

There are some cases where we are more interested in which exception
level the current file is being built for.

include/lib/cpus/{aarch32,aarch64}/cpu_macros.S defines IMAGE_AT_EL3,
but we do not have it globally.

Pass IMAGE_AT_EL1 or IMAGE_AT_EL3 to BL*_CFLAGS so that it is available
from all C code.

The library code (libc.a, libmbedtls.a, etc.) is exceptional cases,
where the code can be shared between BL images.

Other than that, we know the exception level at the build time, and
this macro will be useful in the shared code.

Change-Id: I7c8a1da10726906adfba981cfe8464dff111d6b0
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
d5e97a1d
Name Last commit Last update
bl1 Factor xlat_table sections in linker scripts out into a header file
bl2 Factor xlat_table sections in linker scripts out into a header file
bl2u Factor xlat_table sections in linker scripts out into a header file
bl31 Merge changes from topic "mp/enhanced_pal_hw" into integration
bl32 Bug fix: Protect TSP prints with lock
common Fix crash dump for lower EL
docs Merge "Fix warnings in porting-guide.rst" into integration
drivers FVP: Add BL2 hash calculation in BL1
fdts corstone700: updating the kernel arguments to support initramfs
include FVP: Add BL2 hash calculation in BL1
lib fconf: notify if fw_config dt is not used
make_helpers fconf: Clean Arm IO
plat Merge "FVP: Add BL2 hash calculation in BL1" into integration
services spd: tlkd: support new TLK SMCs for RPMB service
tools Merge changes from topic "sb/dualroot" into integration
.checkpatch.conf Re-apply GIT_COMMIT_ID check for checkpatch
.editorconfig doc: Final, pre-release fixes and updates
.gitignore Ignore the ctags file
.gitreview Add a .gitreview file for convenience
Makefile Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files
dco.txt Drop requirement for CLA in contribution.md
license.rst doc: De-duplicate readme and license files
readme.rst doc: Formatting fixes for readme.rst

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.