| #
aa281dd4 |
| 26-Jun-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "fpga_update" into integration
* changes: feat(fpga): enable new CPU features feat(cpufeat): upgrade PMU to v8 (FEATURE_DETECTION)
|
| #
515d2d46 |
| 07-Mar-2024 |
Andre Przywara <andre.przywara@arm.com> |
feat(cpufeat): upgrade PMU to v8 (FEATURE_DETECTION)
The ARMv8 ARM J.a describes the ID_AA64DFR0_EL1.PMUver field as allowing a maximum version number of 8 now. The added features extend the Common
feat(cpufeat): upgrade PMU to v8 (FEATURE_DETECTION)
The ARMv8 ARM J.a describes the ID_AA64DFR0_EL1.PMUver field as allowing a maximum version number of 8 now. The added features extend the Common event number space and clarify on some UNPREDICTABLE behaviour.
None of this affects TF-A or any system registers, so just increase the maximum known version number to let the FEATURE_DETECTION test pass on ARMv8.8 implementations.
Change-Id: Icab48630c1635bcd78a710b443f0db01b8ff7c9b Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
2a0ca84f |
| 07-May-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "sm/feat_detect" into integration
* changes: refactor(cpufeat): restore functions in detect_arch_features refactor(cpufeat): add macro to simplify is_feat_xx_present c
Merge changes from topic "sm/feat_detect" into integration
* changes: refactor(cpufeat): restore functions in detect_arch_features refactor(cpufeat): add macro to simplify is_feat_xx_present chore: simplify the macro names in ENABLE_FEAT mechanism
show more ...
|
| #
011829b3 |
| 19-Apr-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
refactor(cpufeat): restore functions in detect_arch_features
The newly introduced wrapper macro CREATE_FEATURE_PRESENT replaces the read_feat_xx_id_field function that returns an integer with the is
refactor(cpufeat): restore functions in detect_arch_features
The newly introduced wrapper macro CREATE_FEATURE_PRESENT replaces the read_feat_xx_id_field function that returns an integer with the is_feat_xx_present function that returns a boolean based on the idfield, mask and feature enablement flag.
This impacts check_feature api which is explicilty used in detect_arch_features procedure. In order to keep it in original form, the read functions have been added. Further, the scope has also been reduced to static without introducing any additonal overhead on code size, as the feat_detect.c is included for build only when the FEATURE_DETECTION flag is enabled.
Change-Id: If364f32837a2ad19f49e4f0d355274bf7f26aaac Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| #
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 ...
|
| #
eee0ec48 |
| 26-Mar-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge changes from topic "mte_fixes" into integration
* changes: build(changelog): move mte to mte2 refactor(mte): remove mte, mte_perm
|
| #
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 ...
|
| #
eb889865 |
| 12-Feb-2024 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge "feat(mte): add mte2 feat" into integration
|
| #
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 ...
|
| #
7516d93d |
| 29-Jan-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(cpufeat): add feature detection for FEAT_CSV2_3" into integration
|
| #
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 ...
|
| #
61dfdfd4 |
| 24-Jan-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge "refactor(mte): deprecate CTX_INCLUDE_MTE_REGS" into integration
|
| #
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 ...
|
| #
0e1dc0f2 |
| 25-Oct-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(mpam): refine MPAM initialization and enablement process" into integration
|
| #
edebefbc |
| 11-Oct-2023 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
fix(mpam): refine MPAM initialization and enablement process
Restricts MPAM to only NS world and enables trap to EL3 for access of MPAM registers from lower ELs of Secure and Realm world.
This patc
fix(mpam): refine MPAM initialization and enablement process
Restricts MPAM to only NS world and enables trap to EL3 for access of MPAM registers from lower ELs of Secure and Realm world.
This patch removes MPAM enablement from global context and adds it to EL3 State context which enables/disables MPAM during world switches. Renamed ENABLE_MPAM_FOR_LOWER_ELS to ENABLE_FEAT_MPAM and removed mpam_init_el3() as RESET behaviour is trapping.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I131f9dba5df236a71959b2d425ee11af7f3c38c4
show more ...
|
| #
f7b37c6a |
| 16-Aug-2023 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge "refactor(cpufeat): introduce wrapper macro for read_feat_...() functions" into integration
|
| #
a8d5d3d5 |
| 18-Apr-2023 |
Andre Przywara <andre.przywara@arm.com> |
refactor(cpufeat): introduce wrapper macro for read_feat_...() functions
At the moment we have some elaborate, but very schematic functions to allow checking for CPU feature enablement. Adding some
refactor(cpufeat): introduce wrapper macro for read_feat_...() functions
At the moment we have some elaborate, but very schematic functions to allow checking for CPU feature enablement. Adding some more becomes tedious and is also error-prone.
Provide two wrapper macros that reduce most of the features to a single line: - CREATE_FEATURE_FUNCS(name, idreg, idfield, guard) creates two functions read_<name>_id_field() and is_<name>_supported(), that check the 4-bit CPU ID field starting at bit <idfield> in <idreg> for being not 0, and compares it against the build time <guard> symbol. For the usual feature (like PAN) this looks like: CREATE_FEATURE_FUNCS(feat_pan, id_aa64mmfr1_el1, ID_AA64MMFR1_EL1_PAN_SHIFT, ENABLE_FEAT_PAN)
- CREATE_FEATURE_FUNCS_VER(name, read_func, idvalue, guard) creates one function to check for a certain CPU ID field *value*, so when "!= 0" is not sufficient. It's meant to be used in addition to the above macro, since that generates the CPU ID field accessor function: CREATE_FEATURE_FUNCS(feat_amu, id_aa64pfr0_el1, ID_AA64PFR0_AMU_SHIFT, ENABLE_FEAT_AMU) CREATE_FEATURE_FUNCS_VER(feat_amuv1p1, read_feat_amu_id_field, ID_AA64PFR0_AMU_V1P1, ENABLE_FEAT_AMUv1p1)
Describe the existing feature accessor functions using those new macros, to reduce the size of the file, improve readability and decrease the possibility of (copy&paste) bugs.
Change-Id: Ib136a875b4857058ff561c4635ace344006f29bf Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
5ba2f1aa |
| 20-Jul-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(mte): adds feature detection for MTE_PERM" into integration
|
| #
4d0b6632 |
| 24-Mar-2023 |
Maksims Svecovs <maksims.svecovs@arm.com> |
feat(mte): adds feature detection for MTE_PERM
Adds feature detection for v8.9 feature FEAT_MTE_PERM. Adds respective ID_AA64PFR2_EL1 definitions and ENABLE_FEAT_MTE_PERM define.
Change-Id: If24b42
feat(mte): adds feature detection for MTE_PERM
Adds feature detection for v8.9 feature FEAT_MTE_PERM. Adds respective ID_AA64PFR2_EL1 definitions and ENABLE_FEAT_MTE_PERM define.
Change-Id: If24b42f1207154e639016b0b840b2d91c6ee13d4 Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com> Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
show more ...
|
| #
26d67076 |
| 29-Jun-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "bk/context_refactor" into integration
* changes: refactor(pmu): convert FEAT_MTPMU to C and move to persistent register init feat(pmu): introduce pmuv3 lib/extensions f
Merge changes from topic "bk/context_refactor" into integration
* changes: refactor(pmu): convert FEAT_MTPMU to C and move to persistent register init feat(pmu): introduce pmuv3 lib/extensions folder fix(pmu): make MDCR_EL3.MTPME=1 out of reset refactor(cm): introduce a real manage_extensions_nonsecure()
show more ...
|
| #
83a4dae1 |
| 16-Feb-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(pmu): convert FEAT_MTPMU to C and move to persistent register init
The FEAT_MTPMU feature disable runs very early after reset. This means, it needs to be written in assembly, since the C ru
refactor(pmu): convert FEAT_MTPMU to C and move to persistent register init
The FEAT_MTPMU feature disable runs very early after reset. This means, it needs to be written in assembly, since the C runtime has not been initialised yet.
However, there is no need for it to be initialised so soon. The PMU state is only relevant after TF-A has relinquished control. The code to do this is also very verbose and difficult to read. Delaying the initialisation allows for it to happen with the rest of the PMU. Align with FEAT_STATE in the process.
BREAKING CHANGE: This patch explicitly breaks the EL2 entry path. It is currently unsupported.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I2aa659d026fbdb75152469f6d19812ece3488c6f
show more ...
|
| #
c73686a1 |
| 15-Feb-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(pmu): introduce pmuv3 lib/extensions folder
The enablement code for the PMU is scattered and difficult to track down. Factor out the feature into its own lib/extensions folder and consolidate t
feat(pmu): introduce pmuv3 lib/extensions folder
The enablement code for the PMU is scattered and difficult to track down. Factor out the feature into its own lib/extensions folder and consolidate the implementation. Treat it is as an architecturally mandatory feature as it is currently.
Additionally, do some cleanup on AArch64. Setting overflow bits in PMCR_EL0 is irrelevant for firmware so don't do it. Then delay the PMU initialisation until the context management stage which simplifies the early environment assembly. One side effect is that the PMU might count before this happens so reset all counters to 0 to prevent any leakage.
Finally, add an enable to manage_extensions_realm() as realm world uses the pmu. This introduces the HPMN fixup to realm world.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: Ie13a8625820ecc5fbfa467dc6ca18025bf6a9cd3
show more ...
|
| #
269f3dae |
| 09-May-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "mp/feat_ras" into integration
* changes: refactor(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED refactor(ras): replace RAS_EXTENSION with FEAT_RAS
|
| #
6503ff29 |
| 27-Jan-2023 |
Andre Przywara <andre.przywara@arm.com> |
refactor(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED
At the moment we only support FEAT_RAS to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime det
refactor(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED
At the moment we only support FEAT_RAS to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (FEAT_RAS=2), by splitting is_armv8_2_feat_ras_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access RAS related registers.
Also move the context saving code from assembly to C, and use the new is_feat_ras_supported() function to guard its execution.
Change the FVP platform default to the now supported dynamic option (=2), so the right decision can be made by the code at runtime.
Change-Id: I30498f72fd80b136850856244687400456a03d0e Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
show more ...
|