History log of /device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c5fb47c389000c7a5189c0ad28a26bf50bf7e65c 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
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
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
6ad2e461f0cd6de5aefd89fa0ba7acf2c293b8c2 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 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
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
d3280beb700321b0ef47b4f61d84667ba501bc61 05-Jun-2014 Juan Castillo <juan.castillo@arm.com> Rework incorrect use of assert() and panic() in codebase

Assert a valid security state using the macro sec_state_is_valid().
Replace assert() with panic() in those cases that might arise
because of runtime errors and not programming errors.
Replace panic() with assert() in those cases that might arise
because of programming errors.

Fixes ARM-software/tf-issues#96

Change-Id: I51e9ef0439fd5ff5e0edfef49050b69804bf14d5
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
b79af9344503b2d7b435451cfb8b1ab80b8afdf4 12-Jun-2014 Soby Mathew <soby.mathew@arm.com> Implement a leaner printf for Trusted Firmware

This patch implements a "tf_printf" which supports only the commonly
used format specifiers in Trusted Firmware, which uses a lot less
stack space than the stdlib printf function.

Fixes ARM-software/tf-issues#116

Change-Id: I7dfa1944f4c1e634b3e2d571f49afe02d109a351
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
8f55dfb4ba1a7c2cb5af355ff614923b6000864d 24-Jun-2014 Sandrine Bailleux <sandrine.bailleux@arm.com> Remove concept of top/bottom image loading

This concept is no longer required since we now support loading of
images at fixed addresses only.

The image loader now automatically detects the position of the image
inside the current memory layout and updates the layout such that
memory fragmentation is minimised.

The 'attr' field of the meminfo data structure, which used to hold
the bottom/top loading information, has been removed. Also the 'next'
field has been removed as it wasn't used anywhere.

The 'init_bl2_mem_layout()' function has been moved out of common
code and put in BL1-specific code. It has also been renamed into
'bl1_init_bl2_mem_layout'.

Fixes ARM-software/tf-issues#109

Change-Id: I3f54642ce7b763d5ee3b047ad0ab59eabbcf916d
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
63db7ba2931f477ae09811a650825b44a967ea73 28-May-2014 Sandrine Bailleux <sandrine.bailleux@arm.com> Make the entry point argument optional in load_image()

There are cases where the entry point information is useless to the
caller, e.g. when an image just needs to be loaded in memory but won't
ever be executed.

This patch allows load_image() function to take a NULL pointer as the
entry point argument. In this case, it won't be populated.

Change-Id: Ie9394b054457706c6699926c5e0206e0c3851c56
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
dec5e0d1da9fdfe68cea4fbeb096f93e43860493 15-May-2014 Dan Handley <dan.handley@arm.com> Move BL porting functions into platform.h

Some platform porting functions were in BL specific header files.
These have been moved to platform.h so that all porting functions
are in the same place. The functions are now grouped by BL.
Obsolete BL headers files have been removed.

Also, the weak declaration of the init_bl2_mem_layout() function
has been moved out the header file and into the source file
(bl_common.c) using the more succinct #pragma syntax. This
mitigates the risk of 2 weak definitions being created and the
wrong one being picked up by the compiler.

Change-Id: Ib19934939fd755f3e5a5a5bceec88da684308a83
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
6871c5d3a227cb95008a25e90e358ec0ac615222 16-May-2014 Vikram Kanigiri <vikram.kanigiri@arm.com> Rework memory information passing to BL3-x images

The issues addressed in this patch are:

1. Remove meminfo_t from the common interfaces in BL3-x,
expecting that platform code will find a suitable mechanism
to determine the memory extents in these images and provide
it to the BL3-x images.

2. Remove meminfo_t and bl31_plat_params_t from all FVP BL3-x
code as the images use link-time information to determine
memory extents.

meminfo_t is still used by common interface in BL1/BL2 for
loading images

Change-Id: I4e825ebf6f515b59d84dc2bdddf6edbf15e2d60f
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
4112bfa0c223eda73af1cfe57ca7dc926f767dd8 15-Apr-2014 Vikram Kanigiri <vikram.kanigiri@arm.com> Populate BL31 input parameters as per new spec

This patch is based on spec published at
https://github.com/ARM-software/tf-issues/issues/133

It rearranges the bl31_args struct into
bl31_params and bl31_plat_params which provide the
information needed for Trusted firmware and platform
specific data via x0 and x1

On the FVP platform BL3-1 params and BL3-1 plat params
and its constituents are stored at the start of TZDRAM.

The information about memory availability and size for
BL3-1, BL3-2 and BL3-3 is moved into platform specific data.

