| 8cd16e6b | 17-May-2016 |
Soby Mathew <soby.mathew@arm.com> |
Build option to include AArch32 registers in cpu context
The system registers that are saved and restored in CPU context include AArch32 systems registers like SPSR_ABT, SPSR_UND, SPSR_IRQ, SPSR_FIQ
Build option to include AArch32 registers in cpu context
The system registers that are saved and restored in CPU context include AArch32 systems registers like SPSR_ABT, SPSR_UND, SPSR_IRQ, SPSR_FIQ, DACR32_EL2, IFSR32_EL2 and FPEXC32_EL2. Accessing these registers on an AArch64-only (i.e. on hardware that does not implement AArch32, or at least not at EL1 and higher ELs) platform leads to an exception. This patch introduces the build option `CTX_INCLUDE_AARCH32_REGS` to specify whether to include these AArch32 systems registers in the cpu context or not. By default this build option is set to 1 to ensure compatibility. AArch64-only platforms must set it to 0. A runtime check is added in BL1 and BL31 cold boot path to verify this.
Fixes ARM-software/tf-issues#386
Change-Id: I720cdbd7ed7f7d8516635a2ec80d025f478b95ee
show more ...
|
| e0ae9fab | 24-May-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Introduce some helper macros for exception vectors
This patch introduces some assembler macros to simplify the declaration of the exception vectors. It abstracts the section the exception code is pu
Introduce some helper macros for exception vectors
This patch introduces some assembler macros to simplify the declaration of the exception vectors. It abstracts the section the exception code is put into as well as the alignments constraints mandated by the ARMv8 architecture. For all TF images, the exception code has been updated to make use of these macros.
This patch also updates some invalid comments in the exception vector code.
Change-Id: I35737b8f1c8c24b6da89b0a954c8152a4096fa95
show more ...
|
| d4486391 | 18-May-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add 32 bit version of plat_get_syscnt_freq
Added plat_get_syscnt_freq2, which is a 32 bit variant of the 64 bit plat_get_syscnt_freq. The old one has been flagged as deprecated. Common code has been
Add 32 bit version of plat_get_syscnt_freq
Added plat_get_syscnt_freq2, which is a 32 bit variant of the 64 bit plat_get_syscnt_freq. The old one has been flagged as deprecated. Common code has been updated to use this new version. Porting guide has been updated.
Change-Id: I9e913544926c418970972bfe7d81ee88b4da837e
show more ...
|
| 9ff67fa6 | 26-Nov-2015 |
Gerald Lejeune <gerald.lejeune@st.com> |
Dump platform-defined regs in crash reporting
It is up to the platform to implement the new plat_crash_print_regs macro to report all relevant platform registers helpful for troubleshooting.
plat_c
Dump platform-defined regs in crash reporting
It is up to the platform to implement the new plat_crash_print_regs macro to report all relevant platform registers helpful for troubleshooting.
plat_crash_print_regs merges or calls previously defined plat_print_gic_regs and plat_print_interconnect_regs macros for each existing platforms.
NOTE: THIS COMMIT REQUIRES ALL PLATFORMS THAT ENABLE THE `CRASH_REPORTING` BUILD FLAG TO MIGRATE TO USE THE NEW `plat_crash_print_regs()` MACRO. BY DEFAULT, `CRASH_REPORTING` IS ENABLED IN DEBUG BUILDS FOR ALL PLATFORMS.
Fixes: arm-software/tf-issues#373
Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com>
show more ...
|
| 6b836cf9 | 22-Mar-2016 |
Gerald Lejeune <gerald.lejeune@st.com> |
Add ISR_EL1 to crash report
Bring ISR bits definition as a mnemonic for troublershooters as well.
Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com> |
| adb4fcfb | 22-Mar-2016 |
Gerald Lejeune <gerald.lejeune@st.com> |
Enable asynchronous abort exceptions during boot
Asynchronous abort exceptions generated by the platform during cold boot are not taken in EL3 unless SCR_EL3.EA is set.
Therefore EA bit is set alon
Enable asynchronous abort exceptions during boot
Asynchronous abort exceptions generated by the platform during cold boot are not taken in EL3 unless SCR_EL3.EA is set.
Therefore EA bit is set along with RES1 bits in early BL1 and BL31 architecture initialisation. Further write accesses to SCR_EL3 preserve these bits during cold boot.
A build flag controls SCR_EL3.EA value to keep asynchronous abort exceptions being trapped by EL3 after cold boot or not.
For further reference SError Interrupts are also known as asynchronous external aborts.
On Cortex-A53 revisions below r0p2, asynchronous abort exceptions are taken in EL3 whatever the SCR_EL3.EA value is.
Fixes arm-software/tf-issues#368
Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com>
show more ...
|
| 1c3ea103 | 01-Feb-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove all non-configurable dead loops
Added a new platform porting function plat_panic_handler, to allow platforms to handle unexpected error situations. It must be implemented in assembly as it ma
Remove all non-configurable dead loops
Added a new platform porting function plat_panic_handler, to allow platforms to handle unexpected error situations. It must be implemented in assembly as it may be called before the C environment is initialized. A default implementation is provided, which simply spins.
Corrected all dead loops in generic code to call this function instead. This includes the dead loop that occurs at the end of the call to panic().
All unnecesary wfis from bl32/tsp/aarch64/tsp_exceptions.S have been removed.
Change-Id: I67cb85f6112fa8e77bd62f5718efcef4173d8134
show more ...
|
| f0dd061a | 02-Feb-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add support for %p in tf_printf()
This patch adds support for the `%p` format specifier in tf_printf() following the example of the printf implementation of the stdlib used in the trusted firmware.
Add support for %p in tf_printf()
This patch adds support for the `%p` format specifier in tf_printf() following the example of the printf implementation of the stdlib used in the trusted firmware.
Fixes ARM-software/tf-issues#292
Change-Id: I0b3230c783f735d3e039be25a9405f00023420da
show more ...
|
| 1645d3ee | 17-Dec-2015 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Miscellaneous doc fixes for v1.2
Change-Id: I6f49bd779f2a4d577c6443dd160290656cdbc59b |
| d178637d | 14-Dec-2015 |
Juan Castillo <juan.castillo@arm.com> |
Remove dashes from image names: 'BL3-x' --> 'BL3x'
This patch removes the dash character from the image name, to follow the image terminology in the Trusted Firmware Wiki page:
https://github.c
Remove dashes from image names: 'BL3-x' --> 'BL3x'
This patch removes the dash character from the image name, to follow the image terminology in the Trusted Firmware Wiki page:
https://github.com/ARM-software/arm-trusted-firmware/wiki
Changes apply to output messages, comments and documentation.
non-ARM platform files have been left unmodified.
Change-Id: Ic2a99be4ed929d52afbeb27ac765ceffce46ed76
show more ...
|
| 7ee2b8b3 | 09-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #462 from soby-mathew/sm/runtime_console
Enable BL31 to configure a runtime console |
| bbf8f6f9 | 02-Oct-2015 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Move context management code to common location
The upcoming Firmware Update feature needs transitioning across Secure/Normal worlds to complete the FWU process and hence requires context management
Move context management code to common location
The upcoming Firmware Update feature needs transitioning across Secure/Normal worlds to complete the FWU process and hence requires context management code to perform this task.
Currently context management code is part of BL31 stage only. This patch moves the code from (include)/bl31 to (include)/common. Some function declarations/definitions and macros have also moved to different files to help code sharing.
Change-Id: I3858b08aecdb76d390765ab2b099f457873f7b0c
show more ...
|
| 78e61613 | 09-Dec-2015 |
Soby Mathew <soby.mathew@arm.com> |
Ensure BL31 does not print to boot console by default
It is not ideal for BL31 to continue to use boot console at runtime which could be potentially uninitialized. This patch introduces a new option
Ensure BL31 does not print to boot console by default
It is not ideal for BL31 to continue to use boot console at runtime which could be potentially uninitialized. This patch introduces a new optional platform porting API `bl31_plat_runtime_setup()` which allows the platform to perform any BL31 runtime setup just prior to BL31 exit during cold boot. The default weak implementation of this function will invoke `console_uninit()` which will suppress any BL31 runtime logs.
On the ARM Standard platforms, there is an anomaly that the boot console will be reinitialized on resumption from system suspend in `arm_system_pwr_domain_resume()`. This will be resolved in the following patch.
NOTE: The default weak definition of `bl31_plat_runtime_setup()` disables the BL31 console. To print the BL31 runtime messages, platforms must override this API and initialize a runtime console.
Fixes ARM-software/tf-issues#328
Change-Id: Ibaf8346fcceb447fe1a5674094c9f8eb4c09ac4a
show more ...
|
| e4d3c51d | 09-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #460 from sandrine-bailleux/sb/init-vttbrel2-vmid
Initialize VTTBR_EL2 when bypassing EL2 |
| 85d80e55 | 25-Nov-2015 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Initialize VTTBR_EL2 when bypassing EL2
In the situation that EL1 is selected as the exception level for the next image upon BL31 exit for a processor that supports EL2, the context management code
Initialize VTTBR_EL2 when bypassing EL2
In the situation that EL1 is selected as the exception level for the next image upon BL31 exit for a processor that supports EL2, the context management code must configure all essential EL2 register state to ensure correct execution of EL1.
VTTBR_EL2 should be part of this set of EL2 registers because: - The ARMv8-A architecture does not define a reset value for this register. - Cache maintenance operations depend on VTTBR_EL2.VMID even when non-secure EL1&0 stage 2 address translation are disabled.
This patch initializes the VTTBR_EL2 register to 0 when bypassing EL2 to address this issue. Note that this bug has not yet manifested itself on FVP or Juno because VTTBR_EL2.VMID resets to 0 on the Cortex-A53 and Cortex-A57.
Change-Id: I58ce2d16a71687126f437577a506d93cb5eecf33
show more ...
|
| c7488966 | 09-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #457 from soby-mathew/sm/fix_fpregs_restore
Fix issue in Floating point register restore |
| 817ac8d1 | 03-Dec-2015 |
Soby Mathew <soby.mathew@arm.com> |
Fix issue in Floating point register restore
The `fpregs_context_restore()` function used to restore the floating point regsiter context had a typo error wherein it was doing `str` instead of `ldr`
Fix issue in Floating point register restore
The `fpregs_context_restore()` function used to restore the floating point regsiter context had a typo error wherein it was doing `str` instead of `ldr` for a register. This issue remained undetected becuase none of the ARM Standard development platforms save and restore the floating point register context when a context switch is done. This patch corrects the issue.
Change-Id: Id178e0ba254a5e0a4a844f54b39d71dc34e0f6ea
show more ...
|
| 4e0e0f44 | 23-Nov-2015 |
Soby Mathew <soby.mathew@arm.com> |
Enable support for EL3 interrupt in IMF
This patch enables support for EL3 interrupts in the Interrupt Management Framework (IMF) of ARM Trusted Firmware. Please note that although the registration
Enable support for EL3 interrupt in IMF
This patch enables support for EL3 interrupts in the Interrupt Management Framework (IMF) of ARM Trusted Firmware. Please note that although the registration of the EL3 interrupt type is now supported, it has not been tested on any of the ARM Standard platforms.
Change-Id: If4dcdc7584621522a2f3ea13ea9b1ad0a76bb8a1
show more ...
|
| 712038db | 01-Dec-2015 |
danh-arm <dan.handley@arm.com> |
Merge pull request #443 from achingupta/sb/el3_payloads-cb_single_cpu
Add support to boot EL3 payloads and only a single CPU at cold reset |
| a9bec67d | 30-Oct-2015 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Introduce COLD_BOOT_SINGLE_CPU build option
This patch introduces a new build option named COLD_BOOT_SINGLE_CPU, which allows platforms that only release a single CPU out of reset to slightly optimi
Introduce COLD_BOOT_SINGLE_CPU build option
This patch introduces a new build option named COLD_BOOT_SINGLE_CPU, which allows platforms that only release a single CPU out of reset to slightly optimise their cold boot code, both in terms of code size and performance.
COLD_BOOT_SINGLE_CPU defaults to 0, which assumes that the platform may release several CPUs out of reset. In this case, the cold reset code needs to coordinate all CPUs via the usual primary/secondary CPU distinction.
If a platform guarantees that only a single CPU will ever be released out of reset, there is no need to arbitrate execution ; the notion of primary and secondary CPUs itself no longer exists. Such platforms may set COLD_BOOT_SINGLE_CPU to 1 in order to compile out the primary/secondary CPU identification in the cold reset code.
All ARM standard platforms can release several CPUs out of reset so they use COLD_BOOT_SINGLE_CPU=0. However, on CSS platforms like Juno, bringing up more than one CPU at reset should only be attempted when booting an EL3 payload, as it is not fully supported in the normal boot flow.
For platforms using COLD_BOOT_SINGLE_CPU=1, the following 2 platform APIs become optional: - plat_secondary_cold_boot_setup(); - plat_is_my_cpu_primary(). The Porting Guide has been updated to reflect that.
User Guide updated as well.
Change-Id: Ic5b474e61b7aec1377d1e0b6925d17dfc376c46b
show more ...
|
| 54718418 | 27-Oct-2015 |
Soby Mathew <soby.mathew@arm.com> |
Remove the IMF_READ_INTERRUPT_ID build option
The IMF_READ_INTERRUPT_ID build option enables a feature where the interrupt ID of the highest priority pending interrupt is passed as a parameter to th
Remove the IMF_READ_INTERRUPT_ID build option
The IMF_READ_INTERRUPT_ID build option enables a feature where the interrupt ID of the highest priority pending interrupt is passed as a parameter to the interrupt handler registered for that type of interrupt. This additional read of highest pending interrupt id from GIC is problematic as it is possible that the original interrupt may get deasserted and another interrupt of different type maybe become the highest pending interrupt. Hence it is safer to prevent such behaviour by removing the IMF_READ_INTERRUPT_ID build option.
The `id` parameter of the interrupt handler `interrupt_type_handler_t` is now made a reserved parameter with this patch. It will always contain INTR_ID_UNAVAILABLE.
Fixes ARM-software/tf-issues#307
Change-Id: I2173aae1dd37edad7ba6bdfb1a99868635fa34de
show more ...
|
| 7a24cba5 | 26-Oct-2015 |
Soby Mathew <soby.mathew@arm.com> |
Replace build macro WARN_DEPRECATED with ERROR_DEPRECATED
This patch changes the build time behaviour when using deprecated API within Trusted Firmware. Previously the use of deprecated APIs would o
Replace build macro WARN_DEPRECATED with ERROR_DEPRECATED
This patch changes the build time behaviour when using deprecated API within Trusted Firmware. Previously the use of deprecated APIs would only trigger a build warning (which was always treated as a build error), when WARN_DEPRECATED = 1. Now, the use of deprecated C declarations will always trigger a build time warning. Whether this warning is treated as error or not is determined by the build flag ERROR_DEPRECATED which is disabled by default. When the build flag ERROR_DEPRECATED=1, the invocation of deprecated API or inclusion of deprecated headers will result in a build error.
Also the deprecated context management helpers in context_mgmt.c are now conditionally compiled depending on the value of ERROR_DEPRECATED flag so that the APIs themselves do not result in a build error when the ERROR_DEPRECATED flag is set.
NOTE: Build systems that use the macro WARN_DEPRECATED must migrate to using ERROR_DEPRECATED, otherwise deprecated API usage will no longer trigger a build error.
Change-Id: I843bceef6bde979af7e9b51dddf861035ec7965a
show more ...
|
| 613b7e5e | 10-Nov-2015 |
Achin Gupta <achin.gupta@arm.com> |
Merge pull request #424 from jcastillo-arm/jc/tf-issues/327
IMF: postpone SCR_EL3 update if context is not initialized |
| 5c943f7f | 30-Oct-2015 |
Juan Castillo <juan.castillo@arm.com> |
IMF: postpone SCR_EL3 update if context is not initialized
The set_routing_model() function in the Interrupt Management Framework calls the context management library to update the SCR_EL3 register.
IMF: postpone SCR_EL3 update if context is not initialized
The set_routing_model() function in the Interrupt Management Framework calls the context management library to update the SCR_EL3 register. This context management library assumes that the context has been previously initialized. Consequently, if a Secure Payload Dispatcher (SPD) tries to set the routing model before initializing the context, the system will fail (in debug mode, an assertion will be raised).
This patch fixes the issue by checking if the context has been initialized before updating SCR_EL3. If a valid context is not available, SCR_EL3 update will be done when the SPD calls the context initialization function. This function will call get_scr_el3_from_routing_model() to obtain the SCR_EL3 value. If the SPD does not call the context initialization function then it is SPD's responsibility to obtain SCR_EL3 from the IMF and update the context accordingly.
Fixes ARM-software/tf-issues#327
Change-Id: Ic2f1c6e899e578a8db858ec43747c63a8539c16f
show more ...
|
| 68a68c92 | 28-Sep-2015 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Introduce print_entry_point_info() function
This patch introduces a new function called 'print_entry_point_info' that prints an entry_point_t structure for debugging purposes. As such, it can be use
Introduce print_entry_point_info() function
This patch introduces a new function called 'print_entry_point_info' that prints an entry_point_t structure for debugging purposes. As such, it can be used to display the entry point address, SPSR and arguments passed from a firmware image to the next one.
This function is now called in the following images transitions: - BL1 to BL2 - BL1 to BL31 - BL31 to the next image (typically BL32 or BL33)
The following changes have been introduced:
- Fix the output format of the SPSR value : SPSR is a 32-bit value, not a 64-bit one.
- Print all arguments values. The entry_point_info_t structure allows to pass up to 8 arguments. In most cases, only the first 2 arguments were printed. print_entry_point_info() now prints all of them as 'VERBOSE' traces.
Change-Id: Ieb384bffaa7849e6cb95a01a47c0b7fc2308653a
show more ...
|