| 931f7c61 | 14-Oct-2018 |
Soby Mathew <soby.mathew@arm.com> |
PIE: Position Independant Executable support for BL31
This patch introduces Position Independant Executable(PIE) support in TF-A. As a initial prototype, only BL31 can support PIE. A trivial dynamic
PIE: Position Independant Executable support for BL31
This patch introduces Position Independant Executable(PIE) support in TF-A. As a initial prototype, only BL31 can support PIE. A trivial dynamic linker is implemented which supports fixing up Global Offset Table(GOT) and Dynamic relocations(.rela.dyn). The fixup_gdt_reloc() helper function implements this linker and this needs to be called early in the boot sequence prior to invoking C functions. The GOT is placed in the RO section of BL31 binary for improved security and the BL31 linker script is modified to export the appropriate symbols required for the dynamic linker.
The C compiler always generates PC relative addresses to linker symbols and hence referencing symbols exporting constants are a problem when relocating the binary. Hence the reference to the `__PERCPU_TIMESTAMP_SIZE__` symbol in PMF is removed and is now calculated at runtime based on start and end addresses.
Change-Id: I1228583ff92cf432963b7cef052e95d995cca93d Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| f1722b69 | 12-Oct-2018 |
Soby Mathew <soby.mathew@arm.com> |
PIE: Use PC relative adrp/adr for symbol reference
This patch fixes up the AArch64 assembly code to use adrp/adr instructions instead of ldr instruction for reference to symbols. This allows these a
PIE: Use PC relative adrp/adr for symbol reference
This patch fixes up the AArch64 assembly code to use adrp/adr instructions instead of ldr instruction for reference to symbols. This allows these assembly sequences to be Position Independant. Note that the the reference to sizes have been replaced with calculation of size at runtime. This is because size is a constant value and does not depend on execution address and using PC relative instructions for loading them makes them relative to execution address. Also we cannot use `ldr` instruction to load size as it generates a dynamic relocation entry which must *not* be fixed up and it is difficult for a dynamic loader to differentiate which entries need to be skipped.
Change-Id: I8bf4ed5c58a9703629e5498a27624500ef40a836 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| 0916c38d | 19-Oct-2018 |
Roberto Vargas <roberto.vargas@arm.com> |
Convert arm_setup_page_tables into a generic helper
This function is not related to Arm platforms and can be reused by other platforms if needed.
Change-Id: Ia9c328ce57ce7e917b825a9e09a42b0abb1a53e
Convert arm_setup_page_tables into a generic helper
This function is not related to Arm platforms and can be reused by other platforms if needed.
Change-Id: Ia9c328ce57ce7e917b825a9e09a42b0abb1a53e8 Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 583cb003 | 25-Oct-2018 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1640 from soby-mathew/sm/fin_con_reg
Multi-console: Deprecate the `finish_console_register` macro |
| 44445ae5 | 24-Oct-2018 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1641 from jeenu-arm/ptrauth
AArch64: Enable lower ELs to use pointer authentication |
| cc5859ca | 10-Oct-2018 |
Soby Mathew <soby.mathew@arm.com> |
Multi-console: Deprecate the `finish_console_register` macro
The `finish_console_register` macro is used by the multi console framework to register the `console_t` driver callbacks. It relied on wea
Multi-console: Deprecate the `finish_console_register` macro
The `finish_console_register` macro is used by the multi console framework to register the `console_t` driver callbacks. It relied on weak references to the `ldr` instruction to populate 0 to the callback in case the driver has not defined the appropriate function. Use of `ldr` instruction to load absolute address to a reference makes the binary position dependant. These instructions should be replaced with adrp/adr instruction for position independant executable(PIE). But adrp/adr instructions don't work well with weak references as described in GNU ld bugzilla issue 22589.
This patch defines a new version of `finish_console_register` macro which can spcify which driver callbacks are valid and deprecates the old one. If any of the argument is not specified, then the macro populates 0 for that callback. Hence the functionality of the previous deprecated macro is preserved. The USE_FINISH_CONSOLE_REG_2 define is used to select the new variant of the macro and will be removed once the deprecated variant is removed.
All the upstream console drivers have been migrated to use the new macro in this patch.
NOTE: Platforms be aware that the new variant of the `finish_console_register` should be used and the old variant is deprecated.
Change-Id: Ia6a67aaf2aa3ba93932992d683587bbd0ad25259 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| 3ff4aaac | 15-Aug-2018 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
AArch64: Enable lower ELs to use pointer authentication
Pointer authentication is an Armv8.3 feature that introduces instructions that can be used to authenticate and verify pointers.
Pointer authe
AArch64: Enable lower ELs to use pointer authentication
Pointer authentication is an Armv8.3 feature that introduces instructions that can be used to authenticate and verify pointers.
Pointer authentication instructions are allowed to be accessed from all ELs but only when EL3 explicitly allows for it; otherwise, their usage will trap to EL3. Since EL3 doesn't have trap handling in place, this patch unconditionally disables all related traps to EL3 to avoid potential misconfiguration leading to an unhandled EL3 exception.
Fixes ARM-software/tf-issues#629
Change-Id: I9bd2efe0dc714196f503713b721ffbf05672c14d Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 6fe8b195 | 15-Oct-2018 |
Yann Gautier <yann.gautier@st.com> |
Add new defines for STM32MP1 platform
To boot on eMMC or SD-cards, STM32MP1 platform needs: - GPT_IMAGE_ID to read GPT table on those devices - STM32_IMAGE_ID and IO_TYPE_STM32IMAGE to read images w
Add new defines for STM32MP1 platform
To boot on eMMC or SD-cards, STM32MP1 platform needs: - GPT_IMAGE_ID to read GPT table on those devices - STM32_IMAGE_ID and IO_TYPE_STM32IMAGE to read images with STM32 header - IO_TYPE_MMC to have a IO for MMC devices
Signed-off-by: Yann Gautier <yann.gautier@st.com>
show more ...
|
| d9f529f5 | 12-Oct-2018 |
Soby Mathew <soby.mathew@arm.com> |
Merge pull request #1606 from satheesbalya-arm/sb1_2603_misra_plat
plat/arm: Fix misra warnings in platform code |
| 89509904 | 27-Sep-2018 |
Sathees Balya <sathees.balya@arm.com> |
plat/arm: Fix misra warnings in platform code
Change-Id: Ica944acc474a099219d50b041cfaeabd4f3d362f Signed-off-by: Sathees Balya <sathees.balya@arm.com> |
| e22a4ae0 | 11-Oct-2018 |
Soby Mathew <soby.mathew@arm.com> |
Merge pull request #1621 from jts-arm/typos
Various corrections of typos |
| 701b498c | 07-Sep-2018 |
John Tsichritzis <john.tsichritzis@arm.com> |
Reorder log level macro definitions for clarity
The definitions of the logging macros are reordered to be consistent with the definitions of the log levels.
Change-Id: I6ff07b93eb64786ff147d39014d1
Reorder log level macro definitions for clarity
The definitions of the logging macros are reordered to be consistent with the definitions of the log levels.
Change-Id: I6ff07b93eb64786ff147d39014d1c8e15db28444 Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
show more ...
|
| e02f469f | 05-Oct-2018 |
Sathees Balya <sathees.balya@arm.com> |
Fix misra warnings in SMC and power mgmt code
Change-Id: Ia00eba2b18804e6498d935d33ec104953e0e5e03 Signed-off-by: Sathees Balya <sathees.balya@arm.com> |
| 5634a493 | 04-Oct-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1611 from antonio-nino-diaz-arm/an/misra-common
Remove some MISRA defects in common code |
| 200006df | 04-Oct-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1583 from danielboulby-arm/db/AArch32_Multi_Console
Enable Multi Console API in AArch32 |
| 81542c00 | 04-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove some MISRA defects in common code
No functional changes.
Change-Id: I9638e02acb9b22eb794ebf45aad84348a710287e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
| fe199e3b | 25-Sep-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove all other deprecated interfaces and files
Change-Id: Icd1cdd42afdc78895a9be6c46b414b0a155cfa63 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
| ed51b51f | 24-Sep-2018 |
Roberto Vargas <roberto.vargas@arm.com> |
Remove build option LOAD_IMAGE_V2
The code of LOAD_IMAGE_V2=0 has been removed.
Change-Id: Iea03e5bebb90c66889bdb23f85c07d0c9717fffe Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Sig
Remove build option LOAD_IMAGE_V2
The code of LOAD_IMAGE_V2=0 has been removed.
Change-Id: Iea03e5bebb90c66889bdb23f85c07d0c9717fffe Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 871de537 | 24-Sep-2018 |
Roberto Vargas <roberto.vargas@arm.com> |
PSCI: Remove platform compatibility layer
Change-Id: I40d040aa05bcbf11536a96ce59827711456b93a8 Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.
PSCI: Remove platform compatibility layer
Change-Id: I40d040aa05bcbf11536a96ce59827711456b93a8 Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 7e2bbef9 | 19-Sep-2018 |
Daniel Boulby <daniel.boulby@arm.com> |
pl011: Add support in AArch32 for MULTI_CONSOLE_API
Allow AArch32 to use the multi console driver by adding the required functions
Change-Id: I9e69f18965f320074cf75442d6b0de891aef7936 Signed-off-by
pl011: Add support in AArch32 for MULTI_CONSOLE_API
Allow AArch32 to use the multi console driver by adding the required functions
Change-Id: I9e69f18965f320074cf75442d6b0de891aef7936 Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
show more ...
|
| 5a22e461 | 28-Aug-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Fix MISRA defects in log helpers
No functional changes.
Change-Id: I850f08718abb69d5d58856b0e3de036266d8c2f4 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
| dcf95e7e | 30-Aug-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1542 from antonio-nino-diaz-arm/an/bl31-misra
Some MISRA fixes in BL31, cci and smmu |
| 819df3fc | 21-Aug-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Fix MISRA defects in some common headers
Change-Id: I8fbb4c785e7e07c7241e0c399a9b65161985c9df Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
| 3e530d8e | 23-Aug-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
backtrace: Print backtrace in assert() and panic()
When any of these functions is called the backtrace will be printed to the console.
Change-Id: Id60842df824b320c485a9323ed6b80600f4ebe35 Signed-of
backtrace: Print backtrace in assert() and panic()
When any of these functions is called the backtrace will be printed to the console.
Change-Id: Id60842df824b320c485a9323ed6b80600f4ebe35 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 0c62883f | 21-Aug-2018 |
Douglas Raillard <douglas.raillard@arm.com> |
backtrace: Introduce backtrace function
This function diplays the backtrace, the current EL and security state to allow a post-processing tool to choose the right binary to interpret the dump.
The
backtrace: Introduce backtrace function
This function diplays the backtrace, the current EL and security state to allow a post-processing tool to choose the right binary to interpret the dump.
The output can be fed to GNU addr2line to resolve function names given an ELF binary compiled with debug information. The "-i" flag is recommended to improve display in case of inlined functions. The *.dump files generated during the build process can also be used.
The function works in AArch64 and AArch32. In AArch32 it only works in A32 mode (without T32 interworking), which is enforced in the Makefile.
Sample output of a backtrace at EL3:
BACKTRACE: START: function_name 0: EL3: 0x798 1: EL3: 0x538 2: EL3: 0x550 3: EL3: 0x55c 4: EL3: 0x568 5: EL3: 0x5a8 6: EL3: 0xf4 BACKTRACE: END: function_name
In order to enable it the new option ENABLE_BACKTRACE must be set to 1. This option is set to 1 by default only in AArch64 debug builds. As usual, it can be overridden by the platform makefile and in the build command line.
Change-Id: Icaff39b0e5188329728be2f3c72b868b2368e794 Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|