Change-Id: I8b32057a3d0dd3968ea26c2541a0714177820da9
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
29fb905d5f36a415a170a4bffeadf13b5f084345 15-May-2014 Vikram Kanigiri <vikram.kanigiri@arm.com> Rework handover interface between BL stages

This patch reworks the handover interface from: BL1 to BL2 and
BL2 to BL3-1. It removes the raise_el(), change_el(), drop_el()
and run_image() functions as they catered for code paths that were
never exercised.
BL1 calls bl1_run_bl2() to jump into BL2 instead of doing the same
by calling run_image(). Similarly, BL2 issues the SMC to transfer
execution to BL3-1 through BL1 directly. Only x0 and x1 are used
to pass arguments to BL31. These arguments and parameters for
running BL3-1 are passed through a reference to a
'el_change_info_t' structure. They were being passed value in
general purpose registers earlier.

Change-Id: Id4fd019a19a9595de063766d4a66295a2c9307e1
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
23ff9baa7e01eac3a451f2e8ed768c9b90d3567a 13-May-2014 Vikram Kanigiri <vikram.kanigiri@arm.com> Introduce macros to manipulate the SPSR

This patch introduces macros (SPSR_64 and SPSR_32) to
create a SPSR for both aarch32 and aarch64 execution
states. These macros allow the user to set fields
in the SPSR depending upon its format.
The make_spsr() function which did not allow
manipulation of all the fields in the aarch32 SPSR
has been replaced by these new macros.

Change-Id: I9425dda0923e8d5f03d03ddb8fa0e28392c4c61e
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
b3254e8547707ff57ed7766aba53933884bd6a1c 09-May-2014 Sandrine Bailleux <sandrine.bailleux@arm.com> Introduce IS_IN_ELX() macros

The goal of these macros is to improve code readability by providing
a concise way to check whether we are running in the expected
exception level.

Change-Id: If9aebadfb6299a5196e9a582b442f0971d9909b1
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
625de1d4f04b30383354bee944d0a7ca3dba1e67 23-Apr-2014 Dan Handley <dan.handley@arm.com> Remove variables from .data section

Update code base to remove variables from the .data section,
mainly by using const static data where possible and adding
the const specifier as required. Most changes are to the IO
subsystem, including the framework APIs. The FVP power
management code is also affected.

Delay initialization of the global static variable,
next_image_type in bl31_main.c, until it is realy needed.
Doing this moves the variable from the .data to the .bss
section.

Also review the IO interface for inconsistencies, using
uintptr_t where possible instead of void *. Remove the
io_handle and io_dev_handle typedefs, which were
unnecessary, replacing instances with uintptr_t.

Fixes ARM-software/tf-issues#107.

Change-Id: I085a62197c82410b566e4698e5590063563ed304
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
97043ac98e13a726dbf8b3b41654dca759e3da2c 09-Apr-2014 Dan Handley <dan.handley@arm.com> Reduce deep nesting of header files

Reduce the number of header files included from other header
files as much as possible without splitting the files. Use forward
declarations where possible. This allows removal of some unnecessary
"#ifndef __ASSEMBLY__" statements.

Also, review the .c and .S files for which header files really need
including and reorder the #include statements alphabetically.

Fixes ARM-software/tf-issues#31

Change-Id: Iec92fb976334c77453e010b60bcf56f3be72bd3e
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
fb037bfb7cbf7b404c069b4ebac5a10059d948b1 10-Apr-2014 Dan Handley <dan.handley@arm.com> Always use named structs in header files

Add tag names to all unnamed structs in header files. This
allows forward declaration of structs, which is necessary to
reduce header file nesting (to be implemented in a subsequent
commit).

Also change the typedef names across the codebase to use the _t
suffix to be more conformant with the Linux coding style. The
coding style actually prefers us not to use typedefs at all but
this is considered a step too far for Trusted Firmware.

Also change the IO framework structs defintions to use typedef'd
structs to be consistent with the rest of the codebase.

Change-Id: I722b2c86fc0d92e4da3b15e5cab20373dd26786f
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
35e98e5588d09145f7d0d4d98624f6b75321a187 09-Apr-2014 Dan Handley <dan.handley@arm.com> Make use of user/system includes more consistent

Make codebase consistent in its use of #include "" syntax for
user includes and #include <> syntax for system includes.

Fixes ARM-software/tf-issues#65

Change-Id: If2f7c4885173b1fd05ac2cde5f1c8a07000c7a33
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
6ba0b6d6743534b3d443602dc88558d62ea432b3 11-Mar-2014 Vikram Kanigiri <vikram.kanigiri@arm.com> Remove partially qualified asm helper functions

