| 1c3ea103 | 01-Feb-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove all non-configurable dead loops
Added a new platform porting function plat_panic_handler, to allow platforms to handle unexpected error situations. It must be implemented in assembly as it ma
Remove all non-configurable dead loops
Added a new platform porting function plat_panic_handler, to allow platforms to handle unexpected error situations. It must be implemented in assembly as it may be called before the C environment is initialized. A default implementation is provided, which simply spins.
Corrected all dead loops in generic code to call this function instead. This includes the dead loop that occurs at the end of the call to panic().
All unnecesary wfis from bl32/tsp/aarch64/tsp_exceptions.S have been removed.
Change-Id: I67cb85f6112fa8e77bd62f5718efcef4173d8134
show more ...
|
| f0dd061a | 02-Feb-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add support for %p in tf_printf()
This patch adds support for the `%p` format specifier in tf_printf() following the example of the printf implementation of the stdlib used in the trusted firmware.
Add support for %p in tf_printf()
This patch adds support for the `%p` format specifier in tf_printf() following the example of the printf implementation of the stdlib used in the trusted firmware.
Fixes ARM-software/tf-issues#292
Change-Id: I0b3230c783f735d3e039be25a9405f00023420da
show more ...
|
| 1645d3ee | 17-Dec-2015 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Miscellaneous doc fixes for v1.2
Change-Id: I6f49bd779f2a4d577c6443dd160290656cdbc59b |
| d178637d | 14-Dec-2015 |
Juan Castillo <juan.castillo@arm.com> |
Remove dashes from image names: 'BL3-x' --> 'BL3x'
This patch removes the dash character from the image name, to follow the image terminology in the Trusted Firmware Wiki page:
https://github.c
Remove dashes from image names: 'BL3-x' --> 'BL3x'
This patch removes the dash character from the image name, to follow the image terminology in the Trusted Firmware Wiki page:
https://github.com/ARM-software/arm-trusted-firmware/wiki
Changes apply to output messages, comments and documentation.
non-ARM platform files have been left unmodified.
Change-Id: Ic2a99be4ed929d52afbeb27ac765ceffce46ed76
show more ...
|
| bbf8f6f9 | 02-Oct-2015 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Move context management code to common location
The upcoming Firmware Update feature needs transitioning across Secure/Normal worlds to complete the FWU process and hence requires context management
Move context management code to common location
The upcoming Firmware Update feature needs transitioning across Secure/Normal worlds to complete the FWU process and hence requires context management code to perform this task.
Currently context management code is part of BL31 stage only. This patch moves the code from (include)/bl31 to (include)/common. Some function declarations/definitions and macros have also moved to different files to help code sharing.
Change-Id: I3858b08aecdb76d390765ab2b099f457873f7b0c
show more ...
|
| 135c9ddd | 04-Nov-2015 |
Achin Gupta <achin.gupta@arm.com> |
Merge pull request #423 from jcastillo-arm/jc/genfw/1211
Remove deprecated IO return definitions |
| e098e244 | 02-Nov-2015 |
Juan Castillo <juan.castillo@arm.com> |
Remove deprecated IO return definitions
Patch 7e26fe1f deprecates IO specific return definitions in favour of standard errno codes. This patch removes those definitions and its usage from the IO fra
Remove deprecated IO return definitions
Patch 7e26fe1f deprecates IO specific return definitions in favour of standard errno codes. This patch removes those definitions and its usage from the IO framework, IO drivers and IO platform layer. Following this patch, standard errno codes must be used when checking the return value of an IO function.
Change-Id: Id6e0e9d0a7daf15a81ec598cf74de83d5768650f
show more ...
|
| 68a68c92 | 28-Sep-2015 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Introduce print_entry_point_info() function
This patch introduces a new function called 'print_entry_point_info' that prints an entry_point_t structure for debugging purposes. As such, it can be use
Introduce print_entry_point_info() function
This patch introduces a new function called 'print_entry_point_info' that prints an entry_point_t structure for debugging purposes. As such, it can be used to display the entry point address, SPSR and arguments passed from a firmware image to the next one.
This function is now called in the following images transitions: - BL1 to BL2 - BL1 to BL31 - BL31 to the next image (typically BL32 or BL33)
The following changes have been introduced:
- Fix the output format of the SPSR value : SPSR is a 32-bit value, not a 64-bit one.
- Print all arguments values. The entry_point_info_t structure allows to pass up to 8 arguments. In most cases, only the first 2 arguments were printed. print_entry_point_info() now prints all of them as 'VERBOSE' traces.
Change-Id: Ieb384bffaa7849e6cb95a01a47c0b7fc2308653a
show more ...
|
| 78460a05 | 01-Oct-2015 |
Juan Castillo <jcastillo.devel@gmail.com> |
Use standard errno definitions in load_auth_image()
This patch replaces custom definitions used as return values for the load_auth_image() function with standard error codes defined in errno.h. The
Use standard errno definitions in load_auth_image()
This patch replaces custom definitions used as return values for the load_auth_image() function with standard error codes defined in errno.h. The custom definitions have been removed.
It also replaces the usage of IO framework error custom definitions, which have been deprecated. Standard errno definitions are used instead.
Change-Id: I1228477346d3876151c05b470d9669c37fd231be
show more ...
|
| a2f8b166 | 23-Jul-2015 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Ensure BL2 security state is secure
BL2 loads secure runtime code(BL3-1, BL3-2) and hence it has to run in secure world otherwise BL3-1/BL3-2 have to execute from non-secure memory. Hence, This patc
Ensure BL2 security state is secure
BL2 loads secure runtime code(BL3-1, BL3-2) and hence it has to run in secure world otherwise BL3-1/BL3-2 have to execute from non-secure memory. Hence, This patch removes the change_security_state() call in bl1_run_bl2() and replaces it with an assert to confirm the BL2 as secure.
Fixes ARM-software/tf-issues#314
Change-Id: I611b83f5c4090e58a76a2e950b0d797b46df3c29
show more ...
|
| fedbc049 | 17-Aug-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: abort boot if BL3-2 cannot be authenticated
BL3-2 image (Secure Payload) is optional. If the image cannot be loaded a warning message is printed and the boot process continues. According to the
TBB: abort boot if BL3-2 cannot be authenticated
BL3-2 image (Secure Payload) is optional. If the image cannot be loaded a warning message is printed and the boot process continues. According to the TBBR document, this behaviour should not apply in case of an authentication error, where the boot process should be aborted.
This patch modifies the load_auth_image() function to distinguish between a load error and an authentication error. The caller uses the return value to abort the boot process or continue.
In case of authentication error, the memory region used to store the image is wiped clean.
Change-Id: I534391d526d514b2a85981c3dda00de67e0e7992
show more ...
|
| 962f7c51 | 10-Apr-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: delete deprecated PolarSSL authentication module
After updating the main authentication module to use the transport and crypto modules and the CoT description, the PolarSSL authentication modul
TBB: delete deprecated PolarSSL authentication module
After updating the main authentication module to use the transport and crypto modules and the CoT description, the PolarSSL authentication module is no longer required. This patch deletes it.
Change-Id: I8ba1e13fc1cc7b2fa9df14ff59eb798f0460b878
show more ...
|
| 1779ba6b | 19-May-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: switch to the new authentication framework
This patch modifies the Trusted Board Boot implementation to use the new authentication framework, making use of the authentication module, the cryto
TBB: switch to the new authentication framework
This patch modifies the Trusted Board Boot implementation to use the new authentication framework, making use of the authentication module, the cryto module and the image parser module to authenticate the images in the Chain of Trust.
A new function 'load_auth_image()' has been implemented. When TBB is enabled, this function will call the authentication module to authenticate parent images following the CoT up to the root of trust to finally load and authenticate the requested image.
The platform is responsible for picking up the right makefiles to build the corresponding cryptographic and image parser libraries. ARM platforms use the mbedTLS based libraries.
The platform may also specify what key algorithm should be used to sign the certificates. This is done by declaring the 'KEY_ALG' variable in the platform makefile. FVP and Juno use ECDSA keys.
On ARM platforms, BL2 and BL1-RW regions have been increased 4KB each to accommodate the ECDSA code.
REMOVED BUILD OPTIONS:
* 'AUTH_MOD'
Change-Id: I47d436589fc213a39edf5f5297bbd955f15ae867
show more ...
|
| 16948ae1 | 13-Apr-2015 |
Juan Castillo <juan.castillo@arm.com> |
Use numbers to identify images instead of names
The Trusted firmware code identifies BL images by name. The platform port defines a name for each image e.g. the IO framework uses this mechanism in t
Use numbers to identify images instead of names
The Trusted firmware code identifies BL images by name. The platform port defines a name for each image e.g. the IO framework uses this mechanism in the platform function plat_get_image_source(). For a given image name, it returns the handle to the image file which involves comparing images names. In addition, if the image is packaged in a FIP, a name comparison is required to find the UUID for the image. This method is not optimal.
This patch changes the interface between the generic and platform code with regard to identifying images. The platform port must now allocate a unique number (ID) for every image. The generic code will use the image ID instead of the name to access its attributes.
As a result, the plat_get_image_source() function now takes an image ID as an input parameter. The organisation of data structures within the IO framework has been rationalised to use an image ID as an index into an array which contains attributes of the image such as UUID and name. This prevents the name comparisons.
A new type 'io_uuid_spec_t' has been introduced in the IO framework to specify images identified by UUID (i.e. when the image is contained in a FIP file). There is no longer need to maintain a look-up table [iname_name --> uuid] in the io_fip driver code.
Because image names are no longer mandatory in the platform port, the debug messages in the generic code will show the image identifier instead of the file name. The platforms that support semihosting to load images (i.e. FVP) must provide the file names as definitions private to the platform.
The ARM platform ports and documentation have been updated accordingly. All ARM platforms reuse the image IDs defined in the platform common code. These IDs will be used to access other attributes of an image in subsequent patches.
IMPORTANT: applying this patch breaks compatibility for platforms that use TF BL1 or BL2 images or the image loading code. The platform port must be updated to match the new interface.
Change-Id: I9c1b04cb1a0684c6ee65dee66146dd6731751ea5
show more ...
|
| d5e0a933 | 10-Mar-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: replace assert() with runtime checks in PolarSSL module
Using assert() to check the length of keys and hashes included in a certificate is not a safe approach because assert() only applies to d
TBB: replace assert() with runtime checks in PolarSSL module
Using assert() to check the length of keys and hashes included in a certificate is not a safe approach because assert() only applies to debug builds. A malformed certificate could exploit security flaws in release binaries due to buffer overflows.
This patch replaces assert() with runtime checkings in the PolarSSL authentication module, so malformed certificates can not cause a memory overflow.
Change-Id: I42ba912020595752c806cbd242fe3c74077d993b
show more ...
|
| c3da66b1 | 05-Mar-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: use ASN.1 type DigestInfo to represent hashes
The cert_create tool calculates the hash of each BL image and includes it as an ASN.1 OCTET STRING in the corresponding certificate extension. With
TBB: use ASN.1 type DigestInfo to represent hashes
The cert_create tool calculates the hash of each BL image and includes it as an ASN.1 OCTET STRING in the corresponding certificate extension. Without additional information, the firmware running on the platform has to know in advance the algorithm used to generate the hash.
This patch modifies the cert_create tool so the certificate extensions that include an image hash are generated according to the following ASN.1 structure:
DigestInfo ::= SEQUENCE { digestAlgorithm AlgorithmIdentifier, digest OCTET STRING }
AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL }
The PolarSSL module has been updated to extract the image hash from the certificate extension according to this structure.
Change-Id: I6d83430f12a8a0eea8447bec7c936e903f644c85
show more ...
|
| 1b70db06 | 23-Mar-2015 |
Dan Handley <dan.handley@arm.com> |
Fix type mismatches in verbose logging
Commit dad2504 adds support for type checking in printf-like functions. Some of the VERBOSE logging statements were not updated at that time.
Fix the type mis
Fix type mismatches in verbose logging
Commit dad2504 adds support for type checking in printf-like functions. Some of the VERBOSE logging statements were not updated at that time.
Fix the type mismatches in the verbose logging statements.
Change-Id: Idd9a49e41cc0dc31f7698e220819d934e3d2d10e
show more ...
|
| 8b779620 | 24-Mar-2015 |
Kévin Petit <kevin.petit@arm.com> |
Add support to indicate size and end of assembly functions
In order for the symbol table in the ELF file to contain the size of functions written in assembly, it is necessary to report it to the ass
Add support to indicate size and end of assembly functions
In order for the symbol table in the ELF file to contain the size of functions written in assembly, it is necessary to report it to the assembler using the .size directive.
To fulfil the above requirements, this patch introduces an 'endfunc' macro which contains the .endfunc and .size directives. It also adds a .func directive to the 'func' assembler macro.
The .func/.endfunc have been used so the assembler can fail if endfunc is omitted.
Fixes ARM-Software/tf-issues#295
Change-Id: If8cb331b03d7f38fe7e3694d4de26f1075b278fc Signed-off-by: Kévin Petit <kevin.petit@arm.com>
show more ...
|
| 81ee0983 | 10-Mar-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: remove PolarSSL SHA1 functions from the binary
Commit ea4ec3aad5e1 ("TBB: use SHA256 to generate the certificate signatures") updated the cert_create tool to generate the signatures using SHA25
TBB: remove PolarSSL SHA1 functions from the binary
Commit ea4ec3aad5e1 ("TBB: use SHA256 to generate the certificate signatures") updated the cert_create tool to generate the signatures using SHA256 instead of SHA1. Therefore, SHA1 is no longer required.
This patch removes the SHA1 option from the PolarSSL configuration file. The source file sha1.c is no longer needed and has been excluded from the build. The SHA1 functions are no longer included in the binary, reducing the memory footprint of BL1 and BL2 by approximately 6 KB.
Change-Id: I72ea2cff03c0964c3eaadce148ec2ad2c6dde2e3
show more ...
|
| ba592e28 | 05-Mar-2015 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Fix violations to the coding style
All coding style violations have been fixed in a previous patch and since then, each individual patch has been checked in this regard. However, the latest version
Fix violations to the coding style
All coding style violations have been fixed in a previous patch and since then, each individual patch has been checked in this regard. However, the latest version of the checkpatch.pl script from the Linux kernel is more advanced and it is able to flag new errors in the Trusted Firmware codebase. This patch fixes them.
Change-Id: I1f332f2440984be85d36b231bb83260368987077
show more ...
|
| 40febc3a | 13-Jan-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: add authentication module interface
This patch provides an API to access the authentication module that will be used to verify the authenticity of the images loaded into memory as part of the T
TBB: add authentication module interface
This patch provides an API to access the authentication module that will be used to verify the authenticity of the images loaded into memory as part of the Trusted Board Boot process.
To include the authentication module as part of the build, set the boolean build option TRUSTED_BOARD_BOOT. One single authentication module must be registered at build time by setting the build option AUTH_MOD=<mod_name>. All authentication modules will be located in 'common/auth/<mod_name>' and must present the <mod_name>.mk file that will be included by the build system to compile the module sources.
To create an authentication module, an instance of auth_mod_t called 'auth_mod' must be declared in the module sources. The initialization and verification functions provided by the module will be exported through the function pointers specified when declaring this instance.
If an authentication module includes third party sources that do not adhere to the C99 standard, the -pedantic option may be removed from the build options by setting the flag DISABLE_PEDANTIC in the module file <mod_name>.mk.
Change-Id: I080bb04bd421029bcdf22ec2c63807afbf061dcd
show more ...
|
| db6071c9 | 13-Jan-2015 |
Juan Castillo <juan.castillo@arm.com> |
TBB: add PolarSSL based authentication module
This patch implements an authentication module based on the PolarSSL library (v1.3.9) to verify the Chain of Trust when Trusted Boot is enabled.
PolarS
TBB: add PolarSSL based authentication module
This patch implements an authentication module based on the PolarSSL library (v1.3.9) to verify the Chain of Trust when Trusted Boot is enabled.
PolarSSL sources must be fetched separately. The POLARSSL_DIR build option may be used to indicate the path to the PolarSSL main directory (this directory must contain the 'include' and 'library' subdirectories).
To be able to build PolarSSL sources as a part of the Trusted Firmware build process, the DISABLE_PEDANTIC flag in polarssl.mk will tell the build system to remove the -pedantic option from the CFLAGS.
Inclusion of PolarSSL increases the memory requirements of the BL1 and BL2 images. The following are the changes made to the FVP and Juno platforms to cater for this when TRUSTED_BOARD_BOOT is defined:
Changes on FVP:
- BL1 and BL2 stacks have been increased to 4 KB - BL1(rw) section has been increased to 32 KB. - BL2 memory region has been increased to 112 KB
Changes on Juno:
- BL1 and BL2 stacks have been increased to 4 KB - BL1(rw) section has been increased to 32 KB. - Trusted ROM region in Flash has been increased to 128 KB. - BL2 memory region has been increased to 116 KB
Change-Id: Ie87d80d43408eb6239c4acd0ec5ab2120e4e9e80
show more ...
|
| c5fb47c3 | 19-Jan-2015 |
Juan Castillo <juan.castillo@arm.com> |
Skip reserving memory for non-executable and BL3-0 images
This patch adds support to not reserve the memory where an image is loaded if the image is:
1. A non-executable image e.g. a certificate
Skip reserving memory for non-executable and BL3-0 images
This patch adds support to not reserve the memory where an image is loaded if the image is:
1. A non-executable image e.g. a certificate 2. An executable image which is not meant to run on the application CPU (e.g. BL3-0)
Both types of images are characterized by a NULL entrypoint argument to the load_image() function. It is used to distinguish them from other type of images.
Important: Use this feature carefully. The caller is responsible for providing a valid entrypoint while loading images which will execute on the application CPU to prevent a potential overwrite of the corresponding memory region.
Change-Id: Ied482280d9db714c529ec12c33a6c1d918d77a4e
show more ...
|
| aecc0840 | 19-Aug-2014 |
Soby Mathew <soby.mathew@arm.com> |
Rework use of labels in assembly macros.
This patch provides a workaround for the ASM_ASSERT label issue and also reworks the use of labels in assembly macros. If the caller of the ASM_ASSERT macro
Rework use of labels in assembly macros.
This patch provides a workaround for the ASM_ASSERT label issue and also reworks the use of labels in assembly macros. If the caller of the ASM_ASSERT macro happened to use the label '1' to jump past the ASM_ASSERT macro, it would not have worked since the ASM_ASSERT macro internally used the same label. Hence, as a workaround, this patch makes the label a high number in the expectation that the caller will never use it.
Also updated the other assembly macros using numerical labels to named lables.
Change-Id: Iec892359db84f2391ad2a83a92141c4d7049776a
show more ...
|
| 6ad2e461 | 29-Jul-2014 |
Dan Handley <dan.handley@arm.com> |
Rationalize console log output
Fix the following issues with the console log output:
* Make sure the welcome string is the first thing in the log output (during normal boot). * Prefix each message
Rationalize console log output
Fix the following issues with the console log output:
* Make sure the welcome string is the first thing in the log output (during normal boot). * Prefix each message with the BL image name so it's clear which BL the output is coming from. * Ensure all output is wrapped in one of the log output macros so it can be easily compiled out if necessary. Change some of the INFO() messages to VERBOSE(), especially in the TSP. * Create some extra NOTICE() and INFO() messages during cold boot. * Remove all usage of \r in log output.
Fixes ARM-software/tf-issues#231
Change-Id: Ib24f7acb36ce64bbba549f204b9cde2dbb46c8a3
show more ...
|