mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 06:19:56 +00:00
Disable speculative loads only if SSBS is supported
Examine the ID_AA64PFR1_EL1 bits 7:4 to see if speculative loads (SSBS) is implemented, before disabling speculative loads. Change-Id: I7607c45ed2889260d22a94f6fd9af804520acf67 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
c33aa45f44
commit
eca6e45336
1 changed files with 22 additions and 2 deletions
|
@ -49,11 +49,31 @@ func check_errata_1043202
|
||||||
b cpu_rev_var_ls
|
b cpu_rev_var_ls
|
||||||
endfunc check_errata_1043202
|
endfunc check_errata_1043202
|
||||||
|
|
||||||
|
/* --------------------------------------------------
|
||||||
|
* Disable speculative loads if Neoverse N1 supports
|
||||||
|
* SSBS.
|
||||||
|
*
|
||||||
|
* Shall clobber: x0.
|
||||||
|
* --------------------------------------------------
|
||||||
|
*/
|
||||||
|
func neoverse_n1_disable_speculative_loads
|
||||||
|
/* Check if the PE implements SSBS */
|
||||||
|
mrs x0, id_aa64pfr1_el1
|
||||||
|
tst x0, #(ID_AA64PFR1_EL1_SSBS_MASK << ID_AA64PFR1_EL1_SSBS_SHIFT)
|
||||||
|
b.eq 1f
|
||||||
|
|
||||||
|
/* Disable speculative loads */
|
||||||
|
msr SSBS, xzr
|
||||||
|
isb
|
||||||
|
|
||||||
|
1:
|
||||||
|
ret
|
||||||
|
endfunc neoverse_n1_disable_speculative_loads
|
||||||
|
|
||||||
func neoverse_n1_reset_func
|
func neoverse_n1_reset_func
|
||||||
mov x19, x30
|
mov x19, x30
|
||||||
|
|
||||||
/* Disables speculative loads */
|
bl neoverse_n1_disable_speculative_loads
|
||||||
msr SSBS, xzr
|
|
||||||
|
|
||||||
/* Forces all cacheable atomic instructions to be near */
|
/* Forces all cacheable atomic instructions to be near */
|
||||||
mrs x0, NEOVERSE_N1_CPUACTLR2_EL1
|
mrs x0, NEOVERSE_N1_CPUACTLR2_EL1
|
||||||
|
|
Loading…
Add table
Reference in a new issue