| 44684429 | 16-Oct-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1123 from robertovargas-arm/reset2
Integration of reset2 PSCI v1.1 functionality |
| e0f34eaa | 18-Sep-2017 |
Roberto Vargas <roberto.vargas@arm.com> |
Fix use of MSR (immediate)
The macro DEFINE_SYSREG_WRITE_CONST_FUNC defines an inline function to an assembly statement that uses the MSR (immediate) instruction to access the PSTATE. The "i" (imme
Fix use of MSR (immediate)
The macro DEFINE_SYSREG_WRITE_CONST_FUNC defines an inline function to an assembly statement that uses the MSR (immediate) instruction to access the PSTATE. The "i" (immediate) assembly constraint on the operand was only satisfied when compiling with optimizations enabled which resulted in the function being optimized out - the "const uint64_t v" parameter was optimized out and replaced by a literal value.
When compiling without optimizations, the function call remained and therefore the parameter is not optimized out - compilation fails as the constraint is impossible to satisfy by the compiler.
This patch replaces the function encapsulating the use of the MSR (immediate) with a macro that allows the literal value to be directly fed to the inline assembly statement
Change-Id: Ib379a7acc48ef3cb83090a680cd8a6ce1a94a9d9 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| 829e97d7 | 11-Sep-2017 |
Roberto Vargas <roberto.vargas@arm.com> |
Update PSCI version to 1.1
Updated the PSCI version conforming to the PSCI v1.1 specification (ARM DEN022D).
Change-Id: I1f34772ef6de37ec1ade719a1ab3aa062152d995 Signed-off-by: Roberto Vargas <robe
Update PSCI version to 1.1
Updated the PSCI version conforming to the PSCI v1.1 specification (ARM DEN022D).
Change-Id: I1f34772ef6de37ec1ade719a1ab3aa062152d995 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| 3e61b2b5 | 02-Oct-2017 |
David Cunado <david.cunado@arm.com> |
Init and save / restore of PMCR_EL0 / PMCR
Currently TF does not initialise the PMCR_EL0 register in the secure context or save/restore the register.
In particular, the DP field may not be set to o
Init and save / restore of PMCR_EL0 / PMCR
Currently TF does not initialise the PMCR_EL0 register in the secure context or save/restore the register.
In particular, the DP field may not be set to one to prohibit cycle counting in the secure state, even though event counting generally is prohibited via the default setting of MDCR_EL3.SMPE to 0.
This patch initialises PMCR_EL0.DP to one in the secure state to prohibit cycle counting and also initialises other fields that have an architectually UNKNOWN reset value.
Additionally, PMCR_EL0 is added to the list of registers that are saved and restored during a world switch.
Similar changes are made for PMCR for the AArch32 execution state.
NOTE: secure world code at lower ELs that assume other values in PMCR_EL0 will be impacted.
Change-Id: Iae40e8c0a196d74053accf97063ebc257b4d2f3a Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| 36a8f8fd | 26-Jul-2017 |
Roberto Vargas <roberto.vargas@arm.com> |
reset2: Add PSCI system_reset2 function
This patch implements PSCI_SYSTEM_RESET2 API as defined in PSCI v1.1 specification. The specification allows architectural and vendor-specific resets via this
reset2: Add PSCI system_reset2 function
This patch implements PSCI_SYSTEM_RESET2 API as defined in PSCI v1.1 specification. The specification allows architectural and vendor-specific resets via this API. In the current specification, there is only one architectural reset, the warm reset. This reset is intended to provide a fast reboot path that guarantees not to reset system main memory.
Change-Id: I057bb81a60cd0fe56465dbb5791d8e1cca025bd3 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| 0f49d496 | 09-Oct-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1117 from antonio-nino-diaz-arm/an/xlat-improvements
Improvements to the translation tables library v2 |
| ebf1ca10 | 13-Jul-2017 |
Soby Mathew <soby.mathew@arm.com> |
GICv3: add functions for save and restore
During system suspend, the GICv3 Distributor and Redistributor context can be lost due to power gating of the system power domain. This means that the GICv3
GICv3: add functions for save and restore
During system suspend, the GICv3 Distributor and Redistributor context can be lost due to power gating of the system power domain. This means that the GICv3 context needs to be saved prior to system suspend and restored on wakeup. Currently the consensus is that the Firmware should be in charge of this. See tf-issues#464 for more details.
This patch introduces helper APIs in the GICv3 driver to save and restore the Distributor and Redistributor contexts. The GICv3 ITS context is not considered in this patch because the specification says that the details of ITS power management is implementation-defined. These APIs are expected to be appropriately invoked by the platform layer during system suspend.
Fixes ARM-software/tf-issues#464
Change-Id: Iebb9c6770ab8c4d522546f161fa402d2fe02ec00 Signed-off-by: Soby Mathew <soby.mathew@arm.com> Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| 609c9191 | 04-Oct-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
xlat: Add support for EL0 and EL1 mappings
This patch introduces the ability of the xlat tables library to manage EL0 and EL1 mappings from a higher exception level.
Attributes MT_USER and MT_PRIVI
xlat: Add support for EL0 and EL1 mappings
This patch introduces the ability of the xlat tables library to manage EL0 and EL1 mappings from a higher exception level.
Attributes MT_USER and MT_PRIVILEGED have been added to allow the user specify the target EL in the translation regime EL1&0.
REGISTER_XLAT_CONTEXT2 macro is introduced to allow creating a xlat_ctx_t that targets a given translation regime (EL1&0 or EL3).
A new member is added to xlat_ctx_t to represent the translation regime the xlat_ctx_t manages. The execute_never mask member is removed as it is computed from existing information.
Change-Id: I95e14abc3371d7a6d6a358cc54c688aa9975c110 Co-authored-by: Douglas Raillard <douglas.raillard@arm.com> Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| b4ae615b | 25-Sep-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
xlat: Introduce function xlat_arch_tlbi_va_regime()
Introduce a variant of the TLB invalidation helper function that allows the targeted translation regime to be specified, rather than defaulting to
xlat: Introduce function xlat_arch_tlbi_va_regime()
Introduce a variant of the TLB invalidation helper function that allows the targeted translation regime to be specified, rather than defaulting to the current one.
This new function is useful in the context of EL3 software managing translation tables for the S-EL1&0 translation regime, as then it might need to invalidate S-EL1&0 TLB entries rather than EL3 ones.
Define a new enumeration to be able to represent translation regimes in the xlat tables library.
Change-Id: Ibe4438dbea2d7a6e7470bfb68ff805d8bf6b07e5 Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Co-authored-by: Douglas Raillard <douglas.raillard@arm.com> Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| fdb1964c | 28-Sep-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat: Introduce MAP_REGION2() macro
The current implementation of the memory mapping API favours mapping memory regions using the biggest possible block size in order to reduce the number of transla
xlat: Introduce MAP_REGION2() macro
The current implementation of the memory mapping API favours mapping memory regions using the biggest possible block size in order to reduce the number of translation tables needed.
In some cases, this behaviour might not be desirable. When translation tables are edited at run-time, coarse-grain mappings like that might need splitting into finer-grain tables. This operation has a performance cost.
The MAP_REGION2() macro allows to specify the granularity of translation tables used for the initial mapping of a memory region. This might increase performance for memory regions that are likely to be edited in the future, at the expense of a potentially increased memory footprint.
The Translation Tables Library Design Guide has been updated to explain the use case for this macro. Also added a few intermediate titles to make the guide easier to digest.
Change-Id: I04de9302e0ee3d326b8877043a9f638766b81b7b Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| c64d1345 | 04-Oct-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1109 from robertovargas-arm/mem_protect
Mem protect |
| 03f55a58 | 26-Sep-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
xlat: remove cast in MAP_REGION to get back building with GCC 4.9
Since commit 769d65da778b ("xlat: Use MAP_REGION macro as compatibility layer"), building with GCC 4.9 fails.
CC plat/arm/bo
xlat: remove cast in MAP_REGION to get back building with GCC 4.9
Since commit 769d65da778b ("xlat: Use MAP_REGION macro as compatibility layer"), building with GCC 4.9 fails.
CC plat/arm/board/fvp/fvp_common.c plat/arm/board/fvp/fvp_common.c:60:2: error: initializer element is not constant ARM_MAP_SHARED_RAM, ^ plat/arm/board/fvp/fvp_common.c:60:2: error: (near initialization for 'plat_arm_mmap[0]') make: *** [Makefile:535: build/fvp/release/bl1/fvp_common.o] Error 1
Taking into account that MAP_REGION(_FLAT) is widely used in array initializers, do not use cast.
Fixes: 769d65da778b ("xlat: Use MAP_REGION macro as compatibility layer") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| c2280b37 | 25-Sep-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1105 from antonio-nino-diaz-arm/an/epd1-bit
Set TCR_EL1.EPD1 bit to 1 |
| 43cbaf06 | 03-Aug-2017 |
Roberto Vargas <roberto.vargas@arm.com> |
Add mem_region utility functions
This commit introduces a new type (mem_region_t) used to describe memory regions and it adds two utility functions:
- clear_mem_regions: This function clears (writ
Add mem_region utility functions
This commit introduces a new type (mem_region_t) used to describe memory regions and it adds two utility functions:
- clear_mem_regions: This function clears (write 0) to a set of regions described with an array of mem_region_t.
- mem_region_in_array_chk This function checks if a region is covered by some of the regions described with an array of mem_region_t.
Change-Id: I12ce549f5e81dd15ac0981645f6e08ee7c120811 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| d4c596be | 03-Aug-2017 |
Roberto Vargas <roberto.vargas@arm.com> |
mem_protect: Add mem_protect API
This patch adds the generic code that links the psci smc handler with the platform function that implements the mem_protect and mem_check_range functionalities. Thes
mem_protect: Add mem_protect API
This patch adds the generic code that links the psci smc handler with the platform function that implements the mem_protect and mem_check_range functionalities. These functions are optional APIs added in PSCI v1.1 (ARM DEN022D).
Change-Id: I3bac1307a5ce2c7a196ace76db8317e8d8c8bb3f Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
show more ...
|
| e47ac1fd | 14-Sep-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Fix type of `unsigned long` constants
The type `unsigned long` is 32 bit wide in AArch32, but 64 bit wide in AArch64. This is inconsistent and that's why we avoid using it as per the Coding Guidelin
Fix type of `unsigned long` constants
The type `unsigned long` is 32 bit wide in AArch32, but 64 bit wide in AArch64. This is inconsistent and that's why we avoid using it as per the Coding Guidelines. This patch changes all `UL` occurrences to `U` or `ULL` depending on the context so that the size of the constant is clear.
This problem affected the macro `BIT(nr)`. As long as this macro is used to fill fields of registers, that's not a problem, since all registers are 32 bit wide in AArch32 and 64 bit wide in AArch64. However, if the macro is used to fill the fields of a 64-bit integer, it won't be able to set the upper 32 bits in AArch32.
By changing the type of this macro to `unsigned long long` the behaviour is always the same regardless of the architecture, as this type is 64-bit wide in both cases.
Some Tegra platform files have been modified by this patch.
Change-Id: I918264c03e7d691a931f0d1018df25a2796cc221 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 3388b38d | 15-Sep-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Set TCR_EL1.EPD1 bit to 1
In the S-EL1&0 translation regime we aren't using the higher VA range, whose translation table base address is held in TTBR1_EL1. The bit TCR_EL1.EPD1 can be used to disabl
Set TCR_EL1.EPD1 bit to 1
In the S-EL1&0 translation regime we aren't using the higher VA range, whose translation table base address is held in TTBR1_EL1. The bit TCR_EL1.EPD1 can be used to disable translations using TTBR1_EL1, but the code wasn't setting it to 1. Additionally, other fields in TCR1_EL1 associated with the higher VA range (TBI1, TG1, SH1, ORGN1, IRGN1 and A1) weren't set correctly as they were left as 0. In particular, 0 is a reserved value for TG1. Also, TBBR1_EL1 was not explicitly set and its reset value is UNKNOWN.
Therefore memory accesses to the higher VA range would result in unpredictable behaviour as a translation table walk would be attempted using an UNKNOWN value in TTBR1_EL1.
On the FVP and Juno platforms accessing the higher VA range resulted in a translation fault, but this may not always be the case on all platforms.
This patch sets the bit TCR_EL1.EPD1 to 1 so that any kind of unpredictable behaviour is prevented.
This bug only affects the AArch64 version of the code, the AArch32 version sets this bit to 1 as expected.
Change-Id: I481c000deda5bc33a475631301767b9e0474a303 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 756f9bb8 | 15-Sep-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1094 from douglas-raillard-arm/dr/fix_mmap_add_dynamic_region
xlat: Use MAP_REGION macro as compatibility layer |
| 508a0f2a | 15-Sep-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1096 from davidcunado-arm/im/mair_attributes_helper
Helper macro to create MAIR encodings |
| 04880e3f | 21-Jul-2017 |
Isla Mitchell <isla.mitchell@arm.com> |
Helper macro to create MAIR encodings
This patch provides helper macros for both Device and Normal memory MAIR encodings as defined by the ARM Architecture Reference Manual for ARMv8-A (ARM DDI0487B
Helper macro to create MAIR encodings
This patch provides helper macros for both Device and Normal memory MAIR encodings as defined by the ARM Architecture Reference Manual for ARMv8-A (ARM DDI0487B.A).
Change-Id: I5faae7f2cf366390ad4ba1d9253c6f3b60fd5e20 Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| 769d65da | 31-Aug-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
xlat: Use MAP_REGION macro as compatibility layer
Use the MAP_REGION to build the mmap_region_t argument in wrappers like mmap_add_region(). Evolution of the mmap_region_t might require adding new m
xlat: Use MAP_REGION macro as compatibility layer
Use the MAP_REGION to build the mmap_region_t argument in wrappers like mmap_add_region(). Evolution of the mmap_region_t might require adding new members with a non-zero default value. Users of MAP_REGION are protected against such evolution. This commit also protects users of mmap_add_region() and mmap_add_dynamic_region() functions against these evolutions.
Also make the MAP_REGION macro implementation more explicit and make it a mmap_region_t compound literal to make it useable as a function parameter on its own and to prevent using it in initialization of variables of different type.
Change-Id: I7bfc4689f6dd4dd23c895b65f628d8ee991fc161 Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| 6de9b336 | 02-Aug-2017 |
Eleanor Bonnici <Eleanor.bonnici@arm.com> |
Cortex-A72: Implement workaround for erratum 859971
Erratum 855971 applies to revision r0p3 or earlier Cortex-A72 CPUs. The recommended workaround is to disable instruction prefetch.
Change-Id: I7f
Cortex-A72: Implement workaround for erratum 859971
Erratum 855971 applies to revision r0p3 or earlier Cortex-A72 CPUs. The recommended workaround is to disable instruction prefetch.
Change-Id: I7fde74ee2a8a23b2a8a1891b260f0eb909fad4bf Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com> Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 45b52c20 | 02-Aug-2017 |
Eleanor Bonnici <Eleanor.bonnici@arm.com> |
Cortex-A57: Implement workaround for erratum 859972
Erratum 855972 applies to revision r1p3 or earlier Cortex-A57 CPUs. The recommended workaround is to disable instruction prefetch.
Change-Id: I56
Cortex-A57: Implement workaround for erratum 859972
Erratum 855972 applies to revision r1p3 or earlier Cortex-A57 CPUs. The recommended workaround is to disable instruction prefetch.
Change-Id: I56eeac0b753eb1432bd940083372ad6f7e93b16a Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com> Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 413115e1 | 06-Sep-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1019 from etienne-lms/log-size
CPU_DATA_LOG2SIZE depends on cache line size |
| 86606eb5 | 01-Sep-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
cpu log buffer size depends on cache line size
Platform may use specific cache line sizes. Since CACHE_WRITEBACK_GRANULE defines the platform specific cache line size, it is used to define the size
cpu log buffer size depends on cache line size
Platform may use specific cache line sizes. Since CACHE_WRITEBACK_GRANULE defines the platform specific cache line size, it is used to define the size of the cpu data structure CPU_DATA_SIZE aligned on cache line size.
Introduce assembly macro 'mov_imm' for AArch32 to simplify implementation of function '_cpu_data_by_index'.
Change-Id: Ic2d49ffe0c3e51649425fd9c8c99559c582ac5a1 Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|