Zeus: apply the MSR SSBS instruction
authorJohn Tsichritzis <john.tsichritzis@arm.com>
Tue, 13 Aug 2019 09:28:25 +0000 (10:28 +0100)
committerJohn Tsichritzis <john.tsichritzis@arm.com>
Wed, 11 Sep 2019 13:37:42 +0000 (14:37 +0100)
Zeus supports the SSBS mechanism and also the new MSR instruction to
immediately apply the mitigation. Hence, the new instruction is utilised
in the Zeus-specific reset function.

Change-Id: I962747c28afe85a15207a0eba4146f9a115b27e7
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
lib/cpus/aarch64/neoverse_zeus.S

index 3d850137c108b3ac4e6d4eb36c31c5963291508d..44882b45935a2d1f2dcb4535c816f3383d154824 100644 (file)
@@ -46,6 +46,16 @@ func neoverse_zeus_errata_report
 endfunc neoverse_zeus_errata_report
 #endif
 
+func neoverse_zeus_reset_func
+       mov     x19, x30
+
+       /* Disable speculative loads */
+       msr     SSBS, xzr
+
+       isb
+       ret     x19
+endfunc neoverse_zeus_reset_func
+
        /* ---------------------------------------------
         * This function provides Neoverse-Zeus specific
         * register information for crash reporting.
@@ -66,5 +76,5 @@ func neoverse_zeus_cpu_reg_dump
 endfunc neoverse_zeus_cpu_reg_dump
 
 declare_cpu_ops neoverse_zeus, NEOVERSE_ZEUS_MIDR, \
-       CPU_NO_RESET_FUNC, \
+       neoverse_zeus_reset_func, \
        neoverse_zeus_core_pwr_dwn