arm-trusted-firmware/lib/cpus
Boyan Karatotev 7791ce21a6 perf(cpus): inline cpu_rev_var checks
We strive to apply errata as close to reset as possible with as few
things enabled as possible. Importantly, the I-cache will not be
enabled. This means that repeated branches to these tiny functions must
be re-fetched all the way from memory each time which has glacial speed.
Cores are allowed to fetch things ahead of time though as long as
execution is fairly linear. So we can trade a little bit of space (3 to
7 instructions per erratum) to keep things linear and not have to go to
memory.

While we're at it, optimise the the cpu_rev_var_{ls, hs, range}
functions to take up less space. Dropping the moves allows for a bit of
assembly magic that produces the same result in 2 and 3 instructions
respectively.

Change-Id: I51608352f23b2244ea7a99e76c10892d257f12bf
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-20 17:28:59 +00:00
..
aarch32 refactor(cpus): remove cpu specific errata funcs 2024-07-26 11:19:52 +01:00
aarch64 perf(cpus): inline cpu_rev_var checks 2025-02-20 17:28:59 +00:00
cpu-ops.mk fix(cpus): workaround for Cortex-X925 erratum 2963999 2025-02-12 09:25:06 -06:00
errata_common.c fix(cpus): workaround for Neoverse-V3 erratum 3701767 2025-02-03 13:57:51 -06:00
errata_report.c refactor(cpus): directly invoke errata reporter 2024-07-26 11:19:52 +01:00