| 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 ...
|
| 317ba090 | 09-May-2014 |
Achin Gupta <achin.gupta@arm.com> |
Fix broken standby state implementation in PSCI
This patch fixes the broken support for entry into standby states introduced under commit-id 'd118f9f864' (tf-issues#94). Upon exit from the platform
Fix broken standby state implementation in PSCI
This patch fixes the broken support for entry into standby states introduced under commit-id 'd118f9f864' (tf-issues#94). Upon exit from the platform defined standby state instead of returning to the caller of the SMC, execution would get stuck in the wfi instruction meant for entering a power down state. This patch ensures that exit from a standby state and entry into a power down state do not interfere with each other.
Fixes ARM-software/tf-issues#154
Change-Id: I56e5df353368e44d6eefc94ffedefe21929f5cfe
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 ...
|
| 401607cf | 08-May-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #63 from soby-mathew/sm/save_callee_saved_registers_in_cpu_context-1
Preserve x19-x29 across world switch for exception handling |
| c3260f9b | 30-Apr-2014 |
Soby Mathew <soby.mathew@arm.com> |
Preserve x19-x29 across world switch for exception handling
Previously exception handlers in BL3-1, X19-X29 were not saved and restored on every SMC/trap into EL3. Instead these registers were 'save
Preserve x19-x29 across world switch for exception handling
Previously exception handlers in BL3-1, X19-X29 were not saved and restored on every SMC/trap into EL3. Instead these registers were 'saved as needed' as a side effect of the A64 ABI used by the C compiler.
That approach failed when world switching but was not visible with the TSP/TSPD code because the TSP is 64-bit, did not clobber these registers when running and did not support pre-emption by normal world interrupts. These scenarios showed that the values in these registers can be passed through a world switch, which broke the normal and trusted world assumptions about these registers being preserved.
The Ideal solution saves and restores these registers when a world switch occurs - but that type of implementation is more complex. So this patch always saves and restores these registers on entry and exit of EL3.
Fixes ARM-software/tf-issues#141
Change-Id: I9a727167bbc594454e81cf78a97ca899dfb11c27
show more ...
|
| fd6fede5 | 08-May-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #58 from athoelke/optimise-cache-flush-v2
Optimise data cache clean/invalidate operation v2 |
| 8067ae3f | 08-May-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #61 from athoelke/use-mrs-msr-from-assembler-v2
Use MRS/MSR instructions in assembler code v2 |
| a1ec2f4c | 08-May-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #60 from athoelke/disable-mmu-v2
Replace disable_mmu with assembler version v2 |
| 31bce47e | 06-May-2014 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Remove unused 'PL011_BASE' macro
'PL011_BASE' macro is no longer used because the right UART base address is now directly given to the 'console_init()' function. This patch removes it.
Change-Id: I
Remove unused 'PL011_BASE' macro
'PL011_BASE' macro is no longer used because the right UART base address is now directly given to the 'console_init()' function. This patch removes it.
Change-Id: I94759c99602df4876291a56f9f6a75de337a65ec
show more ...
|
| 5f6032a8 | 25-Apr-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Optimise data cache clean/invalidate operation
The data cache clean and invalidate operations dcsw_op_all() and dcsw_op_loius() were implemented to invoke a DSB and ISB barrier for every set/way ope
Optimise data cache clean/invalidate operation
The data cache clean and invalidate operations dcsw_op_all() and dcsw_op_loius() were implemented to invoke a DSB and ISB barrier for every set/way operation. This adds a substantial performance penalty to an already expensive operation.
These functions have been reworked to provide an optimised implementation derived from the code in section D3.4 of the ARMv8 ARM. The helper macro setup_dcsw_op_args has been moved and reworked alongside the implementation.
Fixes ARM-software/tf-issues#146
Change-Id: Icd5df57816a83f0a842fce935320a369f7465c7f
show more ...
|
| 228a9f0b | 28-Apr-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Remove unused or invalid asm helper functions
There are a small number of non-EL specific helper functions which are no longer used, and also some unusable helper functions for non-existant register
Remove unused or invalid asm helper functions
There are a small number of non-EL specific helper functions which are no longer used, and also some unusable helper functions for non-existant registers.
This change removes all of these functions.
Change-Id: Idd656cef3b59cf5c46fe2be4029d72288b649c24
show more ...
|
| 7935d0a5 | 28-Apr-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Access system registers directly in assembler
Instead of using the system register helper functions to read or write system registers, assembler coded functions should use MRS/MSR instructions. This
Access system registers directly in assembler
Instead of using the system register helper functions to read or write system registers, assembler coded functions should use MRS/MSR instructions. This results in faster and more compact code.
This change replaces all usage of the helper functions with direct register accesses.
Change-Id: I791d5f11f257010bb3e6a72c6c5ab8779f1982b3
show more ...
|
| 2f5dcfef | 28-Apr-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Replace disable_mmu with assembler version
disable_mmu() cannot work as a C function as there is no control over data accesses generated by the compiler between disabling and cleaning the data cache
Replace disable_mmu with assembler version
disable_mmu() cannot work as a C function as there is no control over data accesses generated by the compiler between disabling and cleaning the data cache. This results in reading stale data from main memory.
As assembler version is provided for EL3, and a variant that also disables the instruction cache which is now used by the BL1 exception handling function.
Fixes ARM-software/tf-issues#147
Change-Id: I0cf394d2579a125a23c2f2989c2e92ace6ddb1a6
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 ...
|
| c5945735 | 23-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Move PSCI global functions out of private header
Move the PSCI global functions out of psci_private.h and into psci.h to allow the standard service to only depend on psci.h.
Change-Id: I8306924a381
Move PSCI global functions out of private header
Move the PSCI global functions out of psci_private.h and into psci.h to allow the standard service to only depend on psci.h.
Change-Id: I8306924a3814b46e70c1dcc12524c7aefe06eed1
show more ...
|
| 5b827a8f | 17-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Separate BL functions out of arch.h
Move the BL function prototypes out of arch.h and into the appropriate header files to allow more efficient header file inclusion. Create new BL private header fi
Separate BL functions out of arch.h
Move the BL function prototypes out of arch.h and into the appropriate header files to allow more efficient header file inclusion. Create new BL private header files where there is no sensible existing header file.
Change-Id: I45f3e10b72b5d835254a6f25a5e47cf4cfb274c3
show more ...
|
| 8a4fb6f6 | 17-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Refactor GIC header files
Move the function prototypes from gic.h into either gic_v2.h or gic_v3.h as appropriate. Update the source files to include the correct headers.
Change-Id: I368cfda175cdcb
Refactor GIC header files
Move the function prototypes from gic.h into either gic_v2.h or gic_v3.h as appropriate. Update the source files to include the correct headers.
Change-Id: I368cfda175cdcbd3a68f46e2332738ec49048e19
show more ...
|
| bdbfc3c2 | 17-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Separate out CASSERT macro into own header
Separate out the CASSERT macro out of bl_common.h into its own header to allow more efficient header inclusion.
Change-Id: I291be0b6b8f9879645e839a8f0dd1e
Separate out CASSERT macro into own header
Separate out the CASSERT macro out of bl_common.h into its own header to allow more efficient header inclusion.
Change-Id: I291be0b6b8f9879645e839a8f0dd1ec9b3db9639
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 ...
|
| e8246c07 | 11-Apr-2014 |
Dan Handley <dan.handley@arm.com> |
Move FVP power driver to FVP platform
Move the FVP power driver to a directory under the FVP platform port as this is not a generically usable driver.
Change-Id: Ibc78bd88752eb3e3964336741488349ac3
Move FVP power driver to FVP platform
Move the FVP power driver to a directory under the FVP platform port as this is not a generically usable driver.
Change-Id: Ibc78bd88752eb3e3964336741488349ac345f4f0
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 ...
|
| 759ec93b | 01-Apr-2014 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Preserve PSCI cpu_suspend 'power_state' parameter.
This patch saves the 'power_state' parameter prior to suspending a cpu and invalidates it upon its resumption. The 'affinity level' and 'state id'
Preserve PSCI cpu_suspend 'power_state' parameter.
This patch saves the 'power_state' parameter prior to suspending a cpu and invalidates it upon its resumption. The 'affinity level' and 'state id' fields of this parameter can be read using a set of public and private apis. Validation of power state parameter is introduced which checks for SBZ bits are zero. This change also takes care of flushing the parameter from the cache to main memory. This ensures that it is available after cpu reset when the caches and mmu are turned off. The earlier support for saving only the 'affinity level' field of the 'power_state' parameter has also been reworked.
Fixes ARM-Software/tf-issues#26 Fixes ARM-Software/tf-issues#130
Change-Id: Ic007ccb5e39bf01e0b67390565d3b4be33f5960a
show more ...
|
| cd116d17 | 01-Apr-2014 |
Harry Liebel <Harry.Liebel@arm.com> |
Add TrustZone (TZC-400) driver
The TZC-400 performs security checks on transactions to memory or peripherals. Separate regions can be created in the address space each with individual security setti
Add TrustZone (TZC-400) driver
The TZC-400 performs security checks on transactions to memory or peripherals. Separate regions can be created in the address space each with individual security settings.
Limitations: This driver does not currently support raising an interrupt on access violation.
Change-Id: Idf8ed64b4d8d218fc9b6f9d75acdb2cd441d2449
show more ...
|