| faaa2e76 | 15-Jul-2014 |
Vikram Kanigiri <vikram.kanigiri@arm.com> |
Support asynchronous method for BL3-2 initialization
This patch adds support for BL3-2 initialization by asynchronous method where BL3-1 transfers control to BL3-2 using world switch. After BL3-2 in
Support asynchronous method for BL3-2 initialization
This patch adds support for BL3-2 initialization by asynchronous method where BL3-1 transfers control to BL3-2 using world switch. After BL3-2 initialization, it transfers control to BL3-3 via SPD service handler. The SPD service handler initializes the CPU context to BL3-3 entrypoint depending on the return function indentifier from TSP initialization.
Fixes ARM-software/TF-issues#184
Change-Id: I7b135c2ceeb356d3bb5b6a287932e96ac67c7a34
show more ...
|
| 53fdcebd | 16-Jul-2014 |
Juan Castillo <juan.castillo@arm.com> |
Call platform_is_primary_cpu() only from reset handler
The purpose of platform_is_primary_cpu() is to determine after reset (BL1 or BL3-1 with reset handler) if the current CPU must follow the cold
Call platform_is_primary_cpu() only from reset handler
The purpose of platform_is_primary_cpu() is to determine after reset (BL1 or BL3-1 with reset handler) if the current CPU must follow the cold boot path (primary CPU), or wait in a safe state (secondary CPU) until the primary CPU has finished the system initialization.
This patch removes redundant calls to platform_is_primary_cpu() in subsequent bootloader entrypoints since the reset handler already guarantees that code is executed exclusively on the primary CPU.
Additionally, this patch removes the weak definition of platform_is_primary_cpu(), so the implementation of this function becomes mandatory. Removing the weak symbol avoids other bootloaders accidentally picking up an invalid definition in case the porting layer makes the real function available only to BL1.
The define PRIMARY_CPU is no longer mandatory in the platform porting because platform_is_primary_cpu() hides the implementation details (for instance, there may be platforms that report the primary CPU in a system register). The primary CPU definition in FVP has been moved to fvp_def.h.
The porting guide has been updated accordingly.
Fixes ARM-software/tf-issues#219
Change-Id: If675a1de8e8d25122b7fef147cb238d939f90b5e
show more ...
|
| 9fd41277 | 28-Jul-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #170 from achingupta/ag/tf-issues#226
Simplify management of SCTLR_EL3 and SCTLR_EL1 |
| d9b1128b | 28-Jul-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #169 from achingupta/ag/tf-issues#198
Ag/tf issues#198 |
| ec3c1003 | 18-Jul-2014 |
Achin Gupta <achin.gupta@arm.com> |
Simplify management of SCTLR_EL3 and SCTLR_EL1
This patch reworks the manner in which the M,A, C, SA, I, WXN & EE bits of SCTLR_EL3 & SCTLR_EL1 are managed. The EE bit is cleared immediately after r
Simplify management of SCTLR_EL3 and SCTLR_EL1
This patch reworks the manner in which the M,A, C, SA, I, WXN & EE bits of SCTLR_EL3 & SCTLR_EL1 are managed. The EE bit is cleared immediately after reset in EL3. The I, A and SA bits are set next in EL3 and immediately upon entry in S-EL1. These bits are no longer managed in the blX_arch_setup() functions. They do not have to be saved and restored either. The M, WXN and optionally the C bit are set in the enable_mmu_elX() function. This is done during both the warm and cold boot paths.
Fixes ARM-software/tf-issues#226
Change-Id: Ie894d1a07b8697c116960d858cd138c50bc7a069
show more ...
|
| aaa3e722 | 30-Jun-2014 |
Juan Castillo <juan.castillo@arm.com> |
Add support for printing version at runtime
Print out Trusted Firmware version at runtime at each BL stage. Message consists of TF version as defined statically in the Makefile (e.g. v0.4), build mo
Add support for printing version at runtime
Print out Trusted Firmware version at runtime at each BL stage. Message consists of TF version as defined statically in the Makefile (e.g. v0.4), build mode (debug|release) and a customizable build string:
1. By defining BUILD_STRING in command line when building TF 2. Default string is git commit ID 3. Empty if git meta-data is not available
Fixes ARM-software/tf-issues#203
Change-Id: I5c5ba438f66ab68810427d76b49c5b9177a957d6
show more ...
|
| b79af934 | 12-Jun-2014 |
Soby Mathew <soby.mathew@arm.com> |
Implement a leaner printf for Trusted Firmware
This patch implements a "tf_printf" which supports only the commonly used format specifiers in Trusted Firmware, which uses a lot less stack space than
Implement a leaner printf for Trusted Firmware
This patch implements a "tf_printf" which supports only the commonly used format specifiers in Trusted Firmware, which uses a lot less stack space than the stdlib printf function.
Fixes ARM-software/tf-issues#116
Change-Id: I7dfa1944f4c1e634b3e2d571f49afe02d109a351
show more ...
|
| b51da821 | 26-Jun-2014 |
Achin Gupta <achin.gupta@arm.com> |
Remove coherent stack usage from the warm boot path
This patch uses stacks allocated in normal memory to enable the MMU early in the warm boot path thus removing the dependency on stacks allocated i
Remove coherent stack usage from the warm boot path
This patch uses stacks allocated in normal memory to enable the MMU early in the warm boot path thus removing the dependency on stacks allocated in coherent memory. Necessary cache and stack maintenance is performed when a cpu is being powered down and up. This avoids any coherency issues that can arise from reading speculatively fetched stale stack memory from another CPUs cache. These changes affect the warm boot path in both BL3-1 and BL3-2.
The EL3 system registers responsible for preserving the MMU state are not saved and restored any longer. Static values are used to program these system registers when a cpu is powered on or resumed from suspend.
Change-Id: I8357e2eb5eb6c5f448492c5094b82b8927603784
show more ...
|
| 754a2b7a | 25-Jun-2014 |
Achin Gupta <achin.gupta@arm.com> |
Remove coherent stack usage from the cold boot path
This patch reworks the cold boot path across the BL1, BL2, BL3-1 and BL3-2 boot loader stages to not use stacks allocated in coherent memory for e
Remove coherent stack usage from the cold boot path
This patch reworks the cold boot path across the BL1, BL2, BL3-1 and BL3-2 boot loader stages to not use stacks allocated in coherent memory for early platform setup and enabling the MMU. Stacks allocated in normal memory are used instead.
Attributes for stack memory change from nGnRnE when the MMU is disabled to Normal WBWA Inner-shareable when the MMU and data cache are enabled. It is possible for the CPU to read stale stack memory after the MMU is enabled from another CPUs cache. Hence, it is unsafe to turn on the MMU and data cache while using normal stacks when multiple CPUs are a part of the same coherency domain. It is safe to do so in the cold boot path as only the primary cpu executes it. The secondary cpus are in a quiescent state.
This patch does not remove the allocation of coherent stack memory. That is done in a subsequent patch.
Change-Id: I12c80b7c7ab23506d425c5b3a8a7de693498f830
show more ...
|
| 414cfa18 | 11-Jul-2014 |
danh-arm <dan.handley@arm.com> |
Merge pull request #163 from sandrine-bailleux/sb/tf-issue-117-v2
fvp: Reuse BL1 and BL2 memory through image overlaying (v2) |
| a1b6db6c | 16-Jun-2014 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
fvp: Reuse BL1 and BL2 memory through image overlaying
This patch re-organizes the memory layout on FVP as to give the BL3-2 image as much memory as possible.
Considering these two facts: - not al
fvp: Reuse BL1 and BL2 memory through image overlaying
This patch re-organizes the memory layout on FVP as to give the BL3-2 image as much memory as possible.
Considering these two facts: - not all images need to live in memory at the same time. Once in BL3-1, the memory used by BL1 and BL2 can be reclaimed. - when BL2 loads the BL3-1 and BL3-2 images, it only considers the PROGBITS sections of those 2 images. The memory occupied by the NOBITS sections will be touched only at execution of the BL3-x images; Then it is possible to choose the different base addresses such that the NOBITS sections of BL3-1 and BL3-2 overlay BL1 and BL2.
On FVP we choose to put: - BL1 and BL3-1 at the top of the Trusted RAM, with BL3-1 NOBITS sections overlaying BL1; - BL3-2 at the bottom of the Trusted RAM, with its NOBITS sections overlaying BL2;
This is illustrated by the following diagram:
0x0404_0000 ------------ ------------------ | BL1 | <= | BL3-1 NOBITS | ------------ <= ------------------ | | <= | BL3-1 PROGBITS | ------------ ------------------ | BL2 | <= | BL3-2 NOBITS | ------------ <= ------------------ | | <= | BL3-2 PROGBITS | 0x0400_0000 ------------ ------------------
New platform-specific constants have been introduced to easily check at link time that BL3-1 and BL3-2 PROGBITS sections don't overwrite BL1 and BL2. These are optional and the platform code is free to define them or not. If not defined, the linker won't attempt to check image overlaying.
Fixes ARM-software/tf-issues#117
Change-Id: I5981d1c3d66ee70eaac8bd052630c9ac6dd8b042
show more ...
|
| 1e8c5c4f | 20-Jun-2014 |
Dan Handley <dan.handley@arm.com> |
Refactor fvp gic code to be a generic driver
Refactor the FVP gic code in plat/fvp/fvp_gic.c to be a generic ARM GIC driver in drivers/arm/gic/arm_gic.c. Provide the platform specific inputs in the
Refactor fvp gic code to be a generic driver
Refactor the FVP gic code in plat/fvp/fvp_gic.c to be a generic ARM GIC driver in drivers/arm/gic/arm_gic.c. Provide the platform specific inputs in the arm_gic_setup() function so that the driver has no explicit dependency on platform code.
Provide weak implementations of the platform interrupt controller API in a new file, plat/common/plat_gic.c. These simply call through to the ARM GIC driver.
Move the only remaining FVP GIC function, fvp_gic_init() to plat/fvp/aarch64/fvp_common.c and remove plat/fvp/fvp_gic.c
Fixes ARM-software/tf-issues#182
Change-Id: Iea82fe095fad62dd33ba9efbddd48c57717edd21
show more ...
|
| 4f2104ff | 13-Jun-2014 |
Juan Castillo <juan.castillo@arm.com> |
Remove all checkpatch errors from codebase
Exclude stdlib files because they do not follow kernel code style.
Fixes ARM-software/tf-issues#73
Change-Id: I4cfafa38ab436f5ab22c277cb38f884346a267ab |
| 9865ac15 | 27-May-2014 |
Dan Handley <dan.handley@arm.com> |
Further renames of platform porting functions
Rename the ic_* platform porting functions to plat_ic_* to be consistent with the other functions in platform.h. Also rename bl31_get_next_image_info()
Further renames of platform porting functions
Rename the ic_* platform porting functions to plat_ic_* to be consistent with the other functions in platform.h. Also rename bl31_get_next_image_info() to bl31_plat_get_next_image_ep_info() and remove the duplicate declaration in bl31.h.
Change-Id: I4851842069d3cff14c0a468daacc0a891a7ede84
show more ...
|
| dff8e47a | 16-May-2014 |
Dan Handley <dan.handley@arm.com> |
Add enable mmu platform porting interfaces
Previously, the enable_mmu_elX() functions were implicitly part of the platform porting layer since they were included by generic code. These functions hav
Add enable mmu platform porting interfaces
Previously, the enable_mmu_elX() functions were implicitly part of the platform porting layer since they were included by generic code. These functions have been placed behind 2 new platform functions, bl31_plat_enable_mmu() and bl32_plat_enable_mmu(). These are weakly defined so that they can be optionally overridden by platform ports.
Also, the enable_mmu_elX() functions have been moved to lib/aarch64/xlat_tables.c for optional re-use by platform ports. These functions are tightly coupled with the translation table initialization code.
Fixes ARM-software/tf-issues#152
Change-Id: I0a2251ce76acfa3c27541f832a9efaa49135cc1c
show more ...
|
| 17a387ad | 15-May-2014 |
Dan Handley <dan.handley@arm.com> |
Rename FVP specific files and functions
FVP specific files and functions containing the word "plat" have been renamed to use the word "fvp" to distinguish them from the common platform functionality
Rename FVP specific files and functions
FVP specific files and functions containing the word "plat" have been renamed to use the word "fvp" to distinguish them from the common platform functionality and porting functions.
Change-Id: I39f9673dab3ee9c74bd18b3e62b7c21027232f7d
show more ...
|
| dec5e0d1 | 15-May-2014 |
Dan Handley <dan.handley@arm.com> |
Move BL porting functions into platform.h
Some platform porting functions were in BL specific header files. These have been moved to platform.h so that all porting functions are in the same place. T
Move BL porting functions into platform.h
Some platform porting functions were in BL specific header files. These have been moved to platform.h so that all porting functions are in the same place. The functions are now grouped by BL. Obsolete BL headers files have been removed.
Also, the weak declaration of the init_bl2_mem_layout() function has been moved out the header file and into the source file (bl_common.c) using the more succinct #pragma syntax. This mitigates the risk of 2 weak definitions being created and the wrong one being picked up by the compiler.
Change-Id: Ib19934939fd755f3e5a5a5bceec88da684308a83
show more ...
|
| 5f0cdb05 | 14-May-2014 |
Dan Handley <dan.handley@arm.com> |
Split platform.h into separate headers
Previously, platform.h contained many declarations and definitions used for different purposes. This file has been split so that:
* Platform definitions used
Split platform.h into separate headers
Previously, platform.h contained many declarations and definitions used for different purposes. This file has been split so that:
* Platform definitions used by common code that must be defined by the platform are now in platform_def.h. The exact include path is exported through $PLAT_INCLUDES in the platform makefile.
* Platform definitions specific to the FVP platform are now in /plat/fvp/fvp_def.h.
* Platform API declarations specific to the FVP platform are now in /plat/fvp/fvp_private.h.
* The remaining platform API declarations that must be ported by each platform are still in platform.h but this file has been moved to /include/plat/common since this can be shared by all platforms.
Change-Id: Ieb3bb22fbab3ee8027413c6b39a783534aee474a
show more ...
|
| f53d0fce | 23-May-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Merge pull request #101 from sandrine-bailleux:sb/tf-issue-81-v2 |
| a37255a2 | 22-May-2014 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Make the memory layout more flexible
Currently the platform code gets to define the base address of each boot loader image. However, the linker scripts couteract this flexibility by enforcing a fixe
Make the memory layout more flexible
Currently the platform code gets to define the base address of each boot loader image. However, the linker scripts couteract this flexibility by enforcing a fixed overall layout of the different images. For example, they require that the BL3-1 image sits below the BL2 image. Choosing BL3-1 and BL2 base addresses in such a way that it violates this constraint makes the build fail at link-time.
This patch requires the platform code to now define a limit address for each image. The linker scripts check that the image fits within these bounds so they don't rely anymore on the position of a given image in regard to the others.
Fixes ARM-software/tf-issues#163
Change-Id: I8c108646825da19a6a8dfb091b613e1dd4ae133c
show more ...
|
| 8957fc76 | 23-May-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Merge pull request #104 from athoelke:at/tsp-entrypoints-v2 |
| 65335d45 | 23-May-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Merge pull request #105 from athoelke:sm/support_normal_irq_in_tsp-v2 |
| 8545a874 | 23-May-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Merge pull request #102 from achingupta:ag/tf-issues#104-v2 |
| 399fb08f | 20-May-2014 |
Andrew Thoelke <andrew.thoelke@arm.com> |
Use a vector table for TSP entrypoints
The TSP has a number of entrypoints used by the TSP on different occasions. These were provided to the TSPD as a table of function pointers, and required the T
Use a vector table for TSP entrypoints
The TSP has a number of entrypoints used by the TSP on different occasions. These were provided to the TSPD as a table of function pointers, and required the TSPD to read the entry in the table, which is in TSP memory, in order to program the exception return address.
Ideally, the TSPD has no access to the TSP memory.
This patch changes the table of function pointers into a vector table of single instruction entrypoints. This allows the TSPD to calculate the entrypoint address instead of read it.
Fixes ARM-software/tf-issues#160
Change-Id: Iec6e055d537ade78a45799fbc6f43765a4725ad3
show more ...
|
| 239b04fa | 09-May-2014 |
Soby Mathew <soby.mathew@arm.com> |
Non-Secure Interrupt support during Standard SMC processing in TSP
Implements support for Non Secure Interrupts preempting the Standard SMC call in EL1. Whenever an IRQ is trapped in the Secure worl
Non-Secure Interrupt support during Standard SMC processing in TSP
Implements support for Non Secure Interrupts preempting the Standard SMC call in EL1. Whenever an IRQ is trapped in the Secure world we securely handover to the Normal world to process the interrupt. The normal world then issues "resume" smc call to resume the previous interrupted SMC call. Fixes ARM-software/tf-issues#105
Change-Id: I72b760617dee27438754cdfc9fe9bcf4cc024858
show more ...
|