| #
db9ee834 |
| 26-Sep-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
chore(cpus): optimise runtime errata applications
The errata framework has a helper to invoke workarounds, complete with a cpu rev_var check. We can use that directly instead of the apply_cpu_pwr_dw
chore(cpus): optimise runtime errata applications
The errata framework has a helper to invoke workarounds, complete with a cpu rev_var check. We can use that directly instead of the apply_cpu_pwr_dwn_errata to save on some code, as well as an extra branch. It's also more readable.
Also, apply_erratum invocation in cpu files don't need to check the rev_var as that was already done by the cpu_ops dispatcher for us to end up in the file.
Finally, X2 erratum 2768515 only applies in the powerdown sequence, i.e. at runtime. It doesn't achieve anything at reset, so we can label it accordingly.
Change-Id: I02f9dd7d0619feb54c870938ea186be5e3a6ca7b Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
cc4f3838 |
| 27-Aug-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "clean-up-errata-compatibility" into integration
* changes: refactor(cpus): remove cpu specific errata funcs refactor(cpus): directly invoke errata reporter
|
| #
3fb52e41 |
| 14-May-2024 |
Ryan Everett <ryan.everett@arm.com> |
refactor(cpus): remove cpu specific errata funcs
Errata printing is done directly via generic_errata_report. This commit removes the unused \_cpu\()_errata_report functions for all cores, and remove
refactor(cpus): remove cpu specific errata funcs
Errata printing is done directly via generic_errata_report. This commit removes the unused \_cpu\()_errata_report functions for all cores, and removes errata_func from cpu_ops.
Change-Id: I04fefbde5f0ff63b1f1cd17c864557a14070d68c Signed-off-by: Ryan Everett <ryan.everett@arm.com>
show more ...
|
| #
1c20f05c |
| 10-May-2024 |
Ryan Everett <ryan.everett@arm.com> |
refactor(cpus): directly invoke errata reporter
In all non-trivial cases the CPU specific errata functions already call generic_errata_report, this cuts out the middleman by directly calling generic
refactor(cpus): directly invoke errata reporter
In all non-trivial cases the CPU specific errata functions already call generic_errata_report, this cuts out the middleman by directly calling generic_errata_report from print_errata_status.
The CPU specific errata functions (cpu_ops->errata_func) can now be removed from all cores, and this field can be removed from cpu_ops.
Also removes the now unused old errata reporting function and macros.
Change-Id: Ie4a4fd60429aca37cf434e79c0ce2992a5ff5d68 Signed-off-by: Ryan Everett <ryan.everett@arm.com>
show more ...
|
| #
80da8264 |
| 24-Jul-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "us_dsu_pmu" into integration
* changes: feat(tc): enable Last-level cache (LLC) feat(cpus): add sysreg_bitfield_insert_from_gpr macro feat(tc): add DSU PMU node for t
Merge changes from topic "us_dsu_pmu" into integration
* changes: feat(tc): enable Last-level cache (LLC) feat(cpus): add sysreg_bitfield_insert_from_gpr macro feat(tc): add DSU PMU node for tc3 feat(tc): enable el1 access to DSU PMU registers style(tc): remove comment for plat_reset_handler fix(context-mgmt): keep actlr_el2 value in the init context
show more ...
|
| #
ad8b5141 |
| 23-Jul-2024 |
Jagdish Gediya <jagdish.gediya@arm.com> |
feat(cpus): add sysreg_bitfield_insert_from_gpr macro
A macro 'sysreg_bitfield_insert_from_gpr' is introduced for inserting bitfield from a general register.
Change-Id: I7288a13d70d98e23dc7a93287b0
feat(cpus): add sysreg_bitfield_insert_from_gpr macro
A macro 'sysreg_bitfield_insert_from_gpr' is introduced for inserting bitfield from a general register.
Change-Id: I7288a13d70d98e23dc7a93287b04b493ffce9171 Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com> Signed-off-by: Leo Yan <leo.yan@arm.com>
show more ...
|
| #
995eaa63 |
| 08-Aug-2023 |
Bipin Ravi <bipin.ravi@arm.com> |
Merge changes from topic "hm/errata-a710" into integration
* changes: refactor(cpus): convert the Cortex-A710 to use cpu helpers refactor(cpus): convert Cortex-A710 to use the errata framework
Merge changes from topic "hm/errata-a710" into integration
* changes: refactor(cpus): convert the Cortex-A710 to use cpu helpers refactor(cpus): convert Cortex-A710 to use the errata framework refactor(cpus): reorder Cortex-A710 errata by ascending order feat(cpus): make revision procedure call optional
show more ...
|
| #
4d22b0e5 |
| 26-Jun-2023 |
Harrison Mutai <harrison.mutai@arm.com> |
feat(cpus): make revision procedure call optional
For runtime errata, we should avoid generating calls to `cpu_get_rev_var` unless its necessary. Make the path that generates this call parameterized
feat(cpus): make revision procedure call optional
For runtime errata, we should avoid generating calls to `cpu_get_rev_var` unless its necessary. Make the path that generates this call parameterized, and cache the result in a temporary register to allow future calls that go down the alternate path to retrieve the cache CPU revision.
Change-Id: I9882ede76568fbd9a7ccd4caa74eff0c66a7b20e Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
show more ...
|
| #
6c6cc737 |
| 27-Jul-2023 |
Bipin Ravi <bipin.ravi@arm.com> |
Merge changes from topics "hm/errata-refactor", "jc/errata_refactor" into integration
* changes: refactor(cpus): convert the Cortex-x2 to use cpu helpers refactor(cpus): convert the Cortex-x2 to
Merge changes from topics "hm/errata-refactor", "jc/errata_refactor" into integration
* changes: refactor(cpus): convert the Cortex-x2 to use cpu helpers refactor(cpus): convert the Cortex-x2 to use the errata framework refactor(cpus): reorder Cortex-x2 errata by ascending order refactor(cpus): convert the Cortex-A65AE to use the errata framework refactor(cpus): convert the Cortex-A510 to use cpu helpers refactor(cpus): convert the Cortex-A510 to use the errata framework refactor(cpus): reorder Cortex-A510 errata by ascending order chore(fvp): add Aarch32 Cortex-A53 to the build refactor(cpus): add Cortex-A53 errata framework information feat(cpus): add errata framework helpers chore(brcm): include cpu_helpers.S for bl2 build
show more ...
|
| #
445f7b51 |
| 19-Jun-2023 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(cpus): add errata framework helpers
Adding an helper macro for bit field insert(bic) instruction to group all the operations related to it.
Change-Id: Idfd06c7f38faf52090f62b458d2d96c2682f63fe
feat(cpus): add errata framework helpers
Adding an helper macro for bit field insert(bic) instruction to group all the operations related to it.
Change-Id: Idfd06c7f38faf52090f62b458d2d96c2682f63fe Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| #
d2e07436 |
| 15-Jun-2023 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge changes from topic "bk/errata_refactor" into integration
* changes: feat(cpus): add more errata framework helpers docs: document the errata framework
|
| #
94a75ad4 |
| 04-Apr-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(cpus): add more errata framework helpers
Figuring out the naming format of errata is annoying, so add a shorthand for the custom checker functions. Also add some more semantic macros instead of
feat(cpus): add more errata framework helpers
Figuring out the naming format of errata is annoying, so add a shorthand for the custom checker functions. Also add some more semantic macros instead of passing around constants.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: Ibdcf72146738026df4ebd047bfb30790fd4a1053
show more ...
|
| #
0cfa06b2 |
| 31-May-2023 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge changes from topic "bk/errata_refactor" into integration
* changes: feat(cpus): wrappers to propagate AArch32 errata info feat(cpus): add a way to automatically report errata feat(cpus):
Merge changes from topic "bk/errata_refactor" into integration
* changes: feat(cpus): wrappers to propagate AArch32 errata info feat(cpus): add a way to automatically report errata feat(cpus): add a concise way to implement AArch64 errata refactor(cpus): convert print_errata_status to C refactor(cpus): rename errata_report.h to errata.h refactor(cpus): move cpu_ops field defines to a header
show more ...
|
| #
4f748cc4 |
| 27-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(cpus): add a way to automatically report errata
Using the errata framework per-cpu data structure, errata can all be reported automatically through a single standard errata reporter which can r
feat(cpus): add a way to automatically report errata
Using the errata framework per-cpu data structure, errata can all be reported automatically through a single standard errata reporter which can replace the cpu-specific ones.
This reporter can also enforce the ordering requirement of errata.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I7d2d5ac5bcb9d21aed0d560d7d23919a323ffdab
show more ...
|
| #
3f4c1e1e |
| 27-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(cpus): add a concise way to implement AArch64 errata
Errata implementation involves adding a lot of boilerplate to random places with just conventions on how to do them. Copy pasting is the usu
feat(cpus): add a concise way to implement AArch64 errata
Errata implementation involves adding a lot of boilerplate to random places with just conventions on how to do them. Copy pasting is the usual method for doing this. The result is an error-prone and verbose patch that is a nightmare to get through review.
Errata workarounds have a very large degree of similarity - most of them involve setting a bit at reset. As such most of the boilerplate is not strictly necessary. To solve this, add a collection of assembly macros to wrap errata implementations such that only the actual mitigations need to be written. A new erratum mitigation looks something like:
workaround_reset_start cortex_a77, ERRATUM(1925769), ERRATA_A77_1925769 sysreg_bit_set CORTEX_A77_CPUECTLR_EL1, CORTEX_A77_CPUECTLR_EL1_BIT_8 workaround_reset_end cortex_a77, ERRATUM(1925769)
check_erratum_ls cortex_a77, ERRATUM(1925769), CPU_REV(1, 1)
Note, that the long comment on every mitigation is missing. This is on purpose, as this new format includes all of its contents into an easily readable format.
The workaround wrappers add an erratum entry (24 bytes) to a per-cpu data structure which can then be read by a standard reset function to apply all errata automatically. This has the added benefit of collecting all errata TF-A knows about in a central way, which was previously missing. This can then be used at runtime with the errata ABI.
If an erratum doesn't fit this standard definition (eg. the CVE_2022_23960), it can progressively be unwrapped to the old convention. The only differences are that the naming format is slightly more verbose and a call to add_erratum_entry is needed to inform the framework about the errata.
Finally, the internal workaround names change a tiny bit, especially CVEs.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: Iac644f85dcf85b8279b25e83baf1e7d08b253b16
show more ...
|
| #
6bb96fa6 |
| 27-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): rename errata_report.h to errata.h
The ERRATA_XXX macros, used in cpu_helpers.S, are necessary for the check_errata_xxx family of functions. The CPU_REV should be used in the cpu fil
refactor(cpus): rename errata_report.h to errata.h
The ERRATA_XXX macros, used in cpu_helpers.S, are necessary for the check_errata_xxx family of functions. The CPU_REV should be used in the cpu files but for whatever reason the values have been hard-coded so far (at the cost of readability). It's evident this file is not strictly for status reporting.
The new purpose of this file is to make it a one-stop-shop for all things errata.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I1ce22dd36df5aa0bcfc5f2772251f91af8703dfb
show more ...
|
| #
007433d8 |
| 25-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): move cpu_ops field defines to a header
The cpu_macros.S file is loaded with lots of definitions for the cpu_ops structure. However, since they are defined as .equ directives they are
refactor(cpus): move cpu_ops field defines to a header
The cpu_macros.S file is loaded with lots of definitions for the cpu_ops structure. However, since they are defined as .equ directives they are inaccessible for C code. Convert them to #defines, put them into order, refactor them for readability, and extract them to a separate file to make this possible.
This has the benefit of removing some Aarch differences and a lot of duplicate code.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I72861794b6c9131285a9297d5918822ed718b228
show more ...
|
| #
338dbe2f |
| 22-Feb-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes I51c13c52,I3358c51e into integration
* changes: build: always prefix section names with `.` build: communicate correct page size to linker
|
| #
da04341e |
| 14-Feb-2023 |
Chris Kay <chris.kay@arm.com> |
build: always prefix section names with `.`
Some of our specialized sections are not prefixed with the conventional period. The compiler uses input section names to derive certain other section name
build: always prefix section names with `.`
Some of our specialized sections are not prefixed with the conventional period. The compiler uses input section names to derive certain other section names (e.g. `.rela.text`, `.relacpu_ops`), and these can be difficult to select in linker scripts when there is a lack of a delimiter.
This change introduces the period prefix to all specialized section names.
BREAKING-CHANGE: All input and output linker section names have been prefixed with the period character, e.g. `cpu_ops` -> `.cpu_ops`.
Change-Id: I51c13c5266d5975fbd944ef4961328e72f82fc1c Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| #
815abebc |
| 18-Mar-2022 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge changes from topic "spectre_bhb" into integration
* changes: fix(security): apply SMCCC_ARCH_WORKAROUND_3 to A73/A75/A72/A57 fix(security): workaround for CVE-2022-23960 for Cortex-A57, Co
Merge changes from topic "spectre_bhb" into integration
* changes: fix(security): apply SMCCC_ARCH_WORKAROUND_3 to A73/A75/A72/A57 fix(security): workaround for CVE-2022-23960 for Cortex-A57, Cortex-A72 fix(fvp): disable reclaiming init code by default
show more ...
|
| #
9b2510b6 |
| 24-Feb-2022 |
Bipin Ravi <bipin.ravi@arm.com> |
fix(security): apply SMCCC_ARCH_WORKAROUND_3 to A73/A75/A72/A57
This patch applies CVE-2022-23960 workarounds for Cortex-A75, Cortex-A73, Cortex-A72 & Cortex-A57. This patch also implements the new
fix(security): apply SMCCC_ARCH_WORKAROUND_3 to A73/A75/A72/A57
This patch applies CVE-2022-23960 workarounds for Cortex-A75, Cortex-A73, Cortex-A72 & Cortex-A57. This patch also implements the new SMCCC_ARCH_WORKAROUND_3 and enables necessary discovery hooks for Coxtex-A72, Cortex-A57, Cortex-A73 and Cortex-A75 to enable discovery of this SMC via SMC_FEATURES. SMCCC_ARCH_WORKAROUND_3 is implemented for A57/A72 because some revisions are affected by both CVE-2022-23960 and CVE-2017-5715 and this allows callers to replace SMCCC_ARCH_WORKAROUND_1 calls with SMCCC_ARCH_WORKAROUND_3. For details of SMCCC_ARCH_WORKAROUND_3, please refer SMCCCv1.4 specification.
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com> Signed-off-by: John Powell <john.powell@arm.com> Change-Id: Ifa6d9c7baa6764924638efe3c70468f98d60ed7c
show more ...
|
| #
cb2e35b5 |
| 02-Apr-2020 |
Mark Dykes <mardyk01@review.trustedfirmware.org> |
Merge changes from topic "macro-cleanup" into integration
* changes: plat: remove redundant =1 from -D option Pass more -D options to BL*_CPPFLAGS instead of BL*_CFLAGS
|
| #
9cefb4b1 |
| 01-Apr-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
Pass more -D options to BL*_CPPFLAGS instead of BL*_CFLAGS
Commit d5e97a1d2c79 ("Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files") does not have commit 848a7e8ce1d9 ("Build: introduc
Pass more -D options to BL*_CPPFLAGS instead of BL*_CFLAGS
Commit d5e97a1d2c79 ("Build: define IMAGE_AT_EL1 or IMAGE_AT_EL3 globally for C files") does not have commit 848a7e8ce1d9 ("Build: introduce per-BL CPPFLAGS and ASFLAGS") as an ancestor because they were pulled almost at the same time.
This is a follow-up conversion to be consistent with commit 11a3c5ee7325 ("plat: pass -D option to BL*_CPPFLAGS instead of BL*_CFLAGS").
With this change, the command line option, IMAGE_AT_EL3, will be passed to .S files as well.
I remove the definition in include/lib/cpus/aarch64/cpu_macros.S
Otherwise, the following error would happen.
include/lib/cpus/aarch64/cpu_macros.S:29:0: error: "IMAGE_AT_EL3" redefined [-Werror]
Change-Id: I943c8f22356483c2ae3c57b515c69243a8fa6889 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| #
25792ce4 |
| 07-Oct-2019 |
Soby Mathew <soby.mathew@arm.com> |
Merge "Neoverse N1 Errata Workaround 1542419" into integration
|
| #
80942622 |
| 20-Aug-2019 |
laurenw-arm <lauren.wehrmeister@arm.com> |
Neoverse N1 Errata Workaround 1542419
Coherent I-cache is causing a prefetch violation where when the core executes an instruction that has recently been modified, the core might fetch a stale instr
Neoverse N1 Errata Workaround 1542419
Coherent I-cache is causing a prefetch violation where when the core executes an instruction that has recently been modified, the core might fetch a stale instruction which violates the ordering of instruction fetches.
The workaround includes an instruction sequence to implementation defined registers to trap all EL0 IC IVAU instructions to EL3 and a trap handler to execute a TLB inner-shareable invalidation to an arbitrary address followed by a DSB.
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com> Change-Id: Ic3b7cbb11cf2eaf9005523ef5578a372593ae4d6
show more ...
|