From 03ebf409c711e9f2006cedded7dc415dfe566975 Mon Sep 17 00:00:00 2001 From: Bipin Ravi Date: Wed, 19 Oct 2022 10:29:16 -0500 Subject: [PATCH] fix(cpus): fix cpu version check for Neoverse N2, V1 The CPU version check was moved wrongly down in N2 and missing in V1. The patch fixes the issues. Signed-off-by: Bipin Ravi Change-Id: Icb6e5285d6cc97fbe416fe1f0b1ab7afbd8a8809 --- lib/cpus/aarch64/neoverse_n2.S | 7 ++++--- lib/cpus/aarch64/neoverse_v1.S | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/cpus/aarch64/neoverse_n2.S b/lib/cpus/aarch64/neoverse_n2.S index a807b636e..72e5ca816 100644 --- a/lib/cpus/aarch64/neoverse_n2.S +++ b/lib/cpus/aarch64/neoverse_n2.S @@ -429,6 +429,10 @@ func neoverse_n2_reset_func orr x0, x0, #NEOVERSE_N2_CPUACTLR2_EL1_BIT_2 msr NEOVERSE_N2_CPUACTLR2_EL1, x0 + /* Get the CPU revision and stash it in x18. */ + bl cpu_get_rev_var + mov x18, x0 + #if ERRATA_DSU_2313941 bl errata_dsu_2313941_wa #endif @@ -510,9 +514,6 @@ func neoverse_n2_reset_func msr NEOVERSE_N2_CPUECTLR_EL1, x0 #endif - bl cpu_get_rev_var - mov x18, x0 - #if ERRATA_N2_2002655 mov x0, x18 bl errata_n2_2002655_wa diff --git a/lib/cpus/aarch64/neoverse_v1.S b/lib/cpus/aarch64/neoverse_v1.S index 109b725fb..3282fbc6a 100644 --- a/lib/cpus/aarch64/neoverse_v1.S +++ b/lib/cpus/aarch64/neoverse_v1.S @@ -508,8 +508,8 @@ func neoverse_v1_errata_report report_errata ERRATA_V1_1925756, neoverse_v1, 1925756 report_errata ERRATA_V1_1940577, neoverse_v1, 1940577 report_errata ERRATA_V1_1966096, neoverse_v1, 1966096 - report_errata ERRATA_V1_2139242, neoverse_v1, 2139242 report_errata ERRATA_V1_2108267, neoverse_v1, 2108267 + report_errata ERRATA_V1_2139242, neoverse_v1, 2139242 report_errata ERRATA_V1_2216392, neoverse_v1, 2216392 report_errata ERRATA_V1_2294912, neoverse_v1, 2294912 report_errata ERRATA_V1_2372203, neoverse_v1, 2372203 @@ -527,6 +527,10 @@ func neoverse_v1_reset_func msr SSBS, xzr isb + /* Get the CPU revision and stash it in x18. */ + bl cpu_get_rev_var + mov x18, x0 + #if ERRATA_V1_1618635 mov x0, x18 bl errata_neoverse_v1_1618635_wa