feat(cpufeat): enable FEAT_MPAM_PE_BW_CTRL supportImplement support for FEAT_MPAM_PE_BW_CTRL, allowing lowerException Levels to access MPAM_PE_BW_CTRL control registersby disabling their traps to
feat(cpufeat): enable FEAT_MPAM_PE_BW_CTRL supportImplement support for FEAT_MPAM_PE_BW_CTRL, allowing lowerException Levels to access MPAM_PE_BW_CTRL control registersby disabling their traps to EL3.When INIT_UNUSED_NS_EL2=1, configure MPAMBW2_EL2 in EL3 sothat MPAM_PE_BW_CTRL accesses from EL0/EL1 do not trap to EL2.At this stage, PE-side MPAM bandwidth controls remain disabledin EL3.Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>Change-Id: I8e359b0eb912cff3bdda109b21727a627cac3a7e
show more ...
refactor(cm): move MPAM3_EL3 reg to per world contextRefactor MPAM3_EL3 to be world-specific, eliminating redundant cross-CPUvalue duplication and reducing memory footprint.Signed-off-by: Arvind
refactor(cm): move MPAM3_EL3 reg to per world contextRefactor MPAM3_EL3 to be world-specific, eliminating redundant cross-CPUvalue duplication and reducing memory footprint.Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>Change-Id: Iddf020a5462737e01ac35e4f2b2b204a8759fafb
fix(mpam): refine MPAM initialization and enablement processRestricts MPAM to only NS world and enables trap to EL3 for access ofMPAM registers from lower ELs of Secure and Realm world.This patc
fix(mpam): refine MPAM initialization and enablement processRestricts MPAM to only NS world and enables trap to EL3 for access ofMPAM registers from lower ELs of Secure and Realm world.This patch removes MPAM enablement from global context and adds it toEL3 State context which enables/disables MPAM during world switches.Renamed ENABLE_MPAM_FOR_LOWER_ELS to ENABLE_FEAT_MPAM andremoved mpam_init_el3() as RESET behaviour is trapping.Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>Change-Id: I131f9dba5df236a71959b2d425ee11af7f3c38c4
refactor(cpufeat): separate the EL2 and EL3 enablement codeCombining the EL2 and EL3 enablement code necessitates that it must becalled at el3_exit, which is the only place with enough context to
refactor(cpufeat): separate the EL2 and EL3 enablement codeCombining the EL2 and EL3 enablement code necessitates that it must becalled at el3_exit, which is the only place with enough context to makethe decision of what needs to be set.Decouple them to allow them to be called from elsewhere.Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>Change-Id: I147764c42771e7d4100699ec8fae98dac0a505c0
refactor(mpam): enable FEAT_MPAM for FEAT_STATE_CHECKEDAt the moment we only support FEAT_MPAM to be either unconditionallycompiled in, or to be not supported at all.Add support for runtime dete
refactor(mpam): enable FEAT_MPAM for FEAT_STATE_CHECKEDAt the moment we only support FEAT_MPAM to be either unconditionallycompiled in, or to be not supported at all.Add support for runtime detection (ENABLE_MPAM_FOR_LOWER_ELS=2), bysplitting get_mpam_version() into an ID register readingfunction and a second function to report the support status. Thatfunction considers both build time settings and runtime information (ifneeded), and is used before we access MPAM related registers.Also move the context saving code from assembly to C, and use the newis_feat_mpam_supported() function to guard its execution.ENABLE_MPAM_FOR_LOWER_ELS defaults to 0, so add a stub enable functionto cover builds with compiler optimisations turned off. The unusedmpam_enable() function call will normally be optimised away (because itwould never be called), but with -O0 the compiler will leave the symbolin the object file.Change-Id: I531d87cb855a7c43471f861f625b5a6d4bc61313Signed-off-by: Andre Przywara <andre.przywara@arm.com>
refactor(mpam): remove initialization of EL2 registers when EL2 is usedThe patch removes initialization of MPAM EL2 registers when an EL2software exists. The patch assumes the EL2 software will pe
refactor(mpam): remove initialization of EL2 registers when EL2 is usedThe patch removes initialization of MPAM EL2 registers when an EL2software exists. The patch assumes the EL2 software will performthe necessary initializations of the registers.Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>Change-Id: I5bed81bc22f417bc3e3cbbcd860a8553cd4307cd
TF-A: Fix wrong register read for MPAM extensionThis patch fixes wrong ID_AA64DFR0_EL1 register read instead ofID_AA64PFR0_EL1 to detect support for MPAM extension.It also implements get_mpam_ver
TF-A: Fix wrong register read for MPAM extensionThis patch fixes wrong ID_AA64DFR0_EL1 register read instead ofID_AA64PFR0_EL1 to detect support for MPAM extension.It also implements get_mpam_version() function which returnsMPAM version as:0x00: None Armv8.0 or later;0x01: v0.1 Armv8.4 or later;0x10: v1.0 Armv8.2 or later;0x11: v1.1 Armv8.4 or later;Change-Id: I31d776b1a1b60cb16e5e62296d70adb129d7b760Reported-by: Matteo Zini <matteozini96@gmail.com>Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
MPAM: enable MPAM EL2 trapsComplete the MPAM enablement in TF-A for lower ELs by enabling the EL2traps in MPAMHCR_EL2 and MPAM2_EL2.This prevents anMPAM-unaware-hypervisor to be restricted by an
MPAM: enable MPAM EL2 trapsComplete the MPAM enablement in TF-A for lower ELs by enabling the EL2traps in MPAMHCR_EL2 and MPAM2_EL2.This prevents anMPAM-unaware-hypervisor to be restricted by an MPAM-aware-guest.Change-Id: I47bf3f833fa22baa590f83d49cc0e3f2974e698dSigned-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Sanitise includes across codebaseEnforce full include path for includes. Deprecate old paths.The following folders inside include/lib have been left unchanged:- include/lib/cpus/${ARCH}- inclu
Sanitise includes across codebaseEnforce full include path for includes. Deprecate old paths.The following folders inside include/lib have been left unchanged:- include/lib/cpus/${ARCH}- include/lib/el3_runtime/${ARCH}The reason for this change is that having a global namespace forincludes isn't a good idea. It defeats one of the advantages of havingfolders and it introduces problems that are sometimes subtle (becauseyou may not know the header you are actually including if there are twoof them).For example, this patch had to be created because two headers werecalled the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platformto avoid collision."). More recently, this patch has had similarproblems: 46f9b2c3a282 ("drivers: add tzc380 support").This problem was introduced in commit 4ecca33988b9 ("Move include andsource files to logical locations"). At that time, there weren't toomany headers so it wasn't a real issue. However, time has shown thatthis creates problems.Platforms that want to preserve the way they include headers may add theremoved paths to PLAT_INCLUDES, but this is discouraged.Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8fSigned-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Fix MISRA defects in extension libsNo functional changes.Change-Id: I2f28f20944f552447ac4e9e755493cd7c0ea1192Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
AArch64: Enable MPAM for lower ELsMemory Partitioning And Monitoring is an Armv8.4 feature that enablesvarious memory system components and resources to define partitions.Software running at vari
AArch64: Enable MPAM for lower ELsMemory Partitioning And Monitoring is an Armv8.4 feature that enablesvarious memory system components and resources to define partitions.Software running at various ELs can then assign themselves to thedesired partition to control their performance aspects.With this patch, when ENABLE_MPAM_FOR_LOWER_ELS is set to 1, EL3 allowslower ELs to access their own MPAM registers without trapping to EL3.This patch however doesn't make use of partitioning in EL3; platforminitialisation code should configure and use partitions in EL3 ifrequired.Change-Id: I5a55b6771ccaa0c1cffc05543d2116b60cbbcdcdCo-authored-by: James Morse <james.morse@arm.com>Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>