ARM: OMAP2+: Fix l2_inv_api_params for rodata
commit 0a0b13275558c32bbf6241464a7244b1ffd5afb3 upstream.
We don't want to write to .text, so let's move l2_inv_api_params
to .data and access it via a pointer.
Cc: Kees Cook <keescook@chromium.org>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Tero Kristo <t-kristo@ti.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Fixes: 1e6b48116a
("ARM: mm: allow non-text sections to be
non-executable")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ec776d670e
commit
98b3f17a72
1 changed files with 9 additions and 3 deletions
|
@ -427,12 +427,14 @@ skipl2dis:
|
||||||
and r1, #0x700
|
and r1, #0x700
|
||||||
cmp r1, #0x300
|
cmp r1, #0x300
|
||||||
beq l2_inv_gp
|
beq l2_inv_gp
|
||||||
|
adr r0, l2_inv_api_params_offset
|
||||||
|
ldr r3, [r0]
|
||||||
|
add r3, r3, r0 @ r3 points to dummy parameters
|
||||||
mov r0, #40 @ set service ID for PPA
|
mov r0, #40 @ set service ID for PPA
|
||||||
mov r12, r0 @ copy secure Service ID in r12
|
mov r12, r0 @ copy secure Service ID in r12
|
||||||
mov r1, #0 @ set task id for ROM code in r1
|
mov r1, #0 @ set task id for ROM code in r1
|
||||||
mov r2, #4 @ set some flags in r2, r6
|
mov r2, #4 @ set some flags in r2, r6
|
||||||
mov r6, #0xff
|
mov r6, #0xff
|
||||||
adr r3, l2_inv_api_params @ r3 points to dummy parameters
|
|
||||||
dsb @ data write barrier
|
dsb @ data write barrier
|
||||||
dmb @ data memory barrier
|
dmb @ data memory barrier
|
||||||
smc #1 @ call SMI monitor (smi #1)
|
smc #1 @ call SMI monitor (smi #1)
|
||||||
|
@ -466,8 +468,8 @@ skipl2dis:
|
||||||
b logic_l1_restore
|
b logic_l1_restore
|
||||||
|
|
||||||
.align
|
.align
|
||||||
l2_inv_api_params:
|
l2_inv_api_params_offset:
|
||||||
.word 0x1, 0x00
|
.long l2_inv_api_params - .
|
||||||
l2_inv_gp:
|
l2_inv_gp:
|
||||||
/* Execute smi to invalidate L2 cache */
|
/* Execute smi to invalidate L2 cache */
|
||||||
mov r12, #0x1 @ set up to invalidate L2
|
mov r12, #0x1 @ set up to invalidate L2
|
||||||
|
@ -516,6 +518,10 @@ control_mem_rta:
|
||||||
l2dis_3630:
|
l2dis_3630:
|
||||||
.word 0
|
.word 0
|
||||||
|
|
||||||
|
.data
|
||||||
|
l2_inv_api_params:
|
||||||
|
.word 0x1, 0x00
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Internal functions
|
* Internal functions
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue