| 6d5319af | 17-Jun-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
feat(simd): add routines to save, restore sve state
This adds assembly routines to save and restore SVE registers. In order to share between FPU and SVE the code to save and restore FPCR and FPSR, t
feat(simd): add routines to save, restore sve state
This adds assembly routines to save and restore SVE registers. In order to share between FPU and SVE the code to save and restore FPCR and FPSR, the patch converts code for those registers into macro. Since we will be using simd_ctx_t to save and restore FPU also, we use offsets in simd_ctx_t for FPSR and FPCR. Since simd_ctx_t has the same structure at the beginning as fp_regs_t, those offsets should be the same as CTX_FP_* offsets, when SVE is not enabled. Note that the code also saves and restores FPEXC32 reg along with FPSR and FPCR.
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com> Signed-off-by: Okash Khawaja <okash@google.com> Change-Id: I120c02359794aa6bb6376a464a9afe98bd84ae60
show more ...
|
| 553b70c3 | 19-Aug-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "ar/asymmetricSupport" into integration
* changes: feat(tc): enable trbe errata flags for Cortex-A520 and X4 feat(cm): asymmetric feature support for trbe refactor(err
Merge changes from topic "ar/asymmetricSupport" into integration
* changes: feat(tc): enable trbe errata flags for Cortex-A520 and X4 feat(cm): asymmetric feature support for trbe refactor(errata-abi): move EXTRACT_PARTNUM to arch.h feat(cpus): workaround for Cortex-A520(2938996) and Cortex-X4(2726228) feat(tc): make SPE feature asymmetric feat(cm): handle asymmetry for SPE feature feat(cm): support for asymmetric feature among cores feat(cpufeat): add new feature state for asymmetric features
show more ...
|
| 721249b0 | 05-Aug-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(cm): asymmetric feature support for trbe
This patch checks if the Errata 2938996(Cortex-A520) , 2726228(Cortex-X4) applies to cores and if affected applies the errata workaround which disables
feat(cm): asymmetric feature support for trbe
This patch checks if the Errata 2938996(Cortex-A520) , 2726228(Cortex-X4) applies to cores and if affected applies the errata workaround which disables TRBE.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I53b037839820c8b3a869f393588302a365d5b97c
show more ...
|
| 4a97ff51 | 05-Aug-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(cpus): workaround for Cortex-A520(2938996) and Cortex-X4(2726228)
This patch implements errata functions for two errata, both of them disable TRBE as a workaround. This patch doesn't have funct
feat(cpus): workaround for Cortex-A520(2938996) and Cortex-X4(2726228)
This patch implements errata functions for two errata, both of them disable TRBE as a workaround. This patch doesn't have functions that disable TRBE but only implemented helper functions that are used to detect cores affected by Errata 2938996(Cortex-A520) & 2726228(Cortex-X4)
Cortex-X4 SDEN documentation: https://developer.arm.com/documentation/SDEN2432808/latest
Cortex-A520 SDEN Documentation: https://developer.arm.com/documentation/SDEN-2444153/latest
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I8f886a1c21698f546a0996c719cc27dc0a23633a
show more ...
|
| 188f8c4b | 18-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(cm): handle asymmetry for SPE feature
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. SPE is one of the features which can be asymmetric across cores.
feat(cm): handle asymmetry for SPE feature
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. SPE is one of the features which can be asymmetric across cores.
Add a function to handle this asymmetry by re-visting the feature presence on running core. There are two possible cases: - If the primary has the feature and secondary does not have it then, the feature needs to be disabled. - If the primary does not have the feature and secondary has it then, the feature need to be enabled
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ibb2b88b5ef63b3efcb80801898ae8d8967e5c271
show more ...
|
| 2f41c9a7 | 12-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(cm): support for asymmetric feature among cores
TF-A assumes that all the cores in a platform has architecture feature parity, this is evident by the fact that primary sets up the Non-secure co
feat(cm): support for asymmetric feature among cores
TF-A assumes that all the cores in a platform has architecture feature parity, this is evident by the fact that primary sets up the Non-secure context of secondary cores.
With changing landscape of platforms (e.g. big/little/mid cores), we are seeing more and more platforms which has feature asymmetry among cores. There is also a scenario where certain CPU erratum only applies to one type of cores and requires a feature to be disabled even it supports the feature.
To handle these scenarios, introduce a hook in warmboot path which would be called on the running CPU to override any feature disparity in the NS context stashed up by primary. Note that, re-checking of feature for Secure/Realm context is not required as the context is created on running core itself.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I5a01dbda528fa8481a00fdd098b58a7463ed0e22
show more ...
|
| 43d1d951 | 18-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(cpufeat): add new feature state for asymmetric features
Introduce a new feature state CHECK_ASYMMETRIC to cater for the features which are asymmetric across cores. This state is useful for plat
feat(cpufeat): add new feature state for asymmetric features
Introduce a new feature state CHECK_ASYMMETRIC to cater for the features which are asymmetric across cores. This state is useful for platforms which has architectural asymmetric cores (A feature is only present in one type of core e.g. big). This state is similar to FEAT_STATE_CHECK (dynamic detection) except that feature state is also checked on each core during warmboot path and override the context (just for asymmetric features) which was setup by core executing CPU_ON call.
Only Non-secure context will be re-checked as secure and realm context is created on same core.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ic78a0b6ca996e0d7881c43da1a6a0c422f528ef3
show more ...
|
| 2d4f264b | 17-Aug-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "romlib-fixes" into integration
* changes: fix(romlib): wrap indirectly included functions fix(arm): remove duplicate jumptable entry |
| abeb8ad6 | 16-Aug-2024 |
Mark Dykes <mark.dykes@arm.com> |
Merge "fix(cpus): workaround for Cortex-A720 erratum 2844092" into integration |
| 28e4ec1b | 16-Aug-2024 |
Mark Dykes <mark.dykes@arm.com> |
Merge "fix(cpus): workaround for Cortex-X4 erratum 2816013" into integration |
| d95d56bd | 22-Jul-2024 |
Jimmy Brisson <jimmy.brisson@arm.com> |
fix(romlib): wrap indirectly included functions
The problem that this resolves is a bit involved; the following must be met at the same time for some function <to_be_wrapped>:
* to_be_wrapped must
fix(romlib): wrap indirectly included functions
The problem that this resolves is a bit involved; the following must be met at the same time for some function <to_be_wrapped>:
* to_be_wrapped must be specified as part of the romlib * to_be_wrapped must _not_ be referenced by any translation unit in TF-A * to_be_wrapped must be referenced by a translation unit in a dependent library, mbedtls for example.
Under these circumstances, to_be_wrapped will not be wrapped, and will instead reference its original definition while simultaneously residing in romlib.
This is a side effect of two issues with romlib prior to this patch:
1 to_be_wrapped is expected to wrap by duplicating its definition. This causes any condition that links against both the base and wrapper functions to be a link error (duplicate symbol definition). 2 to_be_wrapped is in its own translation unit This causes the wrappers to be used by TF-A in an as needed.
The duplicate function definitions can be worked around using the linker's `--wrap` flag, which redirects all references to a symbol to resolve to `__wrap_<symbol>` and the original symbol to be available as `__real_<symbol>`. Most of the changes handle creating this arguments and passing them to the linker.
Further, once you use the linker's wrap, you will encounter another issue: if TF-A does not use a function, its wrapper is not present. This causes link issues when a library and not TF-A uses the wrapper. Note that this issue would have been resolved previously by ignoring the wrapper and using the base definition.
This further issue is worked around by concatenating the assembly for all of the wrappers into a single translation unit. It's possible to work around this issue in a few other ways, including reordering the libraries passed to the linker to place libwrapper.a last or grouping the libraries so that symbols from later libraries may be resolved with prior libraries.
I chose the translation unit concatenation approach as it revealed that a jumptable has duplicate symbols within it.
Change-Id: Ie57b5ae69bde2fc8705bdc7a93fae3ddb5341ed9 Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
show more ...
|
| 01959a16 | 17-Oct-2023 |
Charlie Bareham <charlie.bareham@arm.com> |
fix(psci): fix parent parsing in psci_is_last_cpu_to_idle_at_pwrlvl
The function always checks the first parent of the current core instead parse the tree topology to find the parent at parent level
fix(psci): fix parent parsing in psci_is_last_cpu_to_idle_at_pwrlvl
The function always checks the first parent of the current core instead parse the tree topology to find the parent at parent level of the CPU. It is because the current loop has no effect as it uses a fixed parameter 'my_idx' and returns the FIRST parent of CPU. Also, it looks for the parent nodes in the array of CPU nodes, but actually they are in a separate array.
This update allows to parse the PSCI topology tree to find the parent at parent level of the CPU identified by my_idx.
Fixes: 606b7430077c ("feat(psci): add support for OS-initiated mode") Change-Id: I96fb5ecc154a76b16adca5b5055217b8626c9e66 Signed-off-by: Charlie Bareham <charlie.bareham@arm.com>
show more ...
|
| 1baf6246 | 05-Aug-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "ar/asymmetricSupport" into integration
* changes: feat(trbe): introduce trbe_disable() function feat(spe): introduce spe_disable() function chore(spe): rename spe_dis
Merge changes from topic "ar/asymmetricSupport" into integration
* changes: feat(trbe): introduce trbe_disable() function feat(spe): introduce spe_disable() function chore(spe): rename spe_disable() to spe_stop()
show more ...
|
| 12140908 | 19-Jul-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for Cortex-A720 erratum 2844092
Cortex-A720 erratum 2844092 is a Cat B erratum that is present in revisions r0p0, r0p1 and is fixed in r0p2.
The workaround is to set bit[11] o
fix(cpus): workaround for Cortex-A720 erratum 2844092
Cortex-A720 erratum 2844092 is a Cat B erratum that is present in revisions r0p0, r0p1 and is fixed in r0p2.
The workaround is to set bit[11] of CPUACTLR4_EL1 register.
SDEN documentation: https://developer.arm.com/documentation/SDEN-2439421/latest
Change-Id: I3d8eacb26cba42774f1f31c3aae2a0e6fecec614 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 1e4480bb | 16-Jul-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for Cortex-X4 erratum 2816013
Cortex-X4 erratum 2816013 is a Cat B erratum that applies to all revisions <= r0p1 and is fixed in r0p2. This erratum is only present when memory
fix(cpus): workaround for Cortex-X4 erratum 2816013
Cortex-X4 erratum 2816013 is a Cat B erratum that applies to all revisions <= r0p1 and is fixed in r0p2. This erratum is only present when memory tagging is enabled.
The workaround is to set CPUACTLR5_EL1[14] to 1.
SDEN documentation: https://developer.arm.com/documentation/SDEN-2432808/latest
Change-Id: I546044bde6e5eedd0abf61643d25e2dd2036df5c Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| b36e975e | 19-Jul-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(trbe): introduce trbe_disable() function
This patch adds trbe_disable() which disables Trace buffer access from lower ELs in all security state. This function makes Secure state the owner of Tr
feat(trbe): introduce trbe_disable() function
This patch adds trbe_disable() which disables Trace buffer access from lower ELs in all security state. This function makes Secure state the owner of Trace buffer and access from EL2/EL1 generate trap exceptions to EL3.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: If3e3bd621684b3c28f44c3ed2fe3df30b143f8cd
show more ...
|
| 651fe507 | 18-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(spe): introduce spe_disable() function
Introduce a function to disable SPE feature for Non-secure state and do the default setting of making Secure state the owner of profiling buffers and trap
feat(spe): introduce spe_disable() function
Introduce a function to disable SPE feature for Non-secure state and do the default setting of making Secure state the owner of profiling buffers and trap access of profiling and profiling buffer control registers from lower ELs to EL3.
This functionality is required to handle asymmetric cores where SPE has to disabled at runtime.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I2f99e922e8df06bfc900c153137aef7c9dcfd759
show more ...
|
| 4de07b4b | 18-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
chore(spe): rename spe_disable() to spe_stop()
During CPU power down, we stop the profiling by calling spe_disable() function. From TF-A point of view, enable/disable means the avaibility of the fea
chore(spe): rename spe_disable() to spe_stop()
During CPU power down, we stop the profiling by calling spe_disable() function. From TF-A point of view, enable/disable means the avaibility of the feature for lower EL. In this case we are not actully disabling the feautre but stoping it before power down.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I6e3b39c5c35d330c51e7ac715446a8b36bf9531f
show more ...
|
| 4bcf5b84 | 29-Jul-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "jc/refact_el1_ctx" into integration
* changes: refactor(cm): convert el1-ctx assembly offset entries to c structure feat(cm): add explicit context entries for ERRATA_SP
Merge changes from topic "jc/refact_el1_ctx" into integration
* changes: refactor(cm): convert el1-ctx assembly offset entries to c structure feat(cm): add explicit context entries for ERRATA_SPECULATIVE_AT
show more ...
|
| 0195bac1 | 29-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "build: consolidate directory creation rules" into integration |
| 42e35d2f | 11-Apr-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(cm): convert el1-ctx assembly offset entries to c structure
Currently the EL1 part of the context structure (el1_sysregs_t), is coupled with feature flags reducing the context memory alloca
refactor(cm): convert el1-ctx assembly offset entries to c structure
Currently the EL1 part of the context structure (el1_sysregs_t), is coupled with feature flags reducing the context memory allocation for platforms, that don't enable/support all the architectural features at once.
Similar to the el2 context optimization commit-"d6af234" this patch further improves this section by converting the assembly context-offset entries into a c structure. It relies on garbage collection of the linker removing unreferenced structures from memory, as well as aiding in readability and future maintenance. Additionally, it eliminates the #ifs usage in 'context_mgmt.c' source file.
Change-Id: If6075931cec994bc89231241337eccc7042c5ede Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 59b7c0a0 | 05-Jun-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(cm): add explicit context entries for ERRATA_SPECULATIVE_AT
* Currently, "ERRATA_SPECUALTIVE_AT" errata is enabled by default for few cores and they need context entries for saving and rest
feat(cm): add explicit context entries for ERRATA_SPECULATIVE_AT
* Currently, "ERRATA_SPECUALTIVE_AT" errata is enabled by default for few cores and they need context entries for saving and restoring EL1 regs "SCTLR_EL1 and TCR_EL1" registers at all times.
* This prevents the mechanism of decoupling EL1 and EL2 registers, as EL3 firmware shouldn't be handling both simultaneously.
* Depending on the build configuration either EL1 or EL2 context structures need to included, which would result in saving a good amount of context memory.
* In order to achieve this it's essential to have explicit context entries for registers supporting "ERRATA_SPECULATIVE_AT".
* This patch adds two context entries under "errata_speculative_at" structure to assist this errata and thereby allows decoupling EL1 and EL2 context structures.
Change-Id: Ia50626eea8fb64899a2e2d81622adbe07fe77d65 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 3fb52e41 | 14-May-2024 |
Ryan Everett <ryan.everett@arm.com> |
refactor(cpus): remove cpu specific errata funcs
Errata printing is done directly via generic_errata_report. This commit removes the unused \_cpu\()_errata_report functions for all cores, and remove
refactor(cpus): remove cpu specific errata funcs
Errata printing is done directly via generic_errata_report. This commit removes the unused \_cpu\()_errata_report functions for all cores, and removes errata_func from cpu_ops.
Change-Id: I04fefbde5f0ff63b1f1cd17c864557a14070d68c Signed-off-by: Ryan Everett <ryan.everett@arm.com>
show more ...
|
| 1c20f05c | 10-May-2024 |
Ryan Everett <ryan.everett@arm.com> |
refactor(cpus): directly invoke errata reporter
In all non-trivial cases the CPU specific errata functions already call generic_errata_report, this cuts out the middleman by directly calling generic
refactor(cpus): directly invoke errata reporter
In all non-trivial cases the CPU specific errata functions already call generic_errata_report, this cuts out the middleman by directly calling generic_errata_report from print_errata_status.
The CPU specific errata functions (cpu_ops->errata_func) can now be removed from all cores, and this field can be removed from cpu_ops.
Also removes the now unused old errata reporting function and macros.
Change-Id: Ie4a4fd60429aca37cf434e79c0ce2992a5ff5d68 Signed-off-by: Ryan Everett <ryan.everett@arm.com>
show more ...
|
| a3939b1b | 24-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(handoff): fix register convention r1/x1 value on transfer list" into integration |