| #
c5ea3fac |
| 12-Mar-2025 |
Soby Mathew <soby.mathew@arm.com> |
Merge "feat(rmmd): add FEAT_MEC support" into integration
|
| #
7e84f3cf |
| 15-Mar-2024 |
Tushar Khandelwal <tushar.khandelwal@.com> |
feat(rmmd): add FEAT_MEC support
This patch provides architectural support for further use of Memory Encryption Contexts (MEC) by declaring the necessary registers, bits, masks, helpers and values a
feat(rmmd): add FEAT_MEC support
This patch provides architectural support for further use of Memory Encryption Contexts (MEC) by declaring the necessary registers, bits, masks, helpers and values and modifying the necessary registers to enable FEAT_MEC.
Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com> Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com> Change-Id: I670dbfcef46e131dcbf3a0b927467ebf6f438fa4
show more ...
|
| #
54c9c68a |
| 19-Apr-2024 |
Nithin G <nithing@amd.com> |
fix(el3-runtime): add const qualifier
This corrects the MISRA violation C2012-8.13: A pointer should point to a const-qualified type whenever possible. Added const qualifier to pointer in the functi
fix(el3-runtime): add const qualifier
This corrects the MISRA violation C2012-8.13: A pointer should point to a const-qualified type whenever possible. Added const qualifier to pointer in the function arguments.
Change-Id: Idf4b8ea7842304849242a06d6ada73f11afc8cde Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
d77a1ec5 |
| 07-Mar-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "xlnx_fix_gen_missing_brace" into integration
* changes: fix(platforms): modify function to have single return fix(el3-runtime): add missing curly braces fix(locks): a
Merge changes from topic "xlnx_fix_gen_missing_brace" into integration
* changes: fix(platforms): modify function to have single return fix(el3-runtime): add missing curly braces fix(locks): add missing curly braces fix(psci): add missing curly braces fix(bl31): add missing curly braces fix(console): add missing curly braces fix(arm-drivers): add missing curly braces fix(common): add missing curly braces fix(platforms): add missing curly braces
show more ...
|
| #
858dc35c |
| 25-Apr-2024 |
Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com> |
fix(el3-runtime): add missing curly braces
This corrects the MISRA violation C2012-15.6: The body of an iteration-statement or a selection-statement shall be a compound-statement. Enclosed statement
fix(el3-runtime): add missing curly braces
This corrects the MISRA violation C2012-15.6: The body of an iteration-statement or a selection-statement shall be a compound-statement. Enclosed statement body within the curly braces.
Change-Id: I14a69f79aba98e243fa29a50914431358efa2a49 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
2e0354f5 |
| 25-Feb-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes I3d950e72,Id315a8fe,Ib62e6e9b,I1d0475b2 into integration
* changes: perf(cm): drop ZCR_EL3 saving and some ISBs and replace them with root context perf(psci): get PMF timestamps wi
Merge changes I3d950e72,Id315a8fe,Ib62e6e9b,I1d0475b2 into integration
* changes: perf(cm): drop ZCR_EL3 saving and some ISBs and replace them with root context perf(psci): get PMF timestamps with no cache flushes if possible perf(amu): greatly simplify AMU context management perf(mpmm): greatly simplify MPMM enablement
show more ...
|
| #
0a580b51 |
| 15-Nov-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(cm): drop ZCR_EL3 saving and some ISBs and replace them with root context
SVE and SME aren't enabled symmetrically for all worlds, but EL3 needs to context switch them nonetheless. Previously,
perf(cm): drop ZCR_EL3 saving and some ISBs and replace them with root context
SVE and SME aren't enabled symmetrically for all worlds, but EL3 needs to context switch them nonetheless. Previously, this had to happen by writing the enable bits just before reading/writing the relevant context. But since the introduction of root context, this need not be the case. We can have these enables always be present for EL3 and save on some work (and ISBs!) on every context switch.
We can also hoist ZCR_EL3 to a never changing register, as we set its value to be identical for every world, which happens to be the one we want for EL3 too.
Change-Id: I3d950e72049a298008205ba32f230d5a5c02f8b0 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
83ec7e45 |
| 06-Nov-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(amu): greatly simplify AMU context management
The current code is incredibly resilient to updates to the spec and has worked quite well so far. However, recent implementations expose a weakness
perf(amu): greatly simplify AMU context management
The current code is incredibly resilient to updates to the spec and has worked quite well so far. However, recent implementations expose a weakness in that this is rather slow. A large part of it is written in assembly, making it opaque to the compiler for optimisations. The future proofness requires reading registers that are effectively `volatile`, making it even harder for the compiler, as well as adding lots of implicit barriers, making it hard for the microarchitecutre to optimise as well.
We can make a few assumptions, checked by a few well placed asserts, and remove a lot of this burden. For a start, at the moment there are 4 group 0 counters with static assignments. Contexting them is a trivial affair that doesn't need a loop. Similarly, there can only be up to 16 group 1 counters. Contexting them is a bit harder, but we can do with a single branch with a falling through switch. If/when both of these change, we have a pair of asserts and the feature detection mechanism to guard us against pretending that we support something we don't.
We can drop contexting of the offset registers. They are fully accessible by EL2 and as such are its responsibility to preserve on powerdown.
Another small thing we can do, is pass the core_pos into the hook. The caller already knows which core we're running on, we don't need to call this non-trivial function again.
Finally, knowing this, we don't really need the auxiliary AMUs to be described by the device tree. Linux doesn't care at the moment, and any information we need for EL3 can be neatly placed in a simple array.
All of this, combined with lifting the actual saving out of assembly, reduces the instructions to save the context from 180 to 40, including a lot fewer branches. The code is also much shorter and easier to read.
Also propagate to aarch32 so that the two don't diverge too much.
Change-Id: Ib62e6e9ba5be7fb9fb8965c8eee148d5598a5361 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
0690c237 |
| 24-Feb-2025 |
Soby Mathew <soby.mathew@arm.com> |
Merge "fix(rmm): add support for BRBCR_EL2 register for feat_brbe" into integration
|
| #
41ae0473 |
| 03-Feb-2025 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(rmm): add support for BRBCR_EL2 register for feat_brbe
Currently BRBE is being disabled for Realm world in EL3 by switching the SBRBE bit in mdcr_el3 register to 0b00. The patch removes the swit
fix(rmm): add support for BRBCR_EL2 register for feat_brbe
Currently BRBE is being disabled for Realm world in EL3 by switching the SBRBE bit in mdcr_el3 register to 0b00. The patch removes the switching of SBRBE bits, and adds context switch of BRBCR_EL2 register.
Change-Id: I66ca13edefc37e40fa265fd438b0b66f7d09b4bb Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| #
722efeaa |
| 19-Feb-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge "refactor(cpufeat): add FGT2 and Debugv8p9 to realm state" into integration
|
| #
8c52ca8c |
| 10-Dec-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
refactor(cpufeat): add FGT2 and Debugv8p9 to realm state
Enable FEAT_FGT2 and FEAT_Debugv8p9 in Realm state as well.
Change-Id: Ib9cdde3af328ffdd8718b1ba404265757f2e542b Signed-off-by: Sona Mathew
refactor(cpufeat): add FGT2 and Debugv8p9 to realm state
Enable FEAT_FGT2 and FEAT_Debugv8p9 in Realm state as well.
Change-Id: Ib9cdde3af328ffdd8718b1ba404265757f2e542b Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| #
bfecea00 |
| 03-Feb-2025 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge changes from topic "gr/errata_ICH_VMCR_EL2" into integration
* changes: fix(cpus): workaround for Neoverse-V3 erratum 3701767 fix(cpus): workaround for Neoverse-N3 erratum 3699563 fix(cp
Merge changes from topic "gr/errata_ICH_VMCR_EL2" into integration
* changes: fix(cpus): workaround for Neoverse-V3 erratum 3701767 fix(cpus): workaround for Neoverse-N3 erratum 3699563 fix(cpus): workaround for Neoverse-N2 erratum 3701773 fix(cpus): workaround for Cortex-X925 erratum 3701747 fix(cpus): workaround for Cortex-X4 erratum 3701758 fix(cpus): workaround for Cortex-X3 erratum 3701769 fix(cpus): workaround for Cortex-X2 erratum 3701772 fix(cpus): workaround for Cortex-A725 erratum 3699564 fix(cpus): workaround for Cortex-A720-AE erratum 3699562 fix(cpus): workaround for Cortex-A720 erratum 3699561 fix(cpus): workaround for Cortex-A715 erratum 3699560 fix(cpus): workaround for Cortex-A710 erratum 3701772 fix(cpus): workaround for accessing ICH_VMCR_EL2 chore(cpus): fix incorrect header macro
show more ...
|
| #
7455cd17 |
| 29-Jan-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
fix(cpus): workaround for accessing ICH_VMCR_EL2
When ICH_VMCR_EL2.VBPR1 is written in Secure state (SCR_EL3.NS==0) and then subsequently read in Non-secure state (SCR_EL3.NS==1), a wrong value migh
fix(cpus): workaround for accessing ICH_VMCR_EL2
When ICH_VMCR_EL2.VBPR1 is written in Secure state (SCR_EL3.NS==0) and then subsequently read in Non-secure state (SCR_EL3.NS==1), a wrong value might be returned. The same issue exists in the opposite way.
Adding workaround in EL3 software that performs context save/restore on a change of Security state to use a value of SCR_EL3.NS when accessing ICH_VMCR_EL2 that reflects the Security state that owns the data being saved or restored. For example, EL3 software should set SCR_EL3.NS to 1 when saving or restoring the value ICH_VMCR_EL2 for Non-secure(or Realm) state. EL3 software should clear SCR_EL3.NS to 0 when saving or restoring the value ICH_VMCR_EL2 for Secure state.
SDEN documentation: https://developer.arm.com/documentation/SDEN-1775101/latest/
Change-Id: I9f0403601c6346276e925f02eab55908b009d957 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| #
b53089d8 |
| 27-Jan-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(pmuv3): setup per world MDCR_EL3" into integration
|
| #
c95aa2eb |
| 14-Jan-2025 |
Mateusz Sulimowicz <matsul@google.com> |
feat(pmuv3): setup per world MDCR_EL3
MDCR_EL3 register will context switch across all worlds. Thus the pmuv3 init has to be part of context management initialization.
Change-Id: I10ef7a3071c0fc5c1
feat(pmuv3): setup per world MDCR_EL3
MDCR_EL3 register will context switch across all worlds. Thus the pmuv3 init has to be part of context management initialization.
Change-Id: I10ef7a3071c0fc5c11a93d3c9c2a95ec8c6493bf Signed-off-by: Mateusz Sulimowicz <matsul@google.com>
show more ...
|
| #
efe18729 |
| 15-Jan-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(mops): enable FEAT_MOPS in EL3 when INIT_UNUSED_NS_EL2=1" into integration
|
| #
6b8df7b9 |
| 09-Jan-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(mops): enable FEAT_MOPS in EL3 when INIT_UNUSED_NS_EL2=1
FEAT_MOPS, mandatory from Arm v8.8, is typically managed in EL2. However, in configurations where NS_EL2 is not enabled, EL3 must set th
feat(mops): enable FEAT_MOPS in EL3 when INIT_UNUSED_NS_EL2=1
FEAT_MOPS, mandatory from Arm v8.8, is typically managed in EL2. However, in configurations where NS_EL2 is not enabled, EL3 must set the HCRX_EL2.MSCEn bit to 1 to enable the feature.
This patch ensures FEAT_MOPS is enabled by setting HCRX_EL2.MSCEn to 1.
Change-Id: Ic4960e0cc14a44279156b79ded50de475b3b21c5 Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
show more ...
|
| #
6157ef37 |
| 09-Jan-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "bk/smccc_feature" into integration
* changes: feat(smccc): implement SMCCC_ARCH_FEATURE_AVAILABILITY refactor(cm): clean up per-world context refactor(cm): change own
Merge changes from topic "bk/smccc_feature" into integration
* changes: feat(smccc): implement SMCCC_ARCH_FEATURE_AVAILABILITY refactor(cm): clean up per-world context refactor(cm): change owning security state when a feature is disabled
show more ...
|
| #
79c0c7fa |
| 10-Dec-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cm): clean up per-world context
In preparation for SMCCC_ARCH_FEATURE_AVAILABILITY, it is useful for context to be directly related to the underlying system. Currently, certain bits like SC
refactor(cm): clean up per-world context
In preparation for SMCCC_ARCH_FEATURE_AVAILABILITY, it is useful for context to be directly related to the underlying system. Currently, certain bits like SCR_EL3.APK are always set with the understanding that they will only take effect if the feature is present.
However, that is problematic for SMCCC_ARCH_FEATURE_AVAILABILITY (an SMCCC call to report which features firmware enables), as simply reading the enable bit may contradict the ID register, like the APK bit above for a system with no Pauth present.
This patch is to clean up these cases. Add a check for PAuth's presence so that the APK bit remains unset if not present. Also move SPE and TRBE enablement to only the NS context. They already only enable the features for NS only and disable them for Secure and Realm worlds. This change only makes these worlds' context read 0 for easy bitmasking.
There's only a single snag on SPE and TRBE. Currently, their fields have the same values and any world asymmetry is handled by hardware. Since we don't want to do that, the buffers' ownership will change if we just set the fields to 0 for non-NS worlds. Doing that, however, exposes Secure state to a potential denial of service attack - a malicious NS can enable profiling and call an SMC. Then, the owning security state will change and since no SPE/TRBE registers are contexted, Secure state will start generating records. Always have NS world own the buffers to prevent this.
Finally, get rid of manage_extensions_common() as it's just a level of indirection to enable a single feature.
Change-Id: I487bd4c70ac3e2105583917a0e5499e0ee248ed9 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
7b070314 |
| 17-Dec-2024 |
André Przywara <andre.przywara@arm.com> |
Merge "fix(cm): fix context management SYSREG128 write macros" into integration
|
| #
6595f4cb |
| 13-Dec-2024 |
Igor Podgainõi <igor.podgainoi@arm.com> |
fix(cm): fix context management SYSREG128 write macros
This patch fixes a bug which was introduced in commit 3065513 related to improper saving of EL1 context in the context management library code
fix(cm): fix context management SYSREG128 write macros
This patch fixes a bug which was introduced in commit 3065513 related to improper saving of EL1 context in the context management library code when using 128-bit system registers.
Bug explanation: The function el1_sysregs_context_save still used the normal macros that read all the system registers related to the EL1 context, which then involved casting them to uint64_t and eventually writing them to a memory structure. This means that the context management library was saving EL1-related SYSREG128 registers with the upper 64 bits zeroed out.
Alternative macros had previously been introduced for the EL2 context in the aforementioned commit, but not for EL1.
Some refactoring has also been done as part of this patch: - Re-added "common" back to write_el2_ctx_common_sysreg128 - Added dummy SYSREG128 macros for cases when some features are disabled - Removed some newlines
Change-Id: I15aa2190794ac099a493e5f430220b1c81e1b558 Signed-off-by: Igor Podgainõi <igor.podgainoi@arm.com>
show more ...
|
| #
45db86e0 |
| 12-Dec-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(fpmr): disable FPMR trap" into integration
|
| #
a57e18e4 |
| 11-Nov-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(fpmr): disable FPMR trap
This patch enables support of FEAT_FPMR by enabling access to FPMR register. It achieves it by setting the EnFPM bit of SCR_EL3. This feature is currently enabled for N
feat(fpmr): disable FPMR trap
This patch enables support of FEAT_FPMR by enabling access to FPMR register. It achieves it by setting the EnFPM bit of SCR_EL3. This feature is currently enabled for NS world only.
Reference: https://developer.arm.com/documentation/109697/2024_09/ Feature-descriptions/The-Armv9-5-architecture-extension?lang=en
Change-Id: I580c409b9b22f8ead0737502280fb9093a3d5dd2 Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
show more ...
|
| #
212993ae |
| 06-Nov-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge "feat(cpufeat): add ENABLE_FEAT_LS64_ACCDATA" into integration
|