| 7724f91e | 19-Dec-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(psci): make CMOs target the whole psci_cpu_data_t
psci_cpu_data_t is tiny - on AArch64 it's 12 bytes. Cache maintenance operations (CMOs) operate on cache lines which are much bigger - usua
refactor(psci): make CMOs target the whole psci_cpu_data_t
psci_cpu_data_t is tiny - on AArch64 it's 12 bytes. Cache maintenance operations (CMOs) operate on cache lines which are much bigger - usually 64 bytes long. As such, issuing a cache clean for a member in the middle of psci_cpu_data_t won't necessarily have the expected effect. The member will be cleaned, sure, but so will the rest of the cache line along with it. If the struct happens to straddle cache lines this will lead to the next 52 bytes, most of which not belonging to psci_cpu_data_t, being cleaned as well and the start of psci_cpu_data_t not being cleaned at all.
This is not a problem because of the per-cpu (and cpu_data before it) section - it is cache size aligned and all data within a single section belongs to the same core so overdoing cache cleans won't have strange side effects.
Regardless, this patch clarifies CMOs around psci_cpu_data_t by always targeting the whole structure. To make sure there is never a situation where it straddles cache lines and this causes weird side effect, its alignment is set to the size of the structure to make sure it is always on the same cache line.
Change-Id: I5d82ee6bb2ce0ed3c6a7e4abb7aa890f5e3bd0af Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| f396aec8 | 09-Sep-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(cpufeat): add support for FEAT_IDTE3
This patch adds support for FEAT_IDTE3, which introduces support for handling the trapping of Group 3 and Group 5 (only GMID_EL1) registers to EL3 (unless t
feat(cpufeat): add support for FEAT_IDTE3
This patch adds support for FEAT_IDTE3, which introduces support for handling the trapping of Group 3 and Group 5 (only GMID_EL1) registers to EL3 (unless trapped to EL2). IDTE3 allows EL3 to modify the view of ID registers for lower ELs, and this capability is used to disable fields of ID registers tied to disabled features.
The ID registers are initially read as-is and stored in context. Then, based on the feature enablement status for each world, if a particular feature is disabled, its corresponding field in the cached ID register is set to Res0. When lower ELs attempt to read an ID register, the cached ID register value is returned. This allows EL3 to prevent lower ELs from accessing feature-specific system registers that are disabled in EL3, even though the hardware implements them.
The emulated ID register values are stored primarily in per-world context, except for certain debug-related ID registers such as ID_AA64DFR0_EL1 and ID_AA64DFR1_EL1, which are stored in the cpu_data and are unique to each PE. This is done to support feature asymmetry that is commonly seen in debug features.
FEAT_IDTE3 traps all Group 3 ID registers in the range op0 == 3, op1 == 0, CRn == 0, CRm == {2–7}, op2 == {0–7} and the Group 5 GMID_EL1 register. However, only a handful of ID registers contain fields used to detect features enabled in EL3. Hence, we only cache those ID registers, while the rest are transparently returned as is to the lower EL.
This patch updates the CREATE_FEATURE_FUNCS macro to generate update_feat_xyz_idreg_field() functions that disable ID register fields on a per-feature basis. The enabled_worlds scope is used to disable ID register fields for security states where the feature is not enabled.
This EXPERIMENTAL feature is controlled by the ENABLE_FEAT_IDTE3 build flag and is currently disabled by default.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I5f998eeab81bb48c7595addc5595313a9ebb96d5
show more ...
|
| 6d2d846f | 04-Jul-2025 |
Sammit Joshi <sammit.joshi@arm.com> |
feat(per-cpu): migrate psci_ns_context to per-cpu framework
migrate psci_ns_context object to the NUMA-aware per-cpu framework to optimize memory access and to efficiently utilize memory.
Signed-of
feat(per-cpu): migrate psci_ns_context to per-cpu framework
migrate psci_ns_context object to the NUMA-aware per-cpu framework to optimize memory access and to efficiently utilize memory.
Signed-off-by: Sammit Joshi <sammit.joshi@arm.com> Change-Id: Ie8b9f4eea8c61d4de9996d9370634cbd08ff1d8d
show more ...
|
| a9eb44d4 | 18-Apr-2024 |
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com> |
fix(psci): initialise variable to default zero
This corrects the MISRA violation C2012-9.1: The value of an object with automatic storage duration shall not be read before it has been set. Initializ
fix(psci): initialise variable to default zero
This corrects the MISRA violation C2012-9.1: The value of an object with automatic storage duration shall not be read before it has been set. Initialized the variable to default value zero.
Change-Id: I225ae4487b05fc47728222765029d6e1fe292ac1 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| fd914fc8 | 30-Jun-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(psci): optimise clock init on a pabandon
When a powerdown abandon happens, all state will be preserved. As such, there is no need to re-initialise the timer counter when unwinding.
Change-Id:
feat(psci): optimise clock init on a pabandon
When a powerdown abandon happens, all state will be preserved. As such, there is no need to re-initialise the timer counter when unwinding.
Change-Id: I64185792a118fd04ca036abbb9be8f670d0d8328 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|