| 8545a874 | 23-May-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Merge pull request #102 from achingupta:ag/tf-issues#104-v2 |
| fa9c08b7 | 09-May-2014 |
Achin Gupta <achin.gupta@arm.com> |
Use secure timer to generate S-EL1 interrupts
This patch adds support in the TSP to program the secure physical generic timer to generate a EL-1 interrupt every half second. It also adds support for
Use secure timer to generate S-EL1 interrupts
This patch adds support in the TSP to program the secure physical generic timer to generate a EL-1 interrupt every half second. It also adds support for maintaining the timer state across power management operations. The TSPD ensures that S-EL1 can access the timer by programming the SCR_EL3.ST bit.
This patch does not actually enable the timer. This will be done in a subsequent patch once the complete framework for handling S-EL1 interrupts is in place.
Change-Id: I1b3985cfb50262f60824be3a51c6314ce90571bc
show more ...
|
| 1a4f19e3 | 22-May-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Merge pull request #91 from linmaonly/lin_dev
Address issue 156: 64-bit addresses get truncated |
| 444281cc | 20-May-2014 |
Lin Ma <lin.ma@caviumnetworks.com> |
Address issue 156: 64-bit addresses get truncated Addresses were declared as "unsigned int" in drivers/arm/peripherals/pl011/pl011.h and in function init_xlation_table. Changed to use "unsigned long"
Address issue 156: 64-bit addresses get truncated Addresses were declared as "unsigned int" in drivers/arm/peripherals/pl011/pl011.h and in function init_xlation_table. Changed to use "unsigned long" instead Fixes ARM-software/tf-issues#156
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 ...
|
| 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 |
| 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 ...
|
| 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 ...
|
| 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 ...
|
| 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 ...
|
| 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 ...
|
| 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 ...
|
| 82a0aca0 | 13-Mar-2014 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Rework bakery lock with WFE/SEV sequence
Current implementation of Bakery Lock does tight-loop waiting upon lock contention.
This commit reworks the implementation to use WFE instruction for waitin
Rework bakery lock with WFE/SEV sequence
Current implementation of Bakery Lock does tight-loop waiting upon lock contention.
This commit reworks the implementation to use WFE instruction for waiting, and SEV to signal lock availability. It also adds the rationale for choosing Bakery Locks instead of exclusion primitives, and more comments for the lock algorithm.
Fixes ARM-software/tf-issue#67
Change-Id: Ie351d3dbb27ec8e64dbc9507c84af07bd385a7df Co-authored-by: Vikram Kanigiri <vikram.kanigiri@arm.com>
show more ...
|
| c481c269 | 24-Jan-2014 |
Jon Medhurst <tixy@linaro.org> |
Add generic functions for setting up aarch64 MMU translation tables
Change-Id: I5b8d040ebc6672e40e4f13925e2fd5bc124103f4 Signed-off-by: Jon Medhurst <tixy@linaro.org> |
| a4d9f26b | 06-Feb-2014 |
Jon Medhurst <tixy@linaro.org> |
Fix assert in bakery_lock_release()
bakery_lock_release() expects an mpidr as the first argument however bakery_lock_release() is calling it with the 'entry' argument it has calculated. Rather than
Fix assert in bakery_lock_release()
bakery_lock_release() expects an mpidr as the first argument however bakery_lock_release() is calling it with the 'entry' argument it has calculated. Rather than fixing this to pass the mpidr value it would be much more efficient to just replace the call with
assert(bakery->owner == entry)
As this leaves no remaining users of bakery_lock_held(), we might as well delete it.
Fixes ARM-software/tf-issues#27
Signed-off-by: Jon Medhurst <tixy@linaro.org>
show more ...
|
| cd529320 | 10-Feb-2014 |
Ryan Harkin <ryan.harkin@linaro.org> |
Fix semihosting with latest toolchain
Fixes issues #10:
https://github.com/ARM-software/tf-issues/issues/10
This patch changes all/most variables of type int to be size_t or long to fix the sizing
Fix semihosting with latest toolchain
Fixes issues #10:
https://github.com/ARM-software/tf-issues/issues/10
This patch changes all/most variables of type int to be size_t or long to fix the sizing and alignment problems found when building with the newer toolchains such as Linaro GCC 13.12 or later.
Change-Id: Idc9d48eb2ff9b8c5bbd5b227e6907263d1ea188b Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
show more ...
|
| a0cd989d | 09-Feb-2014 |
Achin Gupta <achin.gupta@arm.com> |
Factor out translation table setup in ARM FVP port
This patch factors out the ARM FVP specific code to create MMU translation tables so that it is possible for a boot loader stage to create a differ
Factor out translation table setup in ARM FVP port
This patch factors out the ARM FVP specific code to create MMU translation tables so that it is possible for a boot loader stage to create a different set of tables instead of using the default ones. The default translation tables are created with the assumption that the calling boot loader stage executes out of secure SRAM. This might not be true for the BL3_2 stage in the future.
A boot loader stage can define the `fill_xlation_tables()` function as per its requirements. It returns a reference to the level 1 translation table which is used by the common platform code to setup the TTBR_EL3.
This patch is a temporary solution before a larger rework of translation table creation logic is introduced.
Change-Id: I09a075d5da16822ee32a411a9dbe284718fb4ff6
show more ...
|
| caa84939 | 06-Feb-2014 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Add support for handling runtime service requests
This patch uses the reworked exception handling support to handle runtime service requests through SMCs following the SMC calling convention. This i
Add support for handling runtime service requests
This patch uses the reworked exception handling support to handle runtime service requests through SMCs following the SMC calling convention. This is a giant commit since all the changes are inter-related. It does the following:
1. Replace the old exception handling mechanism with the new one 2. Enforce that SP_EL0 is used C runtime stacks. 3. Ensures that the cold and warm boot paths use the 'cpu_context' structure to program an ERET into the next lower EL. 4. Ensures that SP_EL3 always points to the next 'cpu_context' structure prior to an ERET into the next lower EL 5. Introduces a PSCI SMC handler which completes the use of PSCI as a runtime service
Change-Id: I661797f834c0803d2c674d20f504df1b04c2b852 Co-authored-by: Achin Gupta <achin.gupta@arm.com>
show more ...
|