Each ARM Trusted Firmware image should know in which EL it is running
and it should use the corresponding register directly instead of reading
currentEL and knowing which asm register to read/write

Change-Id: Ief35630190b6f07c8fbb7ba6cb20db308f002945
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
ee9ad7856c21835c0ad080d1e04d90e8c3535a4c 04-Feb-2014 Ryan Harkin <ryan.harkin@linaro.org> bl_common: add image_size()

Fixes ARM-software/tf-issues#42

Some callers of load_image() may need to get the size of the image
before/after loading it.

Change-Id: I8dc067b69fc711433651a560ba5a8c3519445857
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
08c28d5385f8fae3d5c61475a109b86ef11770d0 20-Feb-2014 Jeenu Viswambharan <jeenu.viswambharan@arm.com> Report recoverable errors as warnings

At present many recoverable failures are reported as errors. This patch
modifies all such failures to be reported as warnings instead.

Change-Id: I5141653c82498defcada9b90fdf7498ba496b2f2
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
e4d084ea9629703166e59d116d4aefbd6f2be531 19-Feb-2014 Achin Gupta <achin.gupta@arm.com> Rework BL2 to BL3-1 hand over interface

This patch reworks BL2 to BL3-1 hand over interface by introducing a
composite structure (bl31_args) that holds the superset of information
that needs to be passed from BL2 to BL3-1.

- The extents of secure memory available to BL3-1
- The extents of memory available to BL3-2 (not yet implemented) and
BL3-3
- Information to execute BL3-2 (not yet implemented) and BL3-3 images

This patch also introduces a new platform API (bl2_get_bl31_args_ptr)
that needs to be implemented by the platform code to export reference to
bl31_args structure which has been allocated in platform-defined memory.

The platform will initialize the extents of memory available to BL3-3
during early platform setup in bl31_args structure. This obviates the
need for bl2_get_ns_mem_layout platform API.

BL2 calls the bl2_get_bl31_args_ptr function to get a reference to
bl31_args structure. It uses the 'bl33_meminfo' field of this structure
to load the BL3-3 image. It sets the entry point information for the
BL3-3 image in the 'bl33_image_info' field of this structure. The
reference to this structure is passed to the BL3-1 image.

Also fixes issue ARM-software/tf-issues#25

Change-Id: Ic36426196dd5ebf89e60ff42643bed01b3500517
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
9d72b4ea9c7d9cac386f70d8a6581d4b1a45d7b0 10-Feb-2014 James Morrissey <james.morrissey@arm.com> Implement load_image in terms of IO abstraction

The modified implementation uses the IO abstraction rather than
making direct semi-hosting calls. The semi-hosting driver is now
registered for the FVP platform during initialisation of each boot
stage where it is used. Additionally, the FVP platform includes a
straightforward implementation of 'plat_get_image_source' which
provides a generic means for the 'load_image' function to determine
how to access the image data.

Change-Id: Ia34457b471dbee990c7b3c79de7aee4ceea51aa6
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
40a6f64795847f2b96ec24e9b11cb7002f0b48bf 10-Feb-2014 James Morrissey <james.morrissey@arm.com> Fix asserts appearing in release builds

Also fix warnings generated in release builds when assert code
is absent.

Change-Id: I45b9173d3888f9e93e98eb5b4fdc06727ba5cbf4
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
e83b0cadc67882c1ba7f430d16dab80c9b3a0228 14-Jan-2014 Dan Handley <dan.handley@arm.com> Update year in copyright text to 2014

Change-Id: Ic7fb61aabae1d515b9e6baf3dd003807ff42da60
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
ba6980a8db0215ba42c103b80f8981cfda80171c 02-Dec-2013 Sandrine Bailleux <sandrine.bailleux@arm.com> Move RUN_IMAGE constant from bl1.h to bl_common.h

RUN_IMAGE constant is used by all bootloader stages.

Change-Id: I1b4e28d8fcf3ad1363f202c859f5efab0f320efe
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
ab2d31edbd9dea69bd1ca495e3fce0511c9d42ff 02-Dec-2013 Dan Handley <dan.handley@arm.com> Enable third party contributions

- Add instructions for contributing to ARM Trusted Firmware.

- Update copyright text in all files to acknowledge contributors.

Change-Id: I9311aac81b00c6c167d2f8c889aea403b84450e5
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c
4f6ad66ae9fcc8bcb3b0fcee10b7ab1ffcaf1a56 25-Oct-2013 Achin Gupta <achin.gupta@arm.com> ARMv8 Trusted Firmware release v0.2
/device/linaro/bootloader/arm-trusted-firmware/common/bl_common.c