summaryrefslogtreecommitdiff
path: root/lib/cpus/aarch64/neoverse_n1.S
diff options
context:
space:
mode:
authorPramod Kumar <pramod.kumar@broadcom.com>2020-02-05 11:27:57 +0530
committerPramod Kumar <pramod.kumar@broadcom.com>2020-09-02 21:25:43 +0530
commit942013e1dd57429432cd71cfe121d702e3c52465 (patch)
tree0ba8088ab53680252cc18d3e0707e60efc7429f8 /lib/cpus/aarch64/neoverse_n1.S
parent6f3ee4a8ad47ac4e09dd1dd3931f8ada17ded7d4 (diff)
lib: cpu: Check SCU presence in DSU before accessing DSU registers
The DSU contains system control registers in the SCU and L3 logic to control the functionality of the cluster. If "DIRECT CONNECT" L3 memory system variant is used, there won't be any L3 cache, snoop filter, and SCU logic present hence no system control register will be present. Hence check SCU presence before accessing DSU register for DSU_936184 errata. Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com> Change-Id: I1ffa8afb0447ae3bd1032c9dd678d68021fe5a63
Diffstat (limited to 'lib/cpus/aarch64/neoverse_n1.S')
-rw-r--r--lib/cpus/aarch64/neoverse_n1.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/cpus/aarch64/neoverse_n1.S b/lib/cpus/aarch64/neoverse_n1.S
index d537ed6a8..5a2b5e452 100644
--- a/lib/cpus/aarch64/neoverse_n1.S
+++ b/lib/cpus/aarch64/neoverse_n1.S
@@ -22,6 +22,19 @@
#endif
.global neoverse_n1_errata_ic_trap_handler
+ .global is_scu_present_in_dsu
+
+/*
+ * Check DSU is configured with SCU and L3 unit
+ * 1-> SCU present
+ * 0-> SCU not present
+ */
+func is_scu_present_in_dsu
+ mrs x0, CPUCFR_EL1
+ ubfx x0, x0, #SCU_SHIFT, #1
+ eor x0, x0, #1
+ ret
+endfunc is_scu_present_in_dsu
/* --------------------------------------------------
* Errata Workaround for Neoverse N1 Erratum 1043202.