| e4d084ea | 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 p
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
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 ...
|
| 07f4e078 | 02-Feb-2014 |
Achin Gupta <achin.gupta@arm.com> |
Introduce new exception handling framework
This patch introduces the reworked exception handling logic which lays the foundation for accessing runtime services in later patches. The type of an excep
Introduce new exception handling framework
This patch introduces the reworked exception handling logic which lays the foundation for accessing runtime services in later patches. The type of an exception has a greater say in the way it is handled. SP_EL3 is used as the stack pointer for:
1. Determining the type of exception and handling the unexpected ones on the exception stack
2. Saving and restoring the essential general purpose and system register state after exception entry and prior to exception exit.
SP_EL0 is used as the stack pointer for handling runtime service requests e.g. SMCs. A new structure for preserving general purpose register state has been added to the 'cpu_context' structure. All assembler ensures that it does not use callee saved registers (x19-x29). The C runtime preserves them across functions calls. Hence EL3 code does not have to save and restore them explicitly.
Since the exception handling framework has undergone substantial change, the changes have been kept in separate files to aid readability. These files will replace the existing ones in subsequent patches.
Change-Id: Ice418686592990ff7a4260771e8d6676e6c8c5ef
show more ...
|
| 7421b465 | 01-Feb-2014 |
Achin Gupta <achin.gupta@arm.com> |
Add runtime services framework
This patch introduces the framework to enable registration and initialisation of runtime services. PSCI is registered and initialised as a runtime service. Handling of
Add runtime services framework
This patch introduces the framework to enable registration and initialisation of runtime services. PSCI is registered and initialised as a runtime service. Handling of runtime service requests will be implemented in subsequent patches.
Change-Id: Id21e7ddc5a33d42b7d6e455b41155fc5441a9547
show more ...
|
| ef7a28c9 | 01-Feb-2014 |
Achin Gupta <achin.gupta@arm.com> |
psci: Use context library for preserving EL3 state
This patch uses the context library to save and restore EL3 state on the 'cpu_context' data structures allocated by PSCI for managing non-secure st
psci: Use context library for preserving EL3 state
This patch uses the context library to save and restore EL3 state on the 'cpu_context' data structures allocated by PSCI for managing non-secure state context on each cpu.
Change-Id: I19c1f26578204a7cd9e0a6c582ced0d97ee4cf80
show more ...
|
| b739f22a | 18-Jan-2014 |
Achin Gupta <achin.gupta@arm.com> |
Setup VBAR_EL3 incrementally
This patch ensures that VBAR_EL3 points to the simple stack-less 'early_exceptions' when the C runtime stack is not correctly setup to use the more complex 'runtime_exce
Setup VBAR_EL3 incrementally
This patch ensures that VBAR_EL3 points to the simple stack-less 'early_exceptions' when the C runtime stack is not correctly setup to use the more complex 'runtime_exceptions'. It is initialised to 'runtime_exceptions' once this is done.
This patch also moves all exception vectors into a '.vectors' section and modifies linker scripts to place all such sections together. This will minimize space wastage from alignment restrictions.
Change-Id: I8c3e596ea3412c8bd582af9e8d622bb1cb2e049d
show more ...
|
| 9d72b4ea | 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 F
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
show more ...
|
| 40a6f647 | 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 |
| 75f7367b | 05-Dec-2013 |
Achin Gupta <achin.gupta@arm.com> |
psci: fix affinity level upgrade issue
The psci implementation does not track target affinity level requests specified during cpu_suspend calls correctly as per the following example.
1. cpu0.clust
psci: fix affinity level upgrade issue
The psci implementation does not track target affinity level requests specified during cpu_suspend calls correctly as per the following example.
1. cpu0.cluster0 calls cpu_suspend with the target affinity level as 0 2. Only the cpu0.cluster0 is powered down while cluster0 remains powered up 3. cpu1.cluster0 calls cpu_off to power itself down to highest possible affinity level 4. cluster0 will be powered off even though cpu0.cluster0 does not allow cluster shutdown
This patch introduces reference counts at affinity levels > 0 to track the number of cpus which want an affinity instance at level X to remain powered up. This instance can be turned off only if its reference count is 0. Cpus still undergo the normal state transitions (ON, OFF, ON_PENDING, SUSPEND) but the higher levels can only be either ON or OFF depending upon their reference count.
The above issue is thus fixed as follows:
1. cluster0's reference count is incremented by two when cpu0 and cpu1 are initially powered on.
2. cpu0.cluster0 calls cpu_suspend with the target affinity level as 0. This does not affect the cluster0 reference count.
3. Only the cpu0.cluster0 is powered down while cluster0 remains powered up as it has a non-zero reference count.
4. cpu1.cluster0 call cpu_off to power itself down to highest possible affinity level. This decrements the cluster0 reference count.
5. cluster0 is still not powered off since its reference count will at least be 1 due to the restriction placed by cpu0.
Change-Id: I433dfe82b946f5f6985b1602c2de87800504f7a9
show more ...
|
| a45e3973 | 05-Dec-2013 |
Achin Gupta <achin.gupta@arm.com> |
psci: preserve target affinity level during suspend
This patch adds support to save and restore the target affinity level specified during a cpu_suspend psci call. This ensures that we traverse only
psci: preserve target affinity level during suspend
This patch adds support to save and restore the target affinity level specified during a cpu_suspend psci call. This ensures that we traverse only through the affinity levels that we originally intended to after resuming from suspend.
Change-Id: I0900ae49a50b496da137cfec8f158da0397ec56c
show more ...
|
| a59caa4c | 05-Dec-2013 |
Achin Gupta <achin.gupta@arm.com> |
psci: replace secure context with suspend context
The secure context saved and restored across a cpu_suspend operation can be more than just the state of the secure system registers e.g. we also nee
psci: replace secure context with suspend context
The secure context saved and restored across a cpu_suspend operation can be more than just the state of the secure system registers e.g. we also need to save the affinity level till which the cpu is being powered down. This patch creates a suspend_context data structure which includes the system register context. This will allow other bits to be saved and restored as well in subsequent patches.
Change-Id: I1c1f7d25497388b54b7d6ee4fab77e8c6a9992c4
show more ...
|
| e83b0cad | 14-Jan-2014 |
Dan Handley <dan.handley@arm.com> |
Update year in copyright text to 2014
Change-Id: Ic7fb61aabae1d515b9e6baf3dd003807ff42da60 |
| ba6980a8 | 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 |
| 0959db5c | 02-Dec-2013 |
Achin Gupta <achin.gupta@arm.com> |
psci: rectify and homogenise generic code
This patch performs a major rework of the psci generic implementation to achieve the following:
1. replace recursion with iteration where possible to aid c
psci: rectify and homogenise generic code
This patch performs a major rework of the psci generic implementation to achieve the following:
1. replace recursion with iteration where possible to aid code readability e.g. affinity instance states are changed iteratively instead of recursively.
2. acquire pointers to affinity instance nodes at the beginning of a psci operation. All subsequent actions use these pointers instead of calling psci_get_aff_map_node() repeatedly e.g. management of locks has been abstracted under functions which use these pointers to ensure correct ordering. Helper functions have been added to create these abstractions.
3. assertions have been added to cpu level handlers to ensure correct state transition
4. the affinity level extents specified to various functions have the same meaning i.e. start level is always less than the end level.
Change-Id: If0508c3a7b20ea3ddda2a66128429382afc3dfc8
show more ...
|
| 3140a9e5 | 02-Dec-2013 |
Achin Gupta <achin.gupta@arm.com> |
psci: rework cpu_off assertion and minor cleanups
This patch:
1. removes a duplicate assertion to check that the only error condition that can be returned while turning a cpu off is PSCI_E_DE
psci: rework cpu_off assertion and minor cleanups
This patch:
1. removes a duplicate assertion to check that the only error condition that can be returned while turning a cpu off is PSCI_E_DENIED. Having this assertion after calling psci_afflvl_off() is sufficient.
2. corrects some incorrect usage of 'its' vs 'it is'
3. removes some unwanted white spaces
Change-Id: Icf014e269b54f5be5ce0b9fbe6b41258e4ebf403
show more ...
|
| c8afc789 | 25-Nov-2013 |
Achin Gupta <achin.gupta@arm.com> |
psci: fix error due to a non zero context id
In the previous psci implementation, the psci_afflvl_power_on_finish() function would run into an error condition if the value of the context id paramete
psci: fix error due to a non zero context id
In the previous psci implementation, the psci_afflvl_power_on_finish() function would run into an error condition if the value of the context id parameter in the cpu_on and cpu_suspend psci calls was != 0. The parameter was being restored as the return value of the affinity level 0 finisher function. A non zero context id would be treated as an error condition. This would prevent successful wake up of the cpu from a power down state. Also, the contents of the general purpose registers were not being cleared upon return to the non-secure world after a cpu power up. This could potentially allow the non-secure world to view secure data.
This patch ensures that all general purpose registers are set to ~0 prior to the final eret that drops the execution to the non-secure world. The context id is used to initialize the general purpose register x0 prior to re-entry into the non-secure world and is no longer restored as a function return value. A platform helper (platform_get_stack()) has been introduced to facilitate this change.
Change-Id: I2454911ffd75705d6aa8609a5d250d9b26fa097c
show more ...
|
| ab2d31ed | 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: I9311aac81b00c6c167d2f8c8
Enable third party contributions
- Add instructions for contributing to ARM Trusted Firmware.
- Update copyright text in all files to acknowledge contributors.
Change-Id: I9311aac81b00c6c167d2f8c889aea403b84450e5
show more ...
|
| 8d69a03f | 27-Nov-2013 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Various improvements/cleanups on the linker scripts
- Check at link-time that bootloader images will fit in memory at run time and that they won't overlap each other. - Remove text and rodat
Various improvements/cleanups on the linker scripts
- Check at link-time that bootloader images will fit in memory at run time and that they won't overlap each other. - Remove text and rodata orphan sections. - Define new linker symbols to remove the need for platform setup code to know the order of sections. - Reduce the size of the raw binary images by cutting some sections out of the disk image and allocating them at load time, whenever possible. - Rework alignment constraints on sections. - Remove unused linker symbols. - Homogenize linker symbols names across all BLs. - Add some comments in the linker scripts.
Change-Id: I47a328af0ccc7c8ab47fcc0dc6e7dd26160610b9
show more ...
|
| 3738274d | 18-Nov-2013 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Unmask SError and Debug exceptions.
Any asynchronous exception caused by the firmware should be handled in the firmware itself. For this reason, unmask SError exceptions (and Debug ones as well) on
Unmask SError and Debug exceptions.
Any asynchronous exception caused by the firmware should be handled in the firmware itself. For this reason, unmask SError exceptions (and Debug ones as well) on all boot paths. Also route external abort and SError interrupts to EL3, otherwise they will target EL1.
Change-Id: I9c191d2d0dcfef85f265641c8460dfbb4d112092
show more ...
|
| 4f6ad66a | 25-Oct-2013 |
Achin Gupta <achin.gupta@arm.com> |
ARMv8 Trusted Firmware release v0.2 |