| 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 ...
|
| 12af5ed4 | 17-Sep-2018 |
Soby Mathew <soby.mathew@arm.com> |
Make errata reporting mandatory for CPU files
Previously the errata reporting was optional for CPU operation files and this was achieved by making use of weak reference to resolve to 0 if the symbol
Make errata reporting mandatory for CPU files
Previously the errata reporting was optional for CPU operation files and this was achieved by making use of weak reference to resolve to 0 if the symbol is not defined. This is error prone when adding new CPU operation files and weak references are problematic when fixing up dynamic relocations. Hence this patch removes the weak reference and makes it mandatory for the CPU operation files to define the errata reporting function.
Change-Id: I8af192e19b85b7cd8c7579e52f8f05a4294e5396 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 ...
|
| 3bd17c0f | 28-Aug-2018 |
Soby Mathew <soby.mathew@arm.com> |
Basic Makefile changes for PIE
Change-Id: I0b8ccba15024c55bb03927cdb50370913eb8010c Signed-off-by: Soby Mathew <soby.mathew@arm.com> |
| 6a7b3005 | 12-Oct-2018 |
Soby Mathew <soby.mathew@arm.com> |
Add helper to return reference to a symbol
This patch adds a utility function to return the address of a symbol. By default, the compiler generates adr/adrp instruction pair to return the reference
Add helper to return reference to a symbol
This patch adds a utility function to return the address of a symbol. By default, the compiler generates adr/adrp instruction pair to return the reference and this utility is used to override this compiler generated to code and use `ldr` instruction.
This is needed for Position Independent Executable when it needs to reference a symbol which is constant and does not depend on the execute address of the binary.
For example, on the FVP, the GICv3 register context is stored in a secure carveout (arm_el3_tzc_dram) within DDR and does not relocate with the BL image. Now if BL31 is executing at a different address other than the compiled address, using adrp/adr instructions to reference this memory will not work as they generate an address that is PC relative. The way to get around this problem is to reference it as non-PC relative (i.e non-relocatable location) via `ldr` instruction.
Change-Id: I5008a951b007144258121690afb68dc8e12ee6f7 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| 9aabd11a | 26-Oct-2018 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1647 from antonio-nino-diaz-arm/an/setup-xlat
Improvements to setup page tables code |
| 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 ...
|
| 03987d01 | 19-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
xlat: Fix compatibility between v1 and v2
There are several platforms using arm_setup_page_tables(), which is supposed to be Arm platform only. This creates several dependency problems between platf
xlat: Fix compatibility between v1 and v2
There are several platforms using arm_setup_page_tables(), which is supposed to be Arm platform only. This creates several dependency problems between platforms.
This patch adds the definition XLAT_TABLES_LIB_V2 to the xlat tables lib v2 makefile. This way it is possible to detect from C code which version is being used and include the correct header.
The file arm_xlat_tables.h has been renamed to xlat_tables_compat.h and moved to a common folder. This way, when in doubt, this header can be used to guarantee compatibility, as it includes the correct header based on XLAT_TABLES_LIB_V2.
This patch also removes the usage of ARM_XLAT_TABLES_V1 from QEMU (so that is now locked in xlat lib v2) and ZynqMP (where it was added as a workaround).
Change-Id: Ie1e22a23b44c549603d1402a237a70d0120d3e04 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 37f647a4 | 10-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
docs: gxbb: Add documentation
Change-Id: Ie2465c1ccc482bd8eb5e5a71c580543095e4ba94 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
| 253d1695 | 10-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
gxbb: Workaround for PSCI_CPU_OFF
There seems to be a problem where SCP can't turn CPU0 off. Instead of returning PSCI_E_DENIED or crashing make CPU0 wait in a WFE loop. This way all CPUs have a con
gxbb: Workaround for PSCI_CPU_OFF
There seems to be a problem where SCP can't turn CPU0 off. Instead of returning PSCI_E_DENIED or crashing make CPU0 wait in a WFE loop. This way all CPUs have a consistent behaviour from the point of view of the caller.
Change-Id: I5c8c266ca3b69c9e7a4f5ae70afeea5dd36a0825 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| d1bc7145 | 05-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
gxbb: Implement PSCI_CPU_OFF
This works fine for CPU1-3, but it fails for CPU0, where it is simply ignored and leaves CPU0 in a WFI loop.
Change-Id: I7d73683fdd894f2021d6a5bc2cce6cd03e18e633 Signed
gxbb: Implement PSCI_CPU_OFF
This works fine for CPU1-3, but it fails for CPU0, where it is simply ignored and leaves CPU0 in a WFI loop.
Change-Id: I7d73683fdd894f2021d6a5bc2cce6cd03e18e633 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| f3ff9f77 | 18-Sep-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
gxbb: Initial port of Amlogic Meson S905 (GXBB)
The Amlogic Meson S905 is a SoC with a quad core Arm Cortex-A53 running at 1.5Ghz. It also contains a Cortex-M3 used as SCP.
This port is a minimal i
gxbb: Initial port of Amlogic Meson S905 (GXBB)
The Amlogic Meson S905 is a SoC with a quad core Arm Cortex-A53 running at 1.5Ghz. It also contains a Cortex-M3 used as SCP.
This port is a minimal implementation of BL31 capable of booting mainline U-Boot and Linux:
- Partial SCPI support. - Basic PSCI support (CPU_ON, SYSTEM_RESET, SYSTEM_OFF). - GICv2 driver set up. - Basic SIP services (read efuse data, enable/disable JTAG).
This port has been tested in an ODROID-C2.
Change-Id: Ia4bc82d7aca42a69d6b118b947279f82b3f6c6da Tested-by: Amit Singh Tomar <amittomer25@gmail.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 9b6483c8 | 15-Aug-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
meson: console: Introduce console driver
It has only been tested with a system clock of 24 MHz.
It has only been implemented for the multi console API.
Signed-off-by: Antonio Nino Diaz <antonio.ni
meson: console: Introduce console driver
It has only been tested with a system clock of 24 MHz.
It has only been implemented for the multi console API.
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| b62b5b92 | 16-Sep-2018 |
Chandni Cherukuri <chandni.cherukuri@arm.com> |
plat/arm/sgi: add support for SGI-Clark.Ares platform
SGI-Clark.Ares platform is a variant of the SGI-Clark platform. It has two clusters of four Ares CPUs each. Though very similar to the SGI575 pl
plat/arm/sgi: add support for SGI-Clark.Ares platform
SGI-Clark.Ares platform is a variant of the SGI-Clark platform. It has two clusters of four Ares CPUs each. Though very similar to the SGI575 platform, there are subtle differences. HW_CONFIG and TB_FW_CONFIG dts files have been added.
Change-Id: I740a33cbd1c3b1f1984cb56243b46ad379bab3e6 Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
show more ...
|
| 7c294f95 | 04-Oct-2018 |
Chandni Cherukuri <chandni.cherukuri@arm.com> |
plat/arm/sgi: add support for SGI-Clark platform
SGI-Clark platform is the next version in the Arm's SGI platform series. One of the primary difference between the SGI-575 platform and the SGI-Clark
plat/arm/sgi: add support for SGI-Clark platform
SGI-Clark platform is the next version in the Arm's SGI platform series. One of the primary difference between the SGI-575 platform and the SGI-Clark platform is the MHU version (MHUv2 in case of SGI-Clark). Add the required base support for SGI-Clark platform.
Change-Id: If396e5279fdf801d586662dad0b55195e81371e4 Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
show more ...
|
| 722236f2 | 16-Sep-2018 |
Chandni Cherukuri <chandni.cherukuri@arm.com> |
plat/arm/css: Add SID registers for SGx platforms
Some of the SGx platforms use System Identification (SID) registers for platform identification. Add support for these registers in css.
Change-Id:
plat/arm/css: Add SID registers for SGx platforms
Some of the SGx platforms use System Identification (SID) registers for platform identification. Add support for these registers in css.
Change-Id: If00b18744a31ff2cf14338f18c8c680eb69c9027 Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
show more ...
|
| 20a8f7a8 | 07-Aug-2018 |
Chandni Cherukuri <chandni.cherukuri@arm.com> |
plat/arm/sgi: disable Ares cpu power down bit in reset handler
On SGI platforms that include Ares CPUs, the 'CORE_PWRDN_EN' bit of 'CPUPWRCTLR_EL1' register requires an explicit write to clear it to
plat/arm/sgi: disable Ares cpu power down bit in reset handler
On SGI platforms that include Ares CPUs, the 'CORE_PWRDN_EN' bit of 'CPUPWRCTLR_EL1' register requires an explicit write to clear it to enable hotplug and idle to function correctly.
The reset value of the CORE_PWRDN_EN bit is zero but it still requires this explicit clear to zero. This indicates that this could be a model related issue but for now this issue can be fixed be clearing the CORE_PWRDN_EN bit in the platform specific reset handler function.
Change-Id: I8b9884ae27a2986d789bfec2e9ae792ef930944e Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
show more ...
|
| 31abc7c4 | 25-Oct-2018 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1638 from chandnich/sgi575-update
Sgi575 update |
| deca6584 | 25-Oct-2018 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1636 from antonio-nino-diaz-arm/an/console
Deprecate weak crash console functions |
| 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 |
| e74afb65 | 17-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Deprecate weak crash console functions
The default behaviour of the plat_crash_console_xxx functions isn't obvious to someone that hasn't read all the documentation. As they are not mandatory, it is
Deprecate weak crash console functions
The default behaviour of the plat_crash_console_xxx functions isn't obvious to someone that hasn't read all the documentation. As they are not mandatory, it is unlikely that the code will be checked when doing a platform port, which may mean that some platforms may not have crash console support at all.
The idea of this patch is to force platform maintainers to decide how the crash console has to behave so that the final behaviour isn't unexpected.
Change-Id: I40b2a7b56c5530c1dcd63eace5bd37ae6335056e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| a9d5a3ff | 16-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
rockchip: Use common crash console functions
This platform depends on weak functions defined in ``plat/common/aarch64/platform_helpers.S`` that are going to be removed.
Change-Id: I5104d091c32271d7
rockchip: Use common crash console functions
This platform depends on weak functions defined in ``plat/common/aarch64/platform_helpers.S`` that are going to be removed.
Change-Id: I5104d091c32271d77ed9690e9dc257c061289def Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 6c9ada31 | 16-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add sample crash console functions
Platforms that wish to use the sample functions have to add the file to their Makefile. It is not included by default.
Change-Id: I713617bb58dc218967199248f68da86
Add sample crash console functions
Platforms that wish to use the sample functions have to add the file to their Makefile. It is not included by default.
Change-Id: I713617bb58dc218967199248f68da86241d7ec40 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| c02c69f8 | 16-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
plat/arm: Make crash console functions strong
In Arm platforms the crash console doesn't print anything if the crash happens early enough. This happens in all images, not only BL1. The reason is tha
plat/arm: Make crash console functions strong
In Arm platforms the crash console doesn't print anything if the crash happens early enough. This happens in all images, not only BL1. The reason is that they the files ``plat/common/aarch64/platform_helpers.S`` and ``plat/arm/common/aarch64/arm_helpers.S``, and the crash console functions are defined as weak in both files. In practice, the linker can pick the one in ``plat/common``, which simply switches the multi console to crash mode when it wants to initialize the crash console. In the case of Arm platforms, there are no console drivers registered at that point, so nothing is printed.
This patch makes the functions in plat/arm strong so that they override the weak functions in plat/common.
Change-Id: Id358db7d2567d7df0951790a695636cf6c9ac57f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 9c675b37 | 17-Oct-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add plat_crash_console_flush to platforms without it
Even though at this point plat_crash_console_flush is optional, it will stop being optional in a following patch.
The console driver of warp7 do
Add plat_crash_console_flush to platforms without it
Even though at this point plat_crash_console_flush is optional, it will stop being optional in a following patch.
The console driver of warp7 doesn't support flush, so the implementation is a placeholder.
TI had ``plat_crash_console_init`` and ``plat_crash_console_putc``, but they weren't global so they weren't actually used. Also, they were calling the wrong functions.
imx8_helpers.S only has placeholders for all of the functions.
Change-Id: I8d17bbf37c7dad74e134c61ceb92acb9af497718 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|