mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
Merge pull request #1878 from jts-arm/sctlr
Apply stricter speculative load restriction
This commit is contained in:
commit
c0ce16fba3
5 changed files with 19 additions and 11 deletions
|
@ -42,12 +42,13 @@ func bl2_entrypoint
|
|||
stcopr r0, VBAR
|
||||
isb
|
||||
|
||||
/* -----------------------------------------------------
|
||||
* Enable the instruction cache
|
||||
* -----------------------------------------------------
|
||||
/* --------------------------------------------------------
|
||||
* Enable the instruction cache - disable speculative loads
|
||||
* --------------------------------------------------------
|
||||
*/
|
||||
ldcopr r0, SCTLR
|
||||
orr r0, r0, #SCTLR_I_BIT
|
||||
bic r0, r0, #SCTLR_DSSBS_BIT
|
||||
stcopr r0, SCTLR
|
||||
isb
|
||||
|
||||
|
|
|
@ -41,12 +41,14 @@ func bl2_entrypoint
|
|||
|
||||
/* ---------------------------------------------
|
||||
* Enable the instruction cache, stack pointer
|
||||
* and data access alignment checks
|
||||
* and data access alignment checks and disable
|
||||
* speculative loads.
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
mov x1, #(SCTLR_I_BIT | SCTLR_A_BIT | SCTLR_SA_BIT)
|
||||
mrs x0, sctlr_el1
|
||||
orr x0, x0, x1
|
||||
bic x0, x0, #SCTLR_DSSBS_BIT
|
||||
msr sctlr_el1, x0
|
||||
isb
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -41,12 +41,13 @@ func bl2u_entrypoint
|
|||
stcopr r0, VBAR
|
||||
isb
|
||||
|
||||
/* -----------------------------------------------------
|
||||
* Enable the instruction cache
|
||||
* -----------------------------------------------------
|
||||
/* --------------------------------------------------------
|
||||
* Enable the instruction cache - disable speculative loads
|
||||
* --------------------------------------------------------
|
||||
*/
|
||||
ldcopr r0, SCTLR
|
||||
orr r0, r0, #SCTLR_I_BIT
|
||||
bic r0, r0, #SCTLR_DSSBS_BIT
|
||||
stcopr r0, SCTLR
|
||||
isb
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -38,12 +38,14 @@ func bl2u_entrypoint
|
|||
|
||||
/* ---------------------------------------------
|
||||
* Enable the instruction cache, stack pointer
|
||||
* and data access alignment checks
|
||||
* and data access alignment checks and disable
|
||||
* speculative loads.
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
mov x1, #(SCTLR_I_BIT | SCTLR_A_BIT | SCTLR_SA_BIT)
|
||||
mrs x0, sctlr_el1
|
||||
orr x0, x0, x1
|
||||
bic x0, x0, #SCTLR_DSSBS_BIT
|
||||
msr sctlr_el1, x0
|
||||
isb
|
||||
|
||||
|
|
|
@ -63,12 +63,14 @@ func tsp_entrypoint _align=3
|
|||
|
||||
/* ---------------------------------------------
|
||||
* Enable the instruction cache, stack pointer
|
||||
* and data access alignment checks
|
||||
* and data access alignment checks and disable
|
||||
* speculative loads.
|
||||
* ---------------------------------------------
|
||||
*/
|
||||
mov x1, #(SCTLR_I_BIT | SCTLR_A_BIT | SCTLR_SA_BIT)
|
||||
mrs x0, sctlr_el1
|
||||
orr x0, x0, x1
|
||||
bic x0, x0, #SCTLR_DSSBS_BIT
|
||||
msr sctlr_el1, x0
|
||||
isb
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue