| 40e5f7a5 | 08-Aug-2023 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(context-mgmt): introduce EL3/root context
* This patch adds root context procedure to restore/configure the registers, which are of importance during EL3 execution.
* EL3/Root context is a s
feat(context-mgmt): introduce EL3/root context
* This patch adds root context procedure to restore/configure the registers, which are of importance during EL3 execution.
* EL3/Root context is a simple restore operation that overwrites the following bits: (MDCR_EL3.SDD, SCR_EL3.{EA, SIF}, PMCR_EL0.DP PSTATE.DIT) while the execution is in EL3.
* It ensures EL3 world maintains its own settings distinct from other worlds (NS/Realm/SWd). With this in place, the EL3 system register settings is no longer influenced by settings of incoming worlds. This allows the EL3/Root world to access features for its own execution at EL3 (eg: Pauth).
* It should be invoked at cold and warm boot entry paths and also at all the possible exception handlers routing to EL3 at runtime. Cold and warm boot paths are handled by including setup_el3_context function in "el3_entrypoint_common" macro, which gets invoked in both the entry paths.
* At runtime, el3_context is setup at the stage, while we get prepared to enter into EL3 via "prepare_el3_entry" routine.
Change-Id: I5c090978c54a53bc1c119d1bc5fa77cd8813cdc2 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| f4303d05 | 02-Sep-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(cm): handle asymmetry for FEAT_TCR2
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. FEAT_TCR2 is one of the features which can be asymmetric across core
feat(cm): handle asymmetry for FEAT_TCR2
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. FEAT_TCR2 is one of the features which can be asymmetric across cores and the respective support is added here.
Adding a function to handle this asymmetry by re-visting the feature presence on running core. There are two possible cases: - If the primary core has the feature and secondary does not have it then the feature is disabled. - If the primary does not have the feature and secondary has it then, the feature need to be enabled in secondary cores.
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Change-Id: I73a70891d52268ddfa4effe40edf04115f5821ca
show more ...
|
| 4b6e4e61 | 20-Aug-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "mp/simd_ctxt_mgmt" into integration
* changes: feat(fvp): allow SIMD context to be put in TZC DRAM docs(simd): introduce CTX_INCLUDE_SVE_REGS build flag feat(fvp): ad
Merge changes from topic "mp/simd_ctxt_mgmt" into integration
* changes: feat(fvp): allow SIMD context to be put in TZC DRAM docs(simd): introduce CTX_INCLUDE_SVE_REGS build flag feat(fvp): add Cactus partition manifest for EL3 SPMC chore(simd): remove unused macros and utilities for FP feat(el3-spmc): support simd context management upon world switch feat(trusty): switch to simd_ctx_save/restore apis feat(pncd): switch to simd_ctx_save/restore apis feat(spm-mm): switch to simd_ctx_save/restore APIs feat(simd): add rules to rationalize simd ctxt mgmt feat(simd): introduce simd context helper APIs feat(simd): add routines to save, restore sve state feat(simd): add sve state to simd ctxt struct feat(simd): add data struct for simd ctxt management
show more ...
|
| 308ebfa1 | 17-Jun-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
feat(simd): introduce simd context helper APIs
This patch adds the common API to save and restore FP and SVE. When SVE is enabled we save and restore SVE which automatically covers FP. If FP is enab
feat(simd): introduce simd context helper APIs
This patch adds the common API to save and restore FP and SVE. When SVE is enabled we save and restore SVE which automatically covers FP. If FP is enabled while SVE is not, then we save and restore FP only.
The patch uses simd_ctx_t to save and restore both FP and SVE which means developers need not use fp or sve routines directly. Once all the calls to fpregs_context_* are replaced with simd_ctx_*, we can remove fp_regs_t data structure and macros (taken care in a following patch).
simd_ctx_t is currently allocated in section of its own. This will go into BSS section by default but platform will have option of relocating it to a different section by overriding in plat.ld.S.
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com> Signed-off-by: Okash Khawaja <okash@google.com> Change-Id: I090f8b8fa3862e527b6c40385249adc69256bf24
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 ...
|
| 33e6aaac | 06-Jun-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(fgt2): add support for FEAT_FGT2
This patch disables trapping to EL3 when the FEAT_FGT2 specific trap registers are accessed by setting the SCR_EL3.FGTEn2 bit
Signed-off-by: Arvind Ram Prakash
feat(fgt2): add support for FEAT_FGT2
This patch disables trapping to EL3 when the FEAT_FGT2 specific trap registers are accessed by setting the SCR_EL3.FGTEn2 bit
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I6d2b614affb9067b2bc3d7bf0ae7d169d031592a
show more ...
|
| 83271d5a | 22-May-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(debugv8p9): add support for FEAT_Debugv8p9
This patch enables FEAT_Debugv8p9 and prevents EL1/0 from trapping to EL3 when accessing MDSELR_EL1 register by setting the MDCR_EL3.EBWE bit.
Signed
feat(debugv8p9): add support for FEAT_Debugv8p9
This patch enables FEAT_Debugv8p9 and prevents EL1/0 from trapping to EL3 when accessing MDSELR_EL1 register by setting the MDCR_EL3.EBWE bit.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I3613af1dd8cb8c0d3c33dc959f170846c0b9695a
show more ...
|
| a97e1f97 | 08-May-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "early_console" into integration
* changes: feat(stm32mp2): use early traces feat(st-bsec): use early traces refactor(st): replace STM32MP_EARLY_CONSOLE with EARLY_CON
Merge changes from topic "early_console" into integration
* changes: feat(stm32mp2): use early traces feat(st-bsec): use early traces refactor(st): replace STM32MP_EARLY_CONSOLE with EARLY_CONSOLE feat(console): introduce EARLY_CONSOLE feat(bl32): create an sp_min_setup function
show more ...
|
| af3e8e63 | 21-Feb-2024 |
Salman Nabi <salman.nabi@arm.com> |
refactor(console): consolidate console runtime switch
Refactor console_flush() and console_switch_state(CONSOLE_FLAG_RUNTIME) to bl31_main(). This has been done per the recommendation in TF-A mailin
refactor(console): consolidate console runtime switch
Refactor console_flush() and console_switch_state(CONSOLE_FLAG_RUNTIME) to bl31_main(). This has been done per the recommendation in TF-A mailing list. These calls need to be the last calls, after any runtime initialization has been done, before BL31 exits.
All platforms that override the generic implementation of bl31_plat_runtime_setup() have been refactored. The console_flush() and console_switch_state() calls have been removed as they become part of bl31_main() function.
Any platform that don't need to make any change to the generic (weak) implementation of bl31_plat_runtime_setup() don't need to override it in their platforms.
Change-Id: I6d04d6daa9353daeaa7e3df9e9adf6f322a917b8 Signed-off-by: Salman Nabi <salman.nabi@arm.com>
show more ...
|
| ee9cfacc | 07-May-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "makefile-cleanup" into integration
* changes: build: improve diagnostics for unrecognized toolchain tools build(rzg): separate BL2 and BL31 SREC generation build(rcar
Merge changes from topic "makefile-cleanup" into integration
* changes: build: improve diagnostics for unrecognized toolchain tools build(rzg): separate BL2 and BL31 SREC generation build(rcar): separate BL2 and BL31 SREC generation build: separate preprocessing from DTB compilation build: remove `MAKE_BUILD_STRINGS` function
show more ...
|
| 2a0ca84f | 07-May-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "sm/feat_detect" into integration
* changes: refactor(cpufeat): restore functions in detect_arch_features refactor(cpufeat): add macro to simplify is_feat_xx_present c
Merge changes from topic "sm/feat_detect" into integration
* changes: refactor(cpufeat): restore functions in detect_arch_features refactor(cpufeat): add macro to simplify is_feat_xx_present chore: simplify the macro names in ENABLE_FEAT mechanism
show more ...
|
| 3c225878 | 01-May-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(smccc): refactor vendor-el3 build
Currently we are building vendor-specific EL3 by default similar to arm-sip but unfortunately this causes few troubles for now.
- Few model builds configu
refactor(smccc): refactor vendor-el3 build
Currently we are building vendor-specific EL3 by default similar to arm-sip but unfortunately this causes few troubles for now.
- Few model builds configuration like 'fvp-dynamiq-aarch64-only' is on 256KB SRAM border and this configuration is also run on some older models like A710 and N2, so we cant move them to 384KB SRAM size and to new model.
- Not able to move some older model builds to new model due to known issue in power modelling in some of the models, making it difficult to transition.
However vendor-specific EL3 is currently using PMF, DEBUGFS so building the vendor EL3 support only when any of this sub-service is built also helps to avoid bloating BL31 image size in certain configurations.
However this is not end of road, we will monitor how vendor-specific EL3 grows with sub-service and if needed will make this interface to built by default like arm-sip range. Also this doesn't stop platform owners to make vendor-specific EL3 to be enabled by default for their platform configuration.
Change-Id: I23322574bdeb7179441a580ad4f093216a948bbf Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| de6b79d8 | 23-Feb-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
feat(smccc): add vendor-specific el3 service
Add support for vendor-specific el3 service. SMCCC 1.5 introduces support for vendor-specific EL3 monitor calls.
SMCCC Documentation reference: https://
feat(smccc): add vendor-specific el3 service
Add support for vendor-specific el3 service. SMCCC 1.5 introduces support for vendor-specific EL3 monitor calls.
SMCCC Documentation reference: https://developer.arm.com/docs/den0028/latest
Change-Id: Id8bc43842eecdb7a8a2ec7f31a631e88fe4fe0b4 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| a5c4212f | 21-Feb-2024 |
Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> |
refactor(cpus): replace adr with adr_l
Replace "adr" with "adr_l" to handle symbols or labels that exceeds 1MB access range. This modification resolves the link error.
Change-Id: I9eba2e34c0a303b40
refactor(cpus): replace adr with adr_l
Replace "adr" with "adr_l" to handle symbols or labels that exceeds 1MB access range. This modification resolves the link error.
Change-Id: I9eba2e34c0a303b40e4c7b3ea7c5b113f4c6d989 Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
show more ...
|
| aaaf2cc3 | 13-Mar-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
refactor(cpufeat): add macro to simplify is_feat_xx_present
In this patch, we are trying to introduce the wrapper macro CREATE_FEATURE_PRESENT to get the following capability and align it for all th
refactor(cpufeat): add macro to simplify is_feat_xx_present
In this patch, we are trying to introduce the wrapper macro CREATE_FEATURE_PRESENT to get the following capability and align it for all the features:
-> is_feat_xx_present(): Does Hardware implement the feature. -> uniformity in naming the function across multiple features. -> improved readability
The is_feat_xx_present() is implemented to check if the hardware implements the feature and does not take into account the ENABLE_FEAT_XXX flag enabled/disabled in software.
- CREATE_FEATURE_PRESENT(name, idreg, shift, mask, idval) The wrapper macro reduces the function to a single line and creates the is_feat_xx_present function that checks the id register based on the shift and mask values and compares this against a determined idvalue.
Change-Id: I7b91d2c9c6fbe55f94c693aa1b2c50be54fb9ecc Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 758ccb80 | 08-Mar-2024 |
Chris Kay <chris.kay@arm.com> |
build: remove `MAKE_BUILD_STRINGS` function
This function causes the build message to be generated and compiled in two different ways, with one way done inside `build_macros.mk` and the other done i
build: remove `MAKE_BUILD_STRINGS` function
This function causes the build message to be generated and compiled in two different ways, with one way done inside `build_macros.mk` and the other done inside `windows.mk`, mostly because it's done by generating the C file on the command line.
We can instead replace this whole build message generation sequence with a simple standard C compilation command and a normal C file.
Change-Id: I8bc136380c9585ddeec9a11154ee39ef70526f81 Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| ae770fed | 16-Jan-2024 |
Yann Gautier <yann.gautier@st.com> |
feat(console): introduce EARLY_CONSOLE
This is a generic porting of what was done on ST platforms with flag STM32MP_EARLY_CONSOLE. It creates the flag and the prototype for plat_setup_early_console(
feat(console): introduce EARLY_CONSOLE
This is a generic porting of what was done on ST platforms with flag STM32MP_EARLY_CONSOLE. It creates the flag and the prototype for plat_setup_early_console(). This function depends on platform implementation. This function call is added at the beginning of each BL image early setup function. The patch also introduce an extra log macro: EARLY_ERROR. This can replace ERROR macro in code that will only be executed before the default console is enabled, and will do nothing when the EARLY_CONSOLE is not enabled. This can then save some space in memory.
Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I77bf0a0c4289b4c7df94e4bfb783a938e05bf023
show more ...
|
| c282384d | 07-Mar-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(mte): remove mte, mte_perm
Currently both FEAT_MTE and FEAT_MTE_PERM aren't used for enabling of any feature bits in EL3. So remove both FEAT handling.
All mte regs that are currently cont
refactor(mte): remove mte, mte_perm
Currently both FEAT_MTE and FEAT_MTE_PERM aren't used for enabling of any feature bits in EL3. So remove both FEAT handling.
All mte regs that are currently context saved/restored are needed only when FEAT_MTE2 is enabled, so move to usage of FEAT_MTE2 and remove FEAT_MTE usage.
BREAKING CHANGE: Any platform or downstream code trying to use SCR_EL3.ATA bit(26) will see failures as this is now moved to be used only with FEAT_MTE2 with commit@ef0d0e5478a3f19cbe70a378b9b184036db38fe2
Change-Id: Id01e154156571f7792135639e17dc5c8d0e17cf8 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| e3ecd731 | 14-Mar-2024 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge "refactor(sdei): use common create_spsr() in SDEI library" into integration |
| fba343b0 | 07-Mar-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(misra): fix MISRA defects" into integration |
| 03fafc0b | 20-Feb-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
refactor(sdei): use common create_spsr() in SDEI library
The current SPSR updation code as part of the SDEI interrupt handler code is outdated. This patch replaces the legacy code with a call to an
refactor(sdei): use common create_spsr() in SDEI library
The current SPSR updation code as part of the SDEI interrupt handler code is outdated. This patch replaces the legacy code with a call to an up-to-date create_spsr()
Change-Id: I1f5fdd41dd14f4b09601310fe881fa3783d7f505 Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
show more ...
|
| c42d0d87 | 04-Mar-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
fix(misra): fix MISRA defects
This patch resolves the MISRA issues reported in mailing list. It addresses the following MISRA Rules violations - Rule 15.7 and Rule 2.4.
* As per Rule 15.7, All if..
fix(misra): fix MISRA defects
This patch resolves the MISRA issues reported in mailing list. It addresses the following MISRA Rules violations - Rule 15.7 and Rule 2.4.
* As per Rule 15.7, All if.. else if constructs should be terminated with an else statement and hence the conditional block has been changed to switch..case. Updated get_el_str() to include all EL cases.
* As per Rule 2.4, A project should not contain unused tag declarations, hence intr_type_desc tag is removed.
* bl31_lib_init is only used in translation unit and hence it's declaration is removed from bl31.h and the definition is made static to maintain visibility.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: Ica1d3041566baf51befcad5fd3714189117ba193
show more ...
|
| 24a4a0a5 | 05-Feb-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
fix(gic600): workaround for Part 1 of GIC600 erratum 2384374
GIC600 erratum 2384374 is a Category B erratum. Part 1 is fixed in this patch, and the Part 1 failure mode is described as 'If the packet
fix(gic600): workaround for Part 1 of GIC600 erratum 2384374
GIC600 erratum 2384374 is a Category B erratum. Part 1 is fixed in this patch, and the Part 1 failure mode is described as 'If the packet to be sent is a SET packet, then a higher priority SET may not be sent when it should be until an unblocking event occurs.'
This is handled by calling gicv3_apply_errata_wa_2384374() in the ehf_deactivate_priority() path, so that when EHF restores the priority to the original priority, the interrupt packet buffered in the GIC can be sent.
gicv3_apply_errata_wa_2384374() is the workaround for the Part 2 of erratum 2384374 which flush packets from the GIC buffer and is being used in this patch.
SDEN can be found here: https://developer.arm.com/documentation/sden892601/latest/
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I4bb6dcf86c94125cbc574e0dc5119abe43e84731
show more ...
|
| 3c789bfc | 08-Dec-2023 |
Manish Pandey <manish.pandey2@arm.com> |
feat(el3-runtime): introduce UNDEF injection to lower EL
For a feature to be used at lower ELs, EL3 generally needs to disable the trap so that lower ELs can access the system registers associated w
feat(el3-runtime): introduce UNDEF injection to lower EL
For a feature to be used at lower ELs, EL3 generally needs to disable the trap so that lower ELs can access the system registers associated with the feature. Lower ELs generally check ID registers to dynamically detect if a feature is present (in HW) or not while EL3 Firmware relies statically on feature build macros to enable a feature.
If a lower EL accesses a system register for a feature that EL3 FW is unaware of, EL3 traps the access and panics. This happens mostly with EL2 but sometimes VMs can also cause EL3 panic.
To provide platforms with capability to mitigate this problem, UNDEF injection support has been introduced which injects a synchronous exception into the lower EL which is supposed to handle the synchronous exception.
The current support is only provided for aarch64.
The implementation does the following on encountering sys reg trap
- Get the target EL, which can be either EL2 or EL1 - Update ELR_ELx with ELR_EL3, so that after UNDEF handling in lower EL control returns to original location. - ESR_ELx with EC_UNKNOWN - Update ELR_EL3 with vector address of sync exception handler with following possible causes - Current EL with SP0 - Current EL with SPx - Lower EL using AArch64 - Re-create SPSR_EL3 which will be used to generate PSTATE at ERET
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I1b7bf6c043ce7aec1ee4fc1121c389b490b7bfb7
show more ...
|
| 8620bd0b | 04-Dec-2023 |
Chris Kay <chris.kay@arm.com> |
build: use toolchain identifiers in conditions
The toolchain refactor change introduces the `${toolchain}-${tool}-id` variables, which provide identifiers for all of the toolchain tools used by the
build: use toolchain identifiers in conditions
The toolchain refactor change introduces the `${toolchain}-${tool}-id` variables, which provide identifiers for all of the toolchain tools used by the build system. This change replaces the various conditions that are in use to identify these tools based on the path with a standard set of comparisons against these new identifier variables.
Change-Id: Ib60e592359fa6e415c19a012e68d660f87436ca7 Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|