feat(cpufeat): add support for FEAT_UINJFEAT_UINJ allows higher ELs to inject Undefined Instruction exceptionsinto lower ELs by setting SPSR_ELx.UINJ, which updates PSTATE.UINJ onexception return
feat(cpufeat): add support for FEAT_UINJFEAT_UINJ allows higher ELs to inject Undefined Instruction exceptionsinto lower ELs by setting SPSR_ELx.UINJ, which updates PSTATE.UINJ onexception return. When PSTATE.UINJ is set, instruction execution at thelower EL raises an Undefined Instruction exception (EC=0b000000).This patch introduces support for FEAT_UINJ by updating theinject_undef64() to use hardware undef injection if supported.Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>Change-Id: I48ad56a58eaab7859d508cfa8dfe81130b873b6b
show more ...
feat(cpufeat): add support for FEAT_IDTE3This patch adds support for FEAT_IDTE3, which introduces supportfor handling the trapping of Group 3 and Group 5 (only GMID_EL1)registers to EL3 (unless t
feat(cpufeat): add support for FEAT_IDTE3This patch adds support for FEAT_IDTE3, which introduces supportfor handling the trapping of Group 3 and Group 5 (only GMID_EL1)registers to EL3 (unless trapped to EL2). IDTE3 allows EL3 tomodify the view of ID registers for lower ELs, and this capabilityis 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 aparticular feature is disabled, its corresponding field in thecached ID register is set to Res0. When lower ELs attempt to readan ID register, the cached ID register value is returned. Thisallows EL3 to prevent lower ELs from accessing feature-specificsystem registers that are disabled in EL3, even though the hardwareimplements them.The emulated ID register values are stored primarily in per-worldcontext, except for certain debug-related ID registers such asID_AA64DFR0_EL1 and ID_AA64DFR1_EL1, which are stored in thecpu_data and are unique to each PE. This is done to support featureasymmetry that is commonly seen in debug features.FEAT_IDTE3 traps all Group 3 ID registers in the rangeop0 == 3, op1 == 0, CRn == 0, CRm == {2–7}, op2 == {0–7} and theGroup 5 GMID_EL1 register. However, only a handful of ID registerscontain fields used to detect features enabled in EL3. Hence, weonly cache those ID registers, while the rest are transparentlyreturned as is to the lower EL.This patch updates the CREATE_FEATURE_FUNCS macro to generateupdate_feat_xyz_idreg_field() functions that disable ID registerfields on a per-feature basis. The enabled_worlds scope is used todisable ID register fields for security states where the feature isnot enabled.This EXPERIMENTAL feature is controlled by the ENABLE_FEAT_IDTE3build flag and is currently disabled by default.Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>Change-Id: I5f998eeab81bb48c7595addc5595313a9ebb96d5