| aaaf2cc3 | 13-Mar-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
refactor(cpufeat): add macro to simplify is_feat_xx_present
In this patch, we are trying to introduce the wrapper macro CREATE_FEATURE_PRESENT to get the following capability and align it for all th
refactor(cpufeat): add macro to simplify is_feat_xx_present
In this patch, we are trying to introduce the wrapper macro CREATE_FEATURE_PRESENT to get the following capability and align it for all the features:
-> is_feat_xx_present(): Does Hardware implement the feature. -> uniformity in naming the function across multiple features. -> improved readability
The is_feat_xx_present() is implemented to check if the hardware implements the feature and does not take into account the ENABLE_FEAT_XXX flag enabled/disabled in software.
- CREATE_FEATURE_PRESENT(name, idreg, shift, mask, idval) The wrapper macro reduces the function to a single line and creates the is_feat_xx_present function that checks the id register based on the shift and mask values and compares this against a determined idvalue.
Change-Id: I7b91d2c9c6fbe55f94c693aa1b2c50be54fb9ecc Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 9e51f15e | 11-Mar-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
chore: simplify the macro names in ENABLE_FEAT mechanism
Currently, the macros used to denote feature implementation in hardware follow a random pattern with a few macros having suffix as SUPPORTED
chore: simplify the macro names in ENABLE_FEAT mechanism
Currently, the macros used to denote feature implementation in hardware follow a random pattern with a few macros having suffix as SUPPORTED and a few using the suffix IMPLEMENTED. This patch aligns the macro names uniformly using the suffix IMPLEMENTED across all the features and removes unused macros pertaining to the Enable feat mechanism.
FEAT_SUPPORTED --> FEAT_IMPLEMENTED FEAT_NOT_SUPPORTED --> FEAT_NOT_IMPLEMENTED
Change-Id: I61bb7d154b23f677b80756a4b6a81f74b10cd24f Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| d6c76e6c | 17-Apr-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
fix(cm): add more feature registers to EL1 context mgmt
The following system registers are made part of save and restore operations for EL1 context:
TRFCR_EL1 SCXTNUM_EL0 SCXTNUM_EL1 GCSCR_EL1 GCSC
fix(cm): add more feature registers to EL1 context mgmt
The following system registers are made part of save and restore operations for EL1 context:
TRFCR_EL1 SCXTNUM_EL0 SCXTNUM_EL1 GCSCR_EL1 GCSCRE0_EL1 GCSPR_EL1 GCSPR_EL0
Change-Id: I1077112bdc29a6c9cd39b9707d6cf10b95fa15e3 Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| 832e4ed5 | 19-Apr-2024 |
Soby Mathew <soby.mathew@arm.com> |
fix(gpt): declare gpt_tlbi_by_pa_ll()
The patch 8754cc5 accidentally removes the declaration of gpt_tlbi_by_pa_ll() and hence breaks RME builds. This patch fixes the same.
signed-off-by: Soby Mathe
fix(gpt): declare gpt_tlbi_by_pa_ll()
The patch 8754cc5 accidentally removes the declaration of gpt_tlbi_by_pa_ll() and hence breaks RME builds. This patch fixes the same.
signed-off-by: Soby Mathew <soby.mathew@arm.com> Change-Id: I2523982fc48bca2a1f1a36fd9bd3803b01c6916a
show more ...
|
| 98f7b60e | 19-Apr-2024 |
Soby Mathew <soby.mathew@arm.com> |
Merge changes Ic40e1b7a,I0398b550,Ife594ed6,I3eb0f29b into integration
* changes: fix(gpt): unify logging messages chore(gpt): remove gpt_ prefix feat(aarch64): add functions for TLBI RPALOS
Merge changes Ic40e1b7a,I0398b550,Ife594ed6,I3eb0f29b into integration
* changes: fix(gpt): unify logging messages chore(gpt): remove gpt_ prefix feat(aarch64): add functions for TLBI RPALOS feat(locks): add bitlock
show more ...
|
| 8754cc5d | 13-Mar-2024 |
AlexeiFedorov <Alexei.Fedorov@arm.com> |
feat(aarch64): add functions for TLBI RPALOS
This patch adds tlbirpalos_XYZ() functions to support TLBI RPALOS instructions for the 4KB-512MB invalidation range.
Change-Id: Ife594ed6c746d356b4b1fdf
feat(aarch64): add functions for TLBI RPALOS
This patch adds tlbirpalos_XYZ() functions to support TLBI RPALOS instructions for the 4KB-512MB invalidation range.
Change-Id: Ife594ed6c746d356b4b1fdf97001a0fe2b5e8cd0 Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
show more ...
|
| ed9bb824 | 25-Mar-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
fix(cm): add more system registers to EL1 context mgmt
The following system registers are made part of save and restore operations for EL1 context: MDCCINT_EL1 MDSCR_EL1 DISR_EL1 PIRE0_EL1
fix(cm): add more system registers to EL1 context mgmt
The following system registers are made part of save and restore operations for EL1 context: MDCCINT_EL1 MDSCR_EL1 DISR_EL1 PIRE0_EL1 PIR_EL1 POR_EL1 S2POR_EL1 TCR2_EL1
Some of these registers are available as part of core Armv8-A architecture while others are made available through various architectural extensions.
Change-Id: I507dccb9053ba177e1b98100fceccd1f32bdfc5c Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| c282384d | 07-Mar-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(mte): remove mte, mte_perm
Currently both FEAT_MTE and FEAT_MTE_PERM aren't used for enabling of any feature bits in EL3. So remove both FEAT handling.
All mte regs that are currently cont
refactor(mte): remove mte, mte_perm
Currently both FEAT_MTE and FEAT_MTE_PERM aren't used for enabling of any feature bits in EL3. So remove both FEAT handling.
All mte regs that are currently context saved/restored are needed only when FEAT_MTE2 is enabled, so move to usage of FEAT_MTE2 and remove FEAT_MTE usage.
BREAKING CHANGE: Any platform or downstream code trying to use SCR_EL3.ATA bit(26) will see failures as this is now moved to be used only with FEAT_MTE2 with commit@ef0d0e5478a3f19cbe70a378b9b184036db38fe2
Change-Id: Id01e154156571f7792135639e17dc5c8d0e17cf8 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 33c665ae | 02-Jan-2024 |
Harrison Mutai <harrison.mutai@arm.com> |
fix(cpus): workaround for Cortex-A715 erratum 2344187
Cortex-A715 erratum 2344187 is a Cat B erratum that applies to r0p0, r1p0 and is fixed in r1p1. The workaround is to set GCR_EL1.RRND to 0b1, an
fix(cpus): workaround for Cortex-A715 erratum 2344187
Cortex-A715 erratum 2344187 is a Cat B erratum that applies to r0p0, r1p0 and is fixed in r1p1. The workaround is to set GCR_EL1.RRND to 0b1, and apply an implementation specific patch sequence.
SDEN: https://developer.arm.com/documentation/SDEN2148827/latest
Change-Id: I78ea39a91254765c964bff89f771af33b23f29c1 Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
show more ...
|
| c2f9ba88 | 28-Feb-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "mp/undef_injection" into integration
* changes: feat(el3-runtime): introduce UNDEF injection to lower EL feat(cpufeat): added few helper functions |
| 3c789bfc | 08-Dec-2023 |
Manish Pandey <manish.pandey2@arm.com> |
feat(el3-runtime): introduce UNDEF injection to lower EL
For a feature to be used at lower ELs, EL3 generally needs to disable the trap so that lower ELs can access the system registers associated w
feat(el3-runtime): introduce UNDEF injection to lower EL
For a feature to be used at lower ELs, EL3 generally needs to disable the trap so that lower ELs can access the system registers associated with the feature. Lower ELs generally check ID registers to dynamically detect if a feature is present (in HW) or not while EL3 Firmware relies statically on feature build macros to enable a feature.
If a lower EL accesses a system register for a feature that EL3 FW is unaware of, EL3 traps the access and panics. This happens mostly with EL2 but sometimes VMs can also cause EL3 panic.
To provide platforms with capability to mitigate this problem, UNDEF injection support has been introduced which injects a synchronous exception into the lower EL which is supposed to handle the synchronous exception.
The current support is only provided for aarch64.
The implementation does the following on encountering sys reg trap
- Get the target EL, which can be either EL2 or EL1 - Update ELR_ELx with ELR_EL3, so that after UNDEF handling in lower EL control returns to original location. - ESR_ELx with EC_UNKNOWN - Update ELR_EL3 with vector address of sync exception handler with following possible causes - Current EL with SP0 - Current EL with SPx - Lower EL using AArch64 - Re-create SPSR_EL3 which will be used to generate PSTATE at ERET
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I1b7bf6c043ce7aec1ee4fc1121c389b490b7bfb7
show more ...
|
| 57c266dc | 28-Feb-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(gpt): use DC CIGDPAPA when MTE2 is implemented" into integration |
| 30f05b4f | 09-Jan-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(cpufeat): added few helper functions
Following utility functions/bit definitions done - Write a helper function to return the presence of following features - FEAT_UAO - FEAT_EBEP
feat(cpufeat): added few helper functions
Following utility functions/bit definitions done - Write a helper function to return the presence of following features - FEAT_UAO - FEAT_EBEP - FEAT_SEBEP - FEAT_SSBS - FEAT_NMI - FEAT_PAN - Add definition of some missing bits of SPSR. - Add GCSCR_EL1 register encoding and accessor function.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ifcead0dd8e3b32096e4ab810dde5d582a889785a
show more ...
|
| 59f8882b | 08-Jan-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(context-mgmt): move EL1 save/restore routines into C
Similar to the refactoring process followed for EL2 system registers, moving the save and restore routines of EL1 system registers into
refactor(context-mgmt): move EL1 save/restore routines into C
Similar to the refactoring process followed for EL2 system registers, moving the save and restore routines of EL1 system registers into C file, thereby reducing assembly code.
Change-Id: Ib59fbbe2eef2aa815effe854cf962fc4ac62a2ae Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 62d64652 | 17-Jan-2024 |
Olivier Deprez <olivier.deprez@arm.com> |
fix(gpt): use DC CIGDPAPA when MTE2 is implemented
Use cache clean and invalidate of data and allocation tags by PA to PoPA maintenance instruction (dc cigdpapa) in the GPT library upon changing the
fix(gpt): use DC CIGDPAPA when MTE2 is implemented
Use cache clean and invalidate of data and allocation tags by PA to PoPA maintenance instruction (dc cigdpapa) in the GPT library upon changing the PAS for a memory region. This is required to flush allocation tags when MTE2 (and above) is implemented.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I4b70afb297f693b1d446839607922c47111ce063
show more ...
|
| 8e397889 | 26-Jan-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
feat(mte): add mte2 feat
Add support for feat mte2. tfsr_el2 is available only with mte2, however currently its context_save/restore is done with mte rather than mte2, so introduce 'is_feat_mte2_sup
feat(mte): add mte2 feat
Add support for feat mte2. tfsr_el2 is available only with mte2, however currently its context_save/restore is done with mte rather than mte2, so introduce 'is_feat_mte2_supported' to check mte2.
Change-Id: I108d9989a8f5b4d1d2f3b9865a914056fa566cf2 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 8815cdaf | 29-Jan-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(spmd): initialize SCR_EL3.EEL2 bit at RESET
SCR_EL3.EEL2 bit enabled denotes that the system has S-EL2 present and enabled, Ideally this bit is constant throughout the lifetime and should not b
feat(spmd): initialize SCR_EL3.EEL2 bit at RESET
SCR_EL3.EEL2 bit enabled denotes that the system has S-EL2 present and enabled, Ideally this bit is constant throughout the lifetime and should not be modified. Currently this bit is initialized in the context mgmt code where each world copy of the SCR_EL3 register has this bit set to 1, but for the time duration between the RESET and the first exit to a lower EL this bit is zero.
Modifying SCR_EL3.EEL2 along with EA bit at RESET does also helps in mitigating against ERRATA_V2_3099206.
For details on Neoverse V2 errata 3099206, refer the SDEN document given below. https://developer.arm.com/documentation/SDEN-2332927/latest
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: If8b2bdbb19bc65391a33dd34cc9824a0203ae4b1
show more ...
|
| 30019d86 | 25-Oct-2023 |
Sona Mathew <sonarebecca.mathew@arm.com> |
feat(cpufeat): add feature detection for FEAT_CSV2_3
This feature provides support to context save the SCXTNUM_ELx register. FEAT_CSV2_3 implies the implementation of FEAT_CSV2_2. FEAT_CSV2_3 is sup
feat(cpufeat): add feature detection for FEAT_CSV2_3
This feature provides support to context save the SCXTNUM_ELx register. FEAT_CSV2_3 implies the implementation of FEAT_CSV2_2. FEAT_CSV2_3 is supported in AArch64 state only and is an optional feature in Arm v8.0 implementations.
This patch adds feature detection for v8.9 feature FEAT_CSV2_3, adds macros for ID_AA64PFR0_EL1.CSV2 bits [59:56] for detecting FEAT_CSV2_3 and macro for ENABLE_FEAT_CSV2_3.
Change-Id: Ida9f31e832b5f11bd89eebd6cc9f10ddad755c14 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 0a33adc0 | 21-Dec-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(mte): deprecate CTX_INCLUDE_MTE_REGS
Currently CTX_INCLUDE_MTE_REGS is used for dual purpose, to enable allocation tags register and to context save and restore them and also to check if mt
refactor(mte): deprecate CTX_INCLUDE_MTE_REGS
Currently CTX_INCLUDE_MTE_REGS is used for dual purpose, to enable allocation tags register and to context save and restore them and also to check if mte feature is available.
To make it more meaningful, remove CTX_INCLUDE_MTE_REGS and introduce FEAT_MTE. This would enable allocation tags register when FEAT_MTE is enabled and also supported from platform.
Also arch features can be conditionally enabled disabled based on arch version from `make_helpers/arch_features.mk`
Change-Id: Ibdd2d43874634ad7ddff93c7edad6044ae1631ed Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 6d22b089 | 11-Oct-2023 |
Manish Pandey <manish.pandey2@arm.com> |
fix(el3-runtime): restrict lower el EA handlers in FFH mode
This patch does following changes to restrict handling of lower EL EA's only if FFH mode is enabled.
- Compile ea_delegate.S only if FFH
fix(el3-runtime): restrict lower el EA handlers in FFH mode
This patch does following changes to restrict handling of lower EL EA's only if FFH mode is enabled.
- Compile ea_delegate.S only if FFH mode is enabled. - For Sync exception from lower ELs if the EC is not SMC or SYS reg trap it was assumed that it is an EA, which is not correct. Move the known Sync exceptions (EL3 Impdef) out of sync EA handler. - Report unhandled exceptions if there are SError from lower EL in KFH mode, as this is unexpected. - Move code out of ea_delegate.S which are used for KFH mode.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I577089677d0ec8cde7c20952172bee955573d2ed
show more ...
|
| 970a4a8d | 10-Oct-2023 |
Manish Pandey <manish.pandey2@arm.com> |
fix(ras): restrict ENABLE_FEAT_RAS to have only two states
As part of migrating RAS extension to feature detection mechanism, the macro ENABLE_FEAT_RAS was allowed to have dynamic detection (FEAT_ST
fix(ras): restrict ENABLE_FEAT_RAS to have only two states
As part of migrating RAS extension to feature detection mechanism, the macro ENABLE_FEAT_RAS was allowed to have dynamic detection (FEAT_STATE 2). Considering this feature does impact execution of EL3 and we need to know at compile time about the presence of this feature. Do not use dynamic detection part of feature detection mechanism.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I23858f641f81fbd81b6b17504eb4a2cc65c1a752
show more ...
|
| 6597fcf1 | 26-Jun-2023 |
Manish Pandey <manish.pandey2@arm.com> |
feat(ras): use FEAT_IESB for error synchronization
For synchronization of errors at exception boundries TF-A uses "esb" instruction with FEAT_RAS or "dsb" and "isb" otherwise. The problem with esb i
feat(ras): use FEAT_IESB for error synchronization
For synchronization of errors at exception boundries TF-A uses "esb" instruction with FEAT_RAS or "dsb" and "isb" otherwise. The problem with esb instruction is, along with synching errors it might also consume the error, which is not ideal in all scenarios. On the other hand we can't use dsb always as its in the hot path.
To solve above mentioned problem the best way is to use FEAT_IESB feature which provides controls to insert an implicit Error synchronization event at exception entry and exception return.
Assumption in TF-A is, if RAS Extension is present then FEAT_IESB will also be present and enabled.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ie5861eec5da4028a116406bb4d1fea7dac232456
show more ...
|
| d04c04a4 | 25-May-2023 |
Manish Pandey <manish.pandey2@arm.com> |
feat(el3-runtime): modify vector entry paths
Vector entries in EL3 from lower ELs, first check for any pending async EAs from lower EL before handling the original exception. This happens when there
feat(el3-runtime): modify vector entry paths
Vector entries in EL3 from lower ELs, first check for any pending async EAs from lower EL before handling the original exception. This happens when there is an error (EA) in the system which is not yet signaled to PE while executing at lower EL. During entry into EL3 the errors (EA) are synchronized causing async EA to pend at EL3.
On detecting the pending EA (via ISR_EL1.A) EL3 either reflects it back to lower EL (KFH) or handles it in EL3 (FFH) based on EA routing model.
In case of Firmware First handling mode (FFH), EL3 handles the pended EA first before returing back to handle the original exception.
While in case of Kernel First handling mode (KFH), EL3 will return back to lower EL without handling the original exception. On returing to lower EL, EA will be pended. In KFH mode there is a risk of back and forth between EL3 and lower EL if the EA is masked at lower EL or priority of EA is lower than that of original exception. This is a limitation in current architecture but can be solved in future if EL3 gets a capability to inject virtual SError.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I3a2a31de7cf454d9d690b1ef769432a5b24f6c11
show more ...
|
| 33bb5787 | 31-Oct-2023 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge "feat(cpufeat): add memory retention bit define for CLUSTERPWRDN" into integration |
| 461c0a5d | 18-Jul-2023 |
Elizabeth Ho <elizabeth.ho@arm.com> |
refactor(cm): move EL3 registers to global context
Currently, EL3 context registers are duplicated per-world per-cpu. Some registers have the same value across all CPUs, so this patch moves these re
refactor(cm): move EL3 registers to global context
Currently, EL3 context registers are duplicated per-world per-cpu. Some registers have the same value across all CPUs, so this patch moves these registers out into a per-world context to reduce memory usage.
Change-Id: I91294e3d5f4af21a58c23599af2bdbd2a747c54a Signed-off-by: Elizabeth Ho <elizabeth.ho@arm.com> Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|