| 416b8613 | 05-Mar-2025 |
John Powell <john.powell@arm.com> |
fix(security): add workaround for CVE-2025-0647
This workaround fixes an issue with the CPP RCTX instruction by issuing an instruction patch sequence to trap uses of the CPP RCTX instruction from EL
fix(security): add workaround for CVE-2025-0647
This workaround fixes an issue with the CPP RCTX instruction by issuing an instruction patch sequence to trap uses of the CPP RCTX instruction from EL0, EL1, and EL2 to EL3 and perform a workaround procedure using the implementation defined trap handler to ensure the correct behavior of the system. In addition, it includes an EL3 API to be used if EL3 firmware needs to use the CPP RCTX instruction. This saves the overhead of exception handling, and EL3 does not generically support trapping EL3->EL3, and adding support for that is not trivial due to the implications for context management.
The issue affects the following CPUs:
C1-Premium C1-Ultra Cortex-A710 Cortex-X2 Cortex-X3 Cortex-X4 Cortex-X925 Neoverse N2 Neoverse V2 Neoverse V3 Neoverse V3AE (handled same as V3 CPU in TF-A CPU-Lib)
Arm Security Bulletin Document: https://developer.arm.com/documentation/111546
Change-Id: I5e7589afbeb69ebb79c01bec80e29f572aff3d89 Signed-off-by: John Powell <john.powell@arm.com> Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 553c24c3 | 07-Jul-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED again
FEAT_RAS was originally converted to FEAT_STATE_CHECKED in 6503ff291. However, the ability to use it was removed with 970a4a8d8 by simply
feat(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED again
FEAT_RAS was originally converted to FEAT_STATE_CHECKED in 6503ff291. However, the ability to use it was removed with 970a4a8d8 by simply saying it impacts execution at EL3. That's true, but FEAT_STATE_CHECKED can still be allowed by being a bit clever about it.
First, the remainder of common code can be converted to use the is_feat_ras_supported() helper instead of the `#if FEATURE` pattern. There are no corner cases to consider there. The feature is either present (and appropriate action must be taken) or the feature is not (so we can skip RAS code).
A conscious choice is taken to check the RAS code in synchronize_errors despite it being in a hot path. Any fixed platform that seeks to be performant should be setting features to 0 or 1. Then, the SCTLR_EL3.IESB bit is always set if ENABLE_FEAT_RAS != 0 since we expect FEAT_IESB to be present if FEAT_RAS is (despite the architecture not guaranteeing it). If FEAT_RAS isn't present then we don't particularly care about the status of FEAT_IESB.
Second, platforms that don't set ENABLE_FEAT_RAS must continue to work. This is true out of the box with the is_feat_xyz_supported() helpers, as they make sure to fully disable code within them.
Third, platforms that do set ENABLE_FEAT_RAS=1 must continue to work. This is also true out of the box and no logical change is undertaken in common code.
Finally, ENABLE_FEAT_RAS is set to 2 on FVP. Having RAS implies that the whole handling machinery will be built-in and registered as appropriate. However, when RAS is built-in but not present in hardware, these registrations can still happen, they will only never be invoked at runtime.
Change-Id: I949e648601dc0951ef9c2b217f34136b6ea4b3dc Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 287ad959 | 11-Aug-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(aarch64): remove crash reporting's dependency on cpu_data
Crash reporting is useful as early as possible, even before most of the runtime has been set up. This means that all of its depende
refactor(aarch64): remove crash reporting's dependency on cpu_data
Crash reporting is useful as early as possible, even before most of the runtime has been set up. This means that all of its dependencies, currently only cpu_data, must be set up as early as possible too. This can be constraining as fiddling with the general EL3 runtime from the early entrypoint is very difficult. So remove the cpu_data dependency. Further benefits are that crash reporting will work even earlier (during cpu reset functions!) and also in other BLs.
Change-Id: I92bb6b3921c6dec10560f8341b3bca5cdacfb492 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 574db8ec | 19-Dec-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(el3-runtime): remove lower_el_panic()
A panic at EL3 is bad news and should never happen. What caused it isn't exactly relevant or possible to figure out without manual debugging (surely there w
fix(el3-runtime): remove lower_el_panic()
A panic at EL3 is bad news and should never happen. What caused it isn't exactly relevant or possible to figure out without manual debugging (surely there wouldn't have been a panic if not). A misbehaving lower EL should never be able to cause problems for a higher EL and since EL3 is in control of all lower ELs a panic at EL3 means that there is a problem with EL3.
This patch removes lower_el panic and replaces it with a simple panic for simplicity. There is a slight loss of information when an AArch32 lower EL has one of its instructions trapped by EL3. An explicit error message is added to preserve this information.
Change-Id: Iefd20eb43d69cbcf6d66ed5cc894c4e0255782e3 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 14320bce | 20-Oct-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(el3-runtime): translate EL3 handled exceptions to C and always call prepare_el3_entry
Exception handling in BL31 is tricky business and to satisfy the varying requirements of the different code
feat(el3-runtime): translate EL3 handled exceptions to C and always call prepare_el3_entry
Exception handling in BL31 is tricky business and to satisfy the varying requirements of the different code paths it has thus far largely been written in assembly. However, assembly is extremely tedious to read and modify. Similar to context management, it is desirable to have as much as possible in C. C code is generally easier to follow and can enable the compiler to do more optimisations on surrounding code.
Most exceptions that BL31 deals with are the synchronous exceptions and those are processed within BL31. They already get prepared for EL3 entry and after the initial dispatch end up in C. So the dispatch can also be converted in C. Interrupt exceptions are very similar so are converted too. Finally, asynchronous external aborts share some code with synchronous external aborts and may end up being processed deeper in BL31. So they can safely be prepared for EL3 entry too and converted to C so that they can share code properly.
The IMP DEF exceptions are not part of this refactor as their speed may be important. There is currently little that uses them, but they can be converted to C too once their use expands and usage allows it.
This refactor allows to expand the responsibilities of prepare_el3_entry(). Its role is already to prepare context for executing within EL3 but with this patch EL3 execution is synonymous with C runtime execution. So it's given the responsibility of saving spsr and elr as well as putting the runtime stack in.
When a synchronous exception happens, the only possible paths are to enter the C EL3 runtime, exiting via el3_exit(), or to panic. In the EL3 runtime case, we always need prepare_el3_entry() and the runtime stack, whereas in the panic case, this doesn't matter as we will never return. So hoist the prepare_el3_entry() call and the changing of the stacks as early as possible and make the rest of the code agnostic of this.
This patch also gets rid of smc_prohibited. It is an optimisation by skipping prepare_el3_entry() when a bad smc call happens. However, speed doesn't matter in this case as this is an erroneous case.
Change-Id: I411af9d17ef4046a736b1f4f5f8fbc9c28e66106 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 4286d16f | 26-Nov-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(cpufeat): add support for FEAT_UINJ
FEAT_UINJ allows higher ELs to inject Undefined Instruction exceptions into lower ELs by setting SPSR_ELx.UINJ, which updates PSTATE.UINJ on exception return
feat(cpufeat): add support for FEAT_UINJ
FEAT_UINJ allows higher ELs to inject Undefined Instruction exceptions into lower ELs by setting SPSR_ELx.UINJ, which updates PSTATE.UINJ on exception return. When PSTATE.UINJ is set, instruction execution at the lower EL raises an Undefined Instruction exception (EC=0b000000).
This patch introduces support for FEAT_UINJ by updating the inject_undef64() to use hardware undef injection if supported.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I48ad56a58eaab7859d508cfa8dfe81130b873b6b
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 ...
|
| 7303319b | 08-Nov-2025 |
Chris Kay <chris.kay@arm.com> |
Merge changes from topic "NUMA_AWARE_PER_CPU" into integration
* changes: docs(maintainers): add per-cpu framework into maintainers.rst feat(per-cpu): add documentation for per-cpu framework f
Merge changes from topic "NUMA_AWARE_PER_CPU" into integration
* changes: docs(maintainers): add per-cpu framework into maintainers.rst feat(per-cpu): add documentation for per-cpu framework feat(rdv3): enable numa aware per-cpu for RD-V3-Cfg2 feat(per-cpu): migrate amu_ctx to per-cpu framework feat(per-cpu): migrate spm_core_context to per-cpu framework feat(per-cpu): migrate psci_ns_context to per-cpu framework feat(per-cpu): migrate psci_cpu_pd_nodes to per-cpu framework feat(per-cpu): migrate rmm_context to per-cpu framework feat(per-cpu): integrate per-cpu framework into BL31/BL32 feat(per-cpu): introduce framework accessors/definers feat(per-cpu): introduce linker changes for NUMA aware per-cpu framework docs(changelog): add scope for per-cpu framework
show more ...
|
| 98859b99 | 29-Jan-2025 |
Sammit Joshi <sammit.joshi@arm.com> |
feat(per-cpu): integrate per-cpu framework into BL31/BL32
Integrate per-cpu support into BL31/BL32 by extending the following areas:
Zero-initialization: Treats per-cpu sections like .bss and clear
feat(per-cpu): integrate per-cpu framework into BL31/BL32
Integrate per-cpu support into BL31/BL32 by extending the following areas:
Zero-initialization: Treats per-cpu sections like .bss and clears them during early C runtime initialization. For platforms that enable NUMA_AWARE_PER_CPU, invokes a platform hook to zero-initialize node-specific per-cpu regions.
Cache maintenance: Extends the BL31 exit path to clean dcache lines covering the per-cpu region, ensuring data written by the primary core is visible to secondary cores.
tpidr_el3 setup: Initializes tpidr_el3 with the base address of the current CPU’s per-cpu section. This allows per-cpu framework to resolve local cpu accesses efficiently.
The percpu_data object is currently stored in tpidr_el3. Since the per-cpu framework will use tpidr_el3 for this-cpu access, percpu_data must be migrated to avoid conflict. This commit moves percpu_data to the per-cpu framework.
Signed-off-by: Sammit Joshi <sammit.joshi@arm.com> Signed-off-by: Rohit Mathew <rohit.mathew@arm.com> Change-Id: Iff0c2e1f8c0ebd25c4bb0b09bfe15dd4fbe20561
show more ...
|
| 7256cf0a | 29-Jan-2025 |
Rohit Mathew <rohit.mathew@arm.com> |
feat(per-cpu): introduce linker changes for NUMA aware per-cpu framework
This commit introduces linker changes for NUMA aware per-cpu objects in the BL31 and BL32 images. The per-cpu framework is de
feat(per-cpu): introduce linker changes for NUMA aware per-cpu framework
This commit introduces linker changes for NUMA aware per-cpu objects in the BL31 and BL32 images. The per-cpu framework is designed to minimise cache thrashing, and the linker layout ensures each CPU’s per-cpu data is placed on a separate cache line. This isolation is expected to improve performance when the per-cpu framework is enabled.
Signed-off-by: Sammit Joshi <sammit.joshi@arm.com> Signed-off-by: Rohit Mathew <rohit.mathew@arm.com> Change-Id: Ie4d8b4e444971adbd9dba0446d1ab8cafaca1556
show more ...
|
| 88655be9 | 21-Oct-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(el3-runtime): add flags argument to handle_sysreg_trap
Extend handle_sysreg_trap() to accept an additional flags parameter indicating the caller’s security state. The EL3 synchronous exception
feat(el3-runtime): add flags argument to handle_sysreg_trap
Extend handle_sysreg_trap() to accept an additional flags parameter indicating the caller’s security state. The EL3 synchronous exception handler now passes this value when dispatching trapped system register accesses. This allows handle_sysreg_trap() to handle traps based on the originating security context.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: Ic6e4a13297bf0b3afec3b83e1696c03286615560
show more ...
|
| a873d26f | 22-Oct-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(bl1): use per-world context correctly
Currently, the configuration with BL1 and BL2 at SEL1 will transition via el3_exit which will restore per-world context. However, that context is never writ
fix(bl1): use per-world context correctly
Currently, the configuration with BL1 and BL2 at SEL1 will transition via el3_exit which will restore per-world context. However, that context is never written to and so zeroes end up in registers, which is not necessarily correct.
This patch gets BL1 to call cm_manage_extensions_per_world() whenever BL2 runs in a lower EL. This allows the per-world registers to have the reset values we intend. An accompanying call to cm_manage_extensions_el3() is also added for completeness.
Doing this shows a small deficiency in cptr_el3 - bits TFP and TCPAC change a lot. This patch makes them consistent by always setting TCPAC and TFP to 0 which unconditionally enable access to CPTR_EL2 and FPCR by default as they are always accessible. Other places that manipulate the TFP bit are removed.
A nice side effect of all of this is that we're now in a position to enable and use any architectural extension in BL2.
Change-Id: I070d62bbf8e9d9b472caf7e2c931c303523be308 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 98863b1e | 13-Oct-2025 |
Ahmed Azeem <ahmed.azeem@arm.com> |
fix(dsu): dsu config for all cores in hot reset
This allows DSU units to be configured across all cpu clusters instead of the primary cluster. This configures actlr_el3 in the hot reset path to allo
fix(dsu): dsu config for all cores in hot reset
This allows DSU units to be configured across all cpu clusters instead of the primary cluster. This configures actlr_el3 in the hot reset path to allow power control and PMU registers for all cores in lower ELs and fixes.
Change-Id: If4dd254736fbcc4bcb8785a16972a0132bc477ce Signed-off-by: Ahmed Azeem <ahmed.azeem@arm.com> Signed-off-by: Amr Mohamed <amr.mohamed@arm.com>
show more ...
|
| b5deac9a | 27-Oct-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "comp_build_macro" into integration
* changes: feat(build): setting CRYPTO_LIB via CRYPTO_SUPPORT feat(build): set CRYPTO_SUPPORT macro per BL feat(build): create defi
Merge changes from topic "comp_build_macro" into integration
* changes: feat(build): setting CRYPTO_LIB via CRYPTO_SUPPORT feat(build): set CRYPTO_SUPPORT macro per BL feat(build): create define macro to be used by BL
show more ...
|
| c3e5f6b9 | 22-Oct-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "bk/simpler_panic" into integration
* changes: fix(aarch64): do not print EL1 registers on EL3 panic refactor(el3-runtime): streamline cpu_data assembly offsets using th
Merge changes from topic "bk/simpler_panic" into integration
* changes: fix(aarch64): do not print EL1 registers on EL3 panic refactor(el3-runtime): streamline cpu_data assembly offsets using the cpu_ops template
show more ...
|
| cd92fb24 | 28-Jul-2025 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
feat(build): setting CRYPTO_LIB via CRYPTO_SUPPORT
Setting CRYPTO_LIB based on CRYPTO_SUPPORT via the CRYPTO_SUPPORT macro to be called by component-specific makefiles.
Signed-off-by: Lauren Wehrme
feat(build): setting CRYPTO_LIB via CRYPTO_SUPPORT
Setting CRYPTO_LIB based on CRYPTO_SUPPORT via the CRYPTO_SUPPORT macro to be called by component-specific makefiles.
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com> Change-Id: Ib400e4668c60c24bb4399de6a320b5c16205affb
show more ...
|
| 6e2fe623 | 06-Jun-2025 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
feat(build): set CRYPTO_SUPPORT macro per BL
Moving the setting of CRYPTO_SUPPORT from the main Makefile to individual component makefiles using the new build macro make_defines for each BL-specific
feat(build): set CRYPTO_SUPPORT macro per BL
Moving the setting of CRYPTO_SUPPORT from the main Makefile to individual component makefiles using the new build macro make_defines for each BL-specific CPPFLAGS.
Rework romlib build command to use CRYPTO_LIB to determine mbedtls need instead of CRYPTO_SUPPORT. If CRYPTO_SUPPORT is set for any component, then CRYPTO_LIB will be filled, romlib can use this instead.
Add a convenience makefile macro for setting CRYPTO_SUPPORT from component specific makefiles, have components call the macro based on whether authenication verification (NEED_AUTH) and/or hash calculation (NEED_HASH) is required for the specific boot stage.
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com> Change-Id: I7e81fede74fb9c04694b022e8eebed460616565c
show more ...
|
| 7e8b7096 | 14-Oct-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge changes Id711e387,I531a2ee1,Ic5b48514,I81f5f663,I6c529c13, ... into integration
* changes: refactor(romlib): absorb WRAPPER_FLAGS into LDFLAGS fix(build): simplify the -target options fe
Merge changes Id711e387,I531a2ee1,Ic5b48514,I81f5f663,I6c529c13, ... into integration
* changes: refactor(romlib): absorb WRAPPER_FLAGS into LDFLAGS fix(build): simplify the -target options feat(build): allow full LTO builds with clang refactor(build): make sorting of sections generic feat(build): use clang as a linker fix(build): correctly detect that an option is missing with ld_option feat(build): pass cflags to the linker when LTO is enabled
show more ...
|
| 5be66449 | 08-Oct-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(build): make it standard to request a custom linker script
Hoist the add_define to a global location so that platforms only have to declare its usage. Fix up #ifdef to #if since we will now
refactor(build): make it standard to request a custom linker script
Hoist the add_define to a global location so that platforms only have to declare its usage. Fix up #ifdef to #if since we will now always pass a definition.
Change-Id: Ia52ad5ed4dcbd157d139c8ca2fb3d35b32343b93 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 05d22c30 | 13-May-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(build): make sorting of sections generic
All BLs define essentially the same sequence for sorting of sections. Make that generic so it applies more easily.
Change-Id: I81f5f6635232bd43d999
refactor(build): make sorting of sections generic
All BLs define essentially the same sequence for sorting of sections. Make that generic so it applies more easily.
Change-Id: I81f5f6635232bd43d999c8054e290a6437c26c71 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 25fe31b2 | 22-May-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cpufeat): add ras files to the build from a common location
If ENABLE_FEAT_RAS is unset on the build commandline the platform.mk will run and make its decisions with the flag unset, after which
fix(cpufeat): add ras files to the build from a common location
If ENABLE_FEAT_RAS is unset on the build commandline the platform.mk will run and make its decisions with the flag unset, after which arch_features.mk will run and enable the feature. The result in the RAS case is a build failure due to missing symbols.
Nvidia works around this by setting ENABLE_FEAT_RAS manually despite the arch_features.mk setting.
Every platform that enables ENABLE_FEAT_RAS also pulls in std_err_record.c and ras_common.c. So fix the build failure by having these files be pulled into the build from common code in bl31.mk.
Change-Id: I018869d3f1904821523ac88d70e88eb90959784b Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| f9f4944d | 04-Jul-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cm): do not restore spsr and elr twice on external aborts
el3_exit will restore SPSR_EL3 and ELR_EL3. There is no need to do it in ea_proceed too as that is always followed by el3_exit.
Change-
fix(cm): do not restore spsr and elr twice on external aborts
el3_exit will restore SPSR_EL3 and ELR_EL3. There is no need to do it in ea_proceed too as that is always followed by el3_exit.
Change-Id: I9089b3ada7785bc0d5fd1e05192f456ffe666789 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| a202529e | 22-May-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cm): do not save SCR_EL3 on external aborts
SCR_EL3 is static. For non-root worlds, once initialised by cm_setup_context(), its value is immutable and only restored by el3_exit(). For the root w
fix(cm): do not save SCR_EL3 on external aborts
SCR_EL3 is static. For non-root worlds, once initialised by cm_setup_context(), its value is immutable and only restored by el3_exit(). For the root world (or EL3 when that's not a thing) setup_el3_execution_context() (via prepare_el3_entry()) will write a different static value in, with the expectation that el3_exit() will wipe it. As such saving scr_el3 in the case of a double fault is not necessary, and even harmful as the wrong (root's) value will get written in.
Change-Id: Ibf5b3a809fc0208a98ded20fe8d50c7405f808b9 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| a1032beb | 20-Aug-2025 |
John Powell <john.powell@arm.com> |
feat(cpufeat): enable FEAT_CPA2 for EL3
FEAT_CPA2 enables checked pointer arithmetic, which in the event of an arithmetic overflow in pointer generation will result in a non-canonical pointer being
feat(cpufeat): enable FEAT_CPA2 for EL3
FEAT_CPA2 enables checked pointer arithmetic, which in the event of an arithmetic overflow in pointer generation will result in a non-canonical pointer being generated and subsequent address fault.
Note that FEAT_CPA is a trivial implementation that exists in some hardware purely so it can run CPA2-enabled instructions without crashing but they don't actually have checked arithmetic, so FEAT_CPA is not explicitly enabled in TF-A.
Change-Id: I6d2ca7a7e4b986bb9e917aa8baf8091a271c168b Signed-off-by: John Powell <john.powell@arm.com>
show more ...
|
| 8f152319 | 11-Aug-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(aarch64): do not print EL1 registers on EL3 panic
Lower EL execution should not be able to panic EL3. The main source of potential panic, traps from lower ELs, are now handled gracefully with un
fix(aarch64): do not print EL1 registers on EL3 panic
Lower EL execution should not be able to panic EL3. The main source of potential panic, traps from lower ELs, are now handled gracefully with undefined injection. Almost every other source of panic is something going wrong within TF-A. Regardless, in both cases, ESR_EL3, ELR_EL3, and SPSR_ELR provide the majority of necessary information to debug a panic and printing a lot of lower EL register only clutters the crash dump and makes it difficult to read.
Further, when EL3 panics, the ultimate source of that panic may be EL2 but the crash reporting functionality only prints out EL1 system registers which are going to be quite useless to debug.
Finally, the panic may be happening due to some misconfiguration of other EL3 system registers that have been introduced with a feature.
There are two logical choices: a) extend crash reporting to report all EL1, EL2, and EL3 registers depending on where an error came from, including all features b) only print core EL3 registers and rely on the developer to add extra prints as necessary
We have never strived to achieve a) (as evidenced by EL2 and feature sysregs never having been added), so do b). Only non-EL3 registers that are relevant to EL3's direct execution are kept (like SP_EL0).
Change-Id: Ife2fe86184bca9a4d66f367c516eececc57471da Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|