| 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 ...
|
| b793e431 | 09-May-2014 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
fvp: Provide per-EL MMU setup functions
Instead of having a single version of the MMU setup functions for all bootloader images that can execute either in EL3 or in EL1, provide separate functions f
fvp: Provide per-EL MMU setup functions
Instead of having a single version of the MMU setup functions for all bootloader images that can execute either in EL3 or in EL1, provide separate functions for EL1 and EL3. Each bootloader image can then call the appropriate version of these functions. The aim is to reduce the amount of code compiled in each BL image by embedding only what's needed (e.g. BL1 to embed only EL3 variants).
Change-Id: Ib86831d5450cf778ae78c9c1f7553fe91274c2fa
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 ...
|
| 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 ...
|
| 8cec598b | 28-Apr-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Correct usage of data and instruction barriers
The current code does not always use data and instruction barriers as required by the architecture and frequently uses barriers excessively due to thei
Correct usage of data and instruction barriers
The current code does not always use data and instruction barriers as required by the architecture and frequently uses barriers excessively due to their inclusion in all of the write_*() helper functions.
Barriers should be used explicitly in assembler or C code when modifying processor state that requires the barriers in order to enable review of correctness of the code.
This patch removes the barriers from the helper functions and introduces them as necessary elsewhere in the code.
PORTING NOTE: check any port of Trusted Firmware for use of system register helper functions for reliance on the previous barrier behaviour and add explicit barriers as necessary.
Fixes ARM-software/tf-issues#92
Change-Id: Ie63e187404ff10e0bdcb39292dd9066cb84c53bf
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 ...
|
| 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 ...
|
| 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 ...
|
| 0a30cf54 | 18-Mar-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Place assembler functions in separate sections
This extends the --gc-sections behaviour to the many assembler support functions in the firmware images by placing each function into its own code sect
Place assembler functions in separate sections
This extends the --gc-sections behaviour to the many assembler support functions in the firmware images by placing each function into its own code section. This is achieved by creating a 'func' macro used to declare each function label.
Fixes ARM-software/tf-issues#80
Change-Id: I301937b630add292d2dec6d2561a7fcfa6fec690
show more ...
|
| d118f9f8 | 21-Mar-2014 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Add standby state support in PSCI cpu_suspend api
This patch adds support in the generic PSCI implementation to call a platform specific function to enter a standby state using an example implementa
Add standby state support in PSCI cpu_suspend api
This patch adds support in the generic PSCI implementation to call a platform specific function to enter a standby state using an example implementation in ARM FVP port
Fixes ARM-software/tf-issues#94 Change-Id: Ic1263fcf25f28e09162ad29dca954125f9aa8cc9
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 ...
|
| 64f6ea9b | 28-Feb-2014 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Implement ARM Standard Service
This patch implements ARM Standard Service as a runtime service and adds support for call count, UID and revision information SMCs. The existing PSCI implementation is
Implement ARM Standard Service
This patch implements ARM Standard Service as a runtime service and adds support for call count, UID and revision information SMCs. The existing PSCI implementation is subsumed by the Standard Service calls and all PSCI calls are therefore dispatched by the Standard Service to the PSCI handler.
At present, PSCI is the only specification under Standard Service. Thus call count returns the number of PSCI calls implemented. As this is the initial implementation, a revision number of 0.1 is returned for call revision.
Fixes ARM-software/tf-issues#62
Change-Id: I6d4273f72ad6502636efa0f872e288b191a64bc1
show more ...
|