aboutsummaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorJuan Castillo <juan.castillo@arm.com>2015-04-02 09:48:16 +0100
committerJuan Castillo <juan.castillo@arm.com>2015-06-25 08:53:26 +0100
commit05799ae0c80ca4592ff2eba1e61027f8661529eb (patch)
tree5ea2a82216184ace6eb4bb60654df6a9c072d7a9 /bl2
parent95cfd4ad84633502938a8bccc2b0290dfbcac2f7 (diff)
downloadtrusted-firmware-a-05799ae0c80ca4592ff2eba1e61027f8661529eb.tar.gz
TBB: add authentication framework
This patch adds the authentication framework that will be used as the base to implement Trusted Board Boot in the Trusted Firmware. The framework comprises the following modules: - Image Parser Module (IPM) This module is responsible for interpreting images, check their integrity and extract authentication information from them during Trusted Board Boot. The module currently supports three types of images i.e. raw binaries, X509v3 certificates and any type specific to a platform. An image parser library must be registered for each image type (the only exception is the raw image parser, which is included in the main module by default). Each parser library (if used) must export a structure in a specific linker section which contains function pointers to: 1. Initialize the library 2. Check the integrity of the image type supported by the library 3. Extract authentication information from the image - Cryptographic Module (CM) This module is responsible for verifying digital signatures and hashes. It relies on an external cryptographic library to perform the cryptographic operations. To register a cryptographic library, the library must use the REGISTER_CRYPTO_LIB macro, passing function pointers to: 1. Initialize the library 2. Verify a digital signature 3. Verify a hash Failing to register a cryptographic library will generate a build time error. - Authentication Module (AM) This module provides methods to authenticate an image, like hash comparison or digital signatures. It uses the image parser module to extract authentication parameters, the crypto module to perform cryptographic operations and the Chain of Trust to authenticate the images. The Chain of Trust (CoT) is a data structure that defines the dependencies between images and the authentication methods that must be followed to authenticate an image. The Chain of Trust, when added, must provide a header file named cot_def.h with the following definitions: - COT_MAX_VERIFIED_PARAMS Integer value indicating the maximum number of authentication parameters an image can present. This value will be used by the authentication module to allocate the memory required to load the parameters in the image descriptor. Change-Id: Ied11bd5cd410e1df8767a1df23bb720ce7e58178
Diffstat (limited to 'bl2')
-rw-r--r--bl2/bl2.ld.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/bl2/bl2.ld.S b/bl2/bl2.ld.S
index 99333391b7..33588e6980 100644
--- a/bl2/bl2.ld.S
+++ b/bl2/bl2.ld.S
@@ -50,6 +50,13 @@ SECTIONS
*bl2_entrypoint.o(.text*)
*(.text*)
*(.rodata*)
+
+ /* Ensure 8-byte alignment for descriptors and ensure inclusion */
+ . = ALIGN(8);
+ __PARSER_LIB_DESCS_START__ = .;
+ KEEP(*(.img_parser_lib_descs))
+ __PARSER_LIB_DESCS_END__ = .;
+
*(.vectors)
__RO_END_UNALIGNED__ = .;
/*