| 86822f24 | 15-May-2025 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(locks): add non-blocking spinlock_try() API
Add a non-blocking `spin_trylock()` function to the existing spinlock implementation. This API attempts to acquire the lock and returns `1` on succes
feat(locks): add non-blocking spinlock_try() API
Add a non-blocking `spin_trylock()` function to the existing spinlock implementation. This API attempts to acquire the lock and returns `1` on success or `0` if the lock is already held. It enables conditional locking scenarios where blocking is undesirable.
Change-Id: I9483206952d1a34dc245ebf69e80c3645b658946 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|
| 935e0990 | 13-Jun-2025 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge "feat(psci): add API to get number of CPUs currently in ON state" into integration |
| efc945f1 | 05-May-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(errata): implement workaround for DSU-120 erratum 2900952
DSU Erratum 2900952 is a Cat B erratum that applies to some DSU-120 implementations of revision r2p0 and is fixed in r2p1. This erratum
feat(errata): implement workaround for DSU-120 erratum 2900952
DSU Erratum 2900952 is a Cat B erratum that applies to some DSU-120 implementations of revision r2p0 and is fixed in r2p1. This erratum is fixed in certain implementations of r2p0 which can be determined by reading the IMP_CLUSTERREVIDR_EL1[1] register field where a set bit indicates that the erratum is fixed in this part.
The workaround is to set the CLUSTERACTLR_EL1 bits [21:20] to 0x3 which ignores CBusy from the system interconnect and setting CLUSTERACTLR_EL1 bit [8] to 1 to assert CBusy from DSU to all the cores when DSU is busy.
SDEN: https://developer.arm.com/documentation/SDEN-2453103/1200/?lang=en
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I87aa440ab5c35121aff703032f5cf7a62d0b0bb4
show more ...
|
| a7be2a57 | 29-May-2025 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(psci): add API to get number of CPUs currently in ON state
Introduce a new PSCI helper function `psci_num_cpus_running_on_safe()` to return the number of CPUs that are currently in the ON state
feat(psci): add API to get number of CPUs currently in ON state
Introduce a new PSCI helper function `psci_num_cpus_running_on_safe()` to return the number of CPUs that are currently in the ON state. This API locks the PSCI power state data to ensure consistency and is safe to call in concurrent environments.
This utility can assist components that need to reason about system CPU activity or coordinate operations based on active CPUs.
Change-Id: Ie15aa4bd393a5f01e7cd80ae8a9b28707fde7c53 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|
| f23d26d7 | 16-Apr-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(libc): add the memcpy declaration back
Patch 34d7f196b moved definitions to a new file but missed that of memcpy. Put it back.
Change-Id: I5e9797e611e6f1f97232f03de98f81db86a66c2a Signed-off-by
fix(libc): add the memcpy declaration back
Patch 34d7f196b moved definitions to a new file but missed that of memcpy. Put it back.
Change-Id: I5e9797e611e6f1f97232f03de98f81db86a66c2a Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 4467348b | 09-Jun-2025 |
John Powell <john.powell@arm.com> |
fix(cpus): workaround for Cortex-A710 erratum 1901946
Cortex-A710 erratum 1901946 is a Cat B erratum that applies to revision r1p0 and is fixed in r2p0.
The workaround is to set CPUACTLR4_EL1[15].
fix(cpus): workaround for Cortex-A710 erratum 1901946
Cortex-A710 erratum 1901946 is a Cat B erratum that applies to revision r1p0 and is fixed in r2p0.
The workaround is to set CPUACTLR4_EL1[15]. This has a slight performance impact.
SDEN documentation: https://developer.arm.com/documentation/SDEN1775101
Change-Id: I703f0e6ee122e44a9bc284d90f1465039e3b40e4 Signed-off-by: John Powell <john.powell@arm.com>
show more ...
|
| 1e41ad67 | 09-Jun-2025 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge "fix(errata): keep leading zeros in CVE ID prints" into integration |
| 91091434 | 05-Jun-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge "feat(cpus): update cpu_check_csv2 check" into integration |
| 2b432165 | 02-Jun-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(cpus): update cpu_check_csv2 check
Update the cpu_check_csv2 logic to allow ID_AA64PFR0_EL1.CSV2 values up to 3. With the introduction of FEAT_CSV2_3, the architectural limit for CSV2 has been
feat(cpus): update cpu_check_csv2 check
Update the cpu_check_csv2 logic to allow ID_AA64PFR0_EL1.CSV2 values up to 3. With the introduction of FEAT_CSV2_3, the architectural limit for CSV2 has been extended, making values from 0 to 3 valid.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I8473047ed4ad759b7b506161a76774ac21555d31
show more ...
|
| 00669dcd | 14-May-2025 |
Andrei Stefanescu <andrei.stefanescu@nxp.com> |
fix(xlat): change MT_DEVICE to map to nGnRnE
Previously, MT_DEVICE memory was mapped to nGnRE instead of nGnRnE. This could cause issues if a platform with USE_COHERENT_MEM=1 mapped the coherent mem
fix(xlat): change MT_DEVICE to map to nGnRnE
Previously, MT_DEVICE memory was mapped to nGnRE instead of nGnRnE. This could cause issues if a platform with USE_COHERENT_MEM=1 mapped the coherent memory region as MT_DEVICE. A core with stage 1 translation enabled would access the region with the attributes nGnRE and a core with stage 1 disabled would access the region with attributes nGnRnE.
This would result in accesses to a memory location with mismatched memory attributes.
This commit changes MT_DEVICE to nGnRnE. This shouldn't introduce any issues as nGnRnE has stronger ordering requirements.
Change-Id: Idf2e0bbea3ddb5e469a72a41f5fdb71c030d54b8 Signed-off-by: Andrei Stefanescu <andrei.stefanescu@nxp.com>
show more ...
|
| d1ed0c3d | 07-Apr-2025 |
John Powell <john.powell@arm.com> |
fix(errata): keep leading zeros in CVE ID prints
The errata printing function would drop leading zeros on CVE numbers so this updates the format string to make sure they are printed. This is to conf
fix(errata): keep leading zeros in CVE ID prints
The errata printing function would drop leading zeros on CVE numbers so this updates the format string to make sure they are printed. This is to conform to the CVE naming convention where ID numbers of less than 4 digits are prepended with 0s up to 4 digits.
This also updates a confusing comment indicating that leading zeros could be used to work around a potential issue if CVE and erratum IDs clash. Values with leading zeros will be interpreted as octal numbers which is not desirable behavior so this should not be recommended. Realistically, a CVE ID and erratum ID being the same is *extremely* unlikely since CVE ID start over each year and are 4-5 digits for Arm, and Errata IDs are 6-7 digits.
Change-Id: Idf2be50cea6828a3d30c6e58fda477ec1398bc7c Signed-off-by: John Powell <john.powell@arm.com>
show more ...
|
| 169ea2ce | 29-Apr-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes I0b0443d5,Ic454a87a into integration
* changes: fix(gic): quote the correct flag on error feat(lib): add a generic EXTRACT macro |
| f963578b | 05-Feb-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(lib): add a generic EXTRACT macro
The EXTRACT macro is useful to extract a named field from a numeric value, usually a register. It is functionally identical to the `ubfx` instruction and uses
feat(lib): add a generic EXTRACT macro
The EXTRACT macro is useful to extract a named field from a numeric value, usually a register. It is functionally identical to the `ubfx` instruction and uses the same #defines (REG_FIELD_SHIFT and REG_FIELD_WIDTH).
This is the same macro that we use in tftf. It works well there and is quite useful for manipulating register fields concisely.
This macro replaces the EXTRACT_FIELD macro. Their function is identical, however, EXTRACT allows for easier interoperation with the `ubfx` instruction, makes code more similar to tftf, and is more concise.
Change-Id: Ic454a87af5e5fac108c7b7cb6b6804ec65a8d0e8 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| b1e1f42e | 25-Apr-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge changes I005586ef,I0d4d74bc into integration
* changes: fix(cpufeat): replace "bti" mnemonic with hint instructions fix(cpufeat): improve xpaci wrapper |
| bdac600b | 15-Apr-2025 |
Andre Przywara <andre.przywara@arm.com> |
fix(cpufeat): replace "bti" mnemonic with hint instructions
Older GNU binutils version require to specify at least "armv8.5-a" for the ARM architecture revision to accept "bti" instructions in the a
fix(cpufeat): replace "bti" mnemonic with hint instructions
Older GNU binutils version require to specify at least "armv8.5-a" for the ARM architecture revision to accept "bti" instructions in the assembly code. Binutils v2.35 have relaxed this, since "bti" is in the hint space, so is ignored on older cores and does NOT require a BTI enabled core to execute.
To not exclude those older binutils versions (as shipped with Ubuntu 20.04), use the "hint" encoding for the "bti" instructions, which are accepted regardless of the minimum architecture revision. Hide this encoding in a macro, to make the "bti" usage more readable in the source code.
Change-Id: I005586efd8974a3f2c7202896c881bb5fed07eea Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| fd04156e | 04-Apr-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
refactor(cpus): optimize CVE checking
This patch replaces the use of EXTRA functions with using erratum entries check to verify CVE mitigation application for some of the SMCCC_ARCH_WORKAROUND_* cal
refactor(cpus): optimize CVE checking
This patch replaces the use of EXTRA functions with using erratum entries check to verify CVE mitigation application for some of the SMCCC_ARCH_WORKAROUND_* calls.
Previously, EXTRA functions were individually implemented for each SMCCC_ARCH_WORKAROUND_*, an approach that becomes unmanageable with the increasing number of workarounds. By looking up erratum entries for CVE check, the process is streamlined, reducing overhead associated with creating and maintaining EXTRA functions for each new workaround.
New Errata entries are created for SMC workarounds and that is used to target cpus that are uniquely impacted by SMC workarounds.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I873534e367a35c99461d0a616ff7bf856a0000af
show more ...
|
| 5a1b666d | 10-Apr-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
refactor(cpus): move errata check to common code
This patch centralizes some of the Errata ABI code that could be used for checking if an Errata has been applied to cpu library since the function is
refactor(cpus): move errata check to common code
This patch centralizes some of the Errata ABI code that could be used for checking if an Errata has been applied to cpu library since the function is mostly generic.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I2c6d4468f7125d4d99ccdebc5ea8f9e4390360cc
show more ...
|
| ee656609 | 16-Apr-2025 |
André Przywara <andre.przywara@arm.com> |
Merge changes Id942c20c,Idd286bea,I8917a26e,Iec8c3477,If3c25dcd, ... into integration
* changes: feat(cpufeat): enable FEAT_PAuth to FEAT_STATE_CHECKED perf(cpufeat): centralise PAuth key saving
Merge changes Id942c20c,Idd286bea,I8917a26e,Iec8c3477,If3c25dcd, ... into integration
* changes: feat(cpufeat): enable FEAT_PAuth to FEAT_STATE_CHECKED perf(cpufeat): centralise PAuth key saving refactor(cpufeat): convert FEAT_PAuth setup to C refactor(cpufeat): prepare FEAT_PAuth for FEATURE_DETECTION chore(cpufeat): remove PAuth presence checks feat(cpufeat): enable FEAT_BTI to FEAT_STATE_CHECKED
show more ...
|
| f8138056 | 02-Apr-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpufeat): convert FEAT_PAuth setup to C
An oversimplified view of FEAT_PAuth is that it's a symmetric encryption of the LR. PAC instructions execute as NOPs until explicitly turned on. So i
refactor(cpufeat): convert FEAT_PAuth setup to C
An oversimplified view of FEAT_PAuth is that it's a symmetric encryption of the LR. PAC instructions execute as NOPs until explicitly turned on. So in a function that turns PAuth on, the signing would have executed as a NOP and the authentication will encrypt the address, leading to a failure. That's why enablement is in assembly - we have full control of when pointer authentications happen.
However, assembly is hard to read, is opaque to the compiler for optimisations, and we need to call into C anyway for the platform hook to get the key. So convert it to C. We can instruct the compiler to not generate branch protection for the enable function only and as long as the caller doesn't do branch protection (and all callers are entrypoints written in assembly) everything will work.
Change-Id: I8917a26e1293033c910e3058664e3ca9207359b7 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 31ddca40 | 14-Apr-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge "feat(psci): remove cpu context init by index" into integration |
| 10ecd580 | 26-Mar-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(cpufeat): enable FEAT_BTI to FEAT_STATE_CHECKED
Introduce the is_feat_bti_{supported, present}() helpers and replace checks for ENABLE_BTI with it. Also factor out the setting of SCTLR_EL3.BT o
feat(cpufeat): enable FEAT_BTI to FEAT_STATE_CHECKED
Introduce the is_feat_bti_{supported, present}() helpers and replace checks for ENABLE_BTI with it. Also factor out the setting of SCTLR_EL3.BT out of the PAuth enablement and place it in the respective entrypoints where we initialise SCTLR_EL3. This makes PAuth self-contained and SCTLR_EL3 initialisation centralised.
Change-Id: I0c0657ff1e78a9652cd2cf1603478283dc01f17b Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 25002a00 | 11-Apr-2025 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge "perf(libc): use builtin implementations where possible" into integration |
| ef738d19 | 21-Jun-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(psci): remove cpu context init by index
Currently, the calling core (meaning the core which received the call to CPU_ON or the powerdown path of CPU_SUSPEND on the same core) is in charge of in
feat(psci): remove cpu context init by index
Currently, the calling core (meaning the core which received the call to CPU_ON or the powerdown path of CPU_SUSPEND on the same core) is in charge of initialising the context for the waking core (the warmboot entrypoint for both). This is convenient because the calling core can write the context while in coherency and the waking core will only need the context after its entered coherency. This avoids any cache maintenance and makes communication simple.
However, this has 3 main problems: a) asymmetric feature support is problematic - the calling core has no way of knowing the feature set of the waking core. If the two diverge, the architectural feature discovery via ID registers breaks down. We've thus far "fixed" this on a case by case basis which doesn't scale and introduces redundancy.
b) powerdown abandon (pabandon) introduces a contradiction - the calling core has to initialise the context for when the core wakes up, but should the core not powerdown it needs its old context intact. The only way to work around this is by keeping two copies of context which incurs a runtime and memory overhead.
c) cm_prepare_el3_exit[_ns]() doesn't have access to the entrypoint but needs it to make initialisation decisions. We can infer some of this from registers that have already been written but this is awkwardly limiting for what we can do. This also necessitates the split from the context initialisation.
We can solve all three by a making a core be in full ownership of its own context. The calling core then only writes entrypoint information and nothing else. The waking core then initialises its own context as it sees fit with full knowledge of the whole picture.
The only tricky bit is cache coherency - the waking core has to be able to coherently observe its new entrypoint. Calling cores will write to the shared region with coherent caches on. If we make sure to read the context only after the waking core has entered coherency, then we can avoid cache operations and let hardware handle everything.
We can skip the spsr check for FEAT_TCR2 as it doesn't make a difference. We can also skip enabling it twice from generic code.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I86e7fe8b698191fc3b469e5ced1fd010f8754b0e
show more ...
|
| e3108fad | 10-Apr-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "lto-by-default" into integration
* changes: fix(libc): make sure __init functions are garbage collected fix(platforms): remove platform_core_pos_helper() |
| 23302d4a | 08-Apr-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(xlat): remove xlat_mpu
The only platform to use this is fvp_r. As this platform is now gone, so is the need for this library. Support for it never went out of "experimental" so it does not appea
fix(xlat): remove xlat_mpu
The only platform to use this is fvp_r. As this platform is now gone, so is the need for this library. Support for it never went out of "experimental" so it does not appear to be finished.
Change-Id: I76499b92ca4368651330f17dc80803991158cc36 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|