refactor(cpus): convert Neoverse V2 to use CPU helpers
Convert Neoverse V2 to use CPU helpers, in this case that's
only two spots.
Change-Id: Icd250f92974e8a50c459038de7644a2e68007589
Signed-off-by: Moritz Fischer <moritzf@google.com>
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
diff --git a/lib/cpus/aarch64/neoverse_v2.S b/lib/cpus/aarch64/neoverse_v2.S
index 35dfa37..36ae4de 100644
--- a/lib/cpus/aarch64/neoverse_v2.S
+++ b/lib/cpus/aarch64/neoverse_v2.S
@@ -35,8 +35,7 @@
* The Neoverse-V2 generic vectors are overridden to apply errata
* mitigation on exception entry from lower ELs.
*/
- adr x0, wa_cve_vbar_neoverse_v2
- msr vbar_el3, x0
+ override_vector_table wa_cve_vbar_neoverse_v2
#endif /* IMAGE_BL31 */
workaround_reset_end neoverse_v2, CVE(2022,23960)
@@ -55,10 +54,7 @@
* Enable CPU power down bit in power control register
* ---------------------------------------------------
*/
- mrs x0, NEOVERSE_V2_CPUPWRCTLR_EL1
- orr x0, x0, #NEOVERSE_V2_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
- msr NEOVERSE_V2_CPUPWRCTLR_EL1, x0
-
+ sysreg_bit_set NEOVERSE_V2_CPUPWRCTLR_EL1, NEOVERSE_V2_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
apply_erratum neoverse_v2, ERRATUM(2801372), ERRATA_V2_2801372
isb