| dd2bdee6 | 28-Jul-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #177 from jcastillo-arm/jc/tf-issues/096
Rework incorrect use of assert() and panic() in codebase |
| d3280beb | 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
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
show more ...
|
| 626ed510 | 25-Jun-2014 |
Soby Mathew <soby.mathew@arm.com> |
Rework the crash reporting in BL3-1 to use less stack
This patch reworks the crash reporting mechanism to further optimise the stack and code size. The reporting makes use of assembly console functi
Rework the crash reporting in BL3-1 to use less stack
This patch reworks the crash reporting mechanism to further optimise the stack and code size. The reporting makes use of assembly console functions to avoid calling C Runtime to report the CPU state. The crash buffer requirement is reduced to 64 bytes with this implementation. The crash buffer is now part of per-cpu data which makes retrieving the crash buffer trivial.
Also now panic() will use crash reporting if invoked from BL3-1.
Fixes ARM-software/tf-issues#199
Change-Id: I79d27a4524583d723483165dc40801f45e627da5
show more ...
|
| bc920128 | 14-Jul-2014 |
Soby Mathew <soby.mathew@arm.com> |
Implement an assert() callable from assembly code
The patch implements a macro ASM_ASSERT() which can be invoked from assembly code. When assertion happens, file name and line number of the check is
Implement an assert() callable from assembly code
The patch implements a macro ASM_ASSERT() which can be invoked from assembly code. When assertion happens, file name and line number of the check is written to the crash console.
Fixes ARM-software/tf-issues#95
Change-Id: I6f905a068e1c0fa4f746d723f18df60daaa00a86
show more ...
|
| b79af934 | 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
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
show more ...
|
| 8f55dfb4 | 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
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
show more ...
|
| 63db7ba2 | 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
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
show more ...
|
| dec5e0d1 | 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. T
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
show more ...
|
| 6871c5d3 | 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
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
show more ...
|
| 4112bfa0 | 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
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
show more ...
|
| 29fb905d | 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 a
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
show more ...
|
| 23ff9baa | 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 i
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
show more ...
|
| a43d431b | 07-Apr-2014 |
Soby Mathew <soby.mathew@arm.com> |
Rework BL3-1 unhandled exception handling and reporting
This patch implements the register reporting when unhandled exceptions are taken in BL3-1. Unhandled exceptions will result in a dump of regis
Rework BL3-1 unhandled exception handling and reporting
This patch implements the register reporting when unhandled exceptions are taken in BL3-1. Unhandled exceptions will result in a dump of registers to the console, before halting execution by that CPU. The Crash Stack, previously called the Exception Stack, is used for this activity. This stack is used to preserve the CPU context and runtime stack contents for debugging and analysis.
This also introduces the per_cpu_ptr_cache, referenced by tpidr_el3, to provide easy access to some of BL3-1 per-cpu data structures. Initially, this is used to provide a pointer to the Crash stack.
panic() now prints the the error file and line number in Debug mode and prints the PC value in release mode.
The Exception Stack is renamed to Crash Stack with this patch. The original intention of exception stack is no longer valid since we intend to support several valid exceptions like IRQ and FIQ in the trusted firmware context. This stack is now utilized for dumping and reporting the system state when a crash happens and hence the rename.
Fixes ARM-software/tf-issues#79 Improve reporting of unhandled exception
Change-Id: I260791dc05536b78547412d147193cdccae7811a
show more ...
|
| b3254e85 | 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: If9aebadf
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
show more ...
|
| 625de1d4 | 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 cha
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
show more ...
|
| 97043ac9 | 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
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
show more ...
|
| fb037bfb | 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 imp
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
show more ...
|
| 35e98e55 | 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
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
show more ...
|
| 4ecca339 | 09-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Move include and source files to logical locations
Move almost all system include files to a logical sub-directory under ./include. The only remaining system include directories not under ./include
Move include and source files to logical locations
Move almost all system include files to a logical sub-directory under ./include. The only remaining system include directories not under ./include are specific to the platform. Move the corresponding source files to match the include directory structure.
Also remove pm.h as it is no longer used.
Change-Id: Ie5ea6368ec5fad459f3e8a802ad129135527f0b3
show more ...
|
| 6c595b3d | 24-Mar-2014 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Separate out BL2, BL3-1 and BL3-2 early exception vectors from BL1
bl1/aarch64/early_exceptions.S used to be re-used by BL2, BL3-1 and BL3-2. There was some early SMC handling code in there that wa
Separate out BL2, BL3-1 and BL3-2 early exception vectors from BL1
bl1/aarch64/early_exceptions.S used to be re-used by BL2, BL3-1 and BL3-2. There was some early SMC handling code in there that was not required by the other bootloader stages. Therefore this patch introduces an even simpler exception vector source file for BL2, BL3-1 and BL3-2.
Fixes ARM-software/tf-issues#38
Change-Id: I0244b80e9930b0f8035156a0bf91cc3e9a8f995d
show more ...
|
| 6ba0b6d6 | 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 current
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
show more ...
|
| ee9ad785 | 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: I8dc067b69fc711433651a560ba5a8c35
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>
show more ...
|
| 090630e4 | 20-Feb-2014 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Tolerate runtime service initialization failure
At present, the firmware panics if a runtime service fails to initialize. An earlier patch had implemented late binding for all runtime service handle
Tolerate runtime service initialization failure
At present, the firmware panics if a runtime service fails to initialize. An earlier patch had implemented late binding for all runtime service handlers.
With that in place, this patch allows the firmware to proceed even when a service fails to initialize.
Change-Id: I6cf4de2cecea9719f4cd48272a77cf459b080d4e
show more ...
|
| 08c28d53 | 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: I5141653c8249
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
show more ...
|
| 0a9f7473 | 09-Feb-2014 |
Achin Gupta <achin.gupta@arm.com> |
Move PSCI to runtime services directory
This patch creates a 'services' directory and moves the PSCI under it. Other runtime services e.g. the Secure Payload Dispatcher service will be placed under
Move PSCI to runtime services directory
This patch creates a 'services' directory and moves the PSCI under it. Other runtime services e.g. the Secure Payload Dispatcher service will be placed under the same directory in the future.
Also fixes issue ARM-software/tf-issues#12
Change-Id: I187f83dcb660b728f82155d91882e961d2255068
show more ...
|