arm-trusted-firmware/include/lib
Boyan Karatotev 2590e819eb perf(mpmm): greatly simplify MPMM enablement
MPMM is a core-specific microarchitectural feature. It has been present
in every Arm core since the Cortex-A510 and has been implemented in
exactly the same way. Despite that, it is enabled more like an
architectural feature with a top level enable flag. This utilised the
identical implementation.

This duality has left MPMM in an awkward place, where its enablement
should be generic, like an architectural feature, but since it is not,
it should also be core-specific if it ever changes. One choice to do
this has been through the device tree.

This has worked just fine so far, however, recent implementations expose
a weakness in that this is rather slow - the device tree has to be read,
there's a long call stack of functions with many branches, and system
registers are read. In the hot path of PSCI CPU powerdown, this has a
significant and measurable impact. Besides it being a rather large
amount of code that is difficult to understand.

Since MPMM is a microarchitectural feature, its correct placement is in
the reset function. The essence of the current enablement is to write
CPUPPMCR_EL3.MPMM_EN if CPUPPMCR_EL3.MPMMPINCTL == 0. Replacing the C
enablement with an assembly macro in each CPU's reset function achieves
the same effect with just a single close branch and a grand total of 6
instructions (versus the old 2 branches and 32 instructions).

Having done this, the device tree entry becomes redundant. Should a core
that doesn't support MPMM arise, this can cleanly be handled in the
reset function. As such, the whole ENABLE_MPMM_FCONF and platform hooks
mechanisms become obsolete and are removed.

Change-Id: I1d0475b21a1625bb3519f513ba109284f973ffdf
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-25 08:50:45 +00:00
..
bl_aux_params chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
cpus perf(mpmm): greatly simplify MPMM enablement 2025-02-25 08:50:45 +00:00
dice feat(dice): add typedefs from the Open DICE repo 2024-03-06 15:44:55 +01:00
el3_runtime Merge changes from topic "bk/errata_speed" into integration 2025-02-24 17:24:53 +01:00
extensions fix(spe): add a psb before updating context and remove context saving 2024-12-16 15:14:30 +00:00
fconf perf(mpmm): greatly simplify MPMM enablement 2025-02-25 08:50:45 +00:00
gpt_rme feat(gpt): statically allocate bitlocks array 2025-02-11 15:10:49 +00:00
hob feat(lib): introduce Hob creation library 2024-12-06 13:26:31 +00:00
libc fix(libc): remove __Nonnull type specifier 2025-02-16 23:05:07 +00:00
libfdt chore(libfdt): update header files to v1.7.0 tag 2023-11-06 21:13:22 +00:00
pmf fix(smc): correctly find pmf version 2024-05-08 20:36:04 -05:00
psa feat(psa): add interface with RSE for retrieving entropy 2025-02-04 10:26:02 +00:00
psci chore(docs): drop the "wfi" from pwr_domain_pwr_down_wfi 2025-02-03 14:29:47 +00:00
xlat_mpu chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
xlat_tables fix(xlat): correct attribute retrieval in a RME enabled system 2024-07-22 14:14:33 +02:00
zlib chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
bakery_lock.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
bootmarker_capture.h feat(fvp): capture timestamps in bl stages 2023-09-07 23:38:43 +02:00
cassert.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
coreboot.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
debugfs.h fix(smc): correctly find pmf version 2024-05-08 20:36:04 -05:00
mmio.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
object_pool.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
optee_utils.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
runtime_instr.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
semihosting.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
smccc.h feat(smccc): add vendor specific el3 id 2024-05-06 09:42:11 -05:00
spinlock.h feat(locks): add bitlock 2024-04-15 12:14:16 +01:00
transfer_list.h feat(handoff): transfer entry ID for TPM event log 2025-01-06 07:18:39 -08:00
utils.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
utils_def.h refactor(lib): rename GENMASK parameters 2024-06-26 20:54:47 +03:00