ARM64: invalid icache for cortex a35

Different loader can not boot normally in cortex-A35,like rk3308,
because cortex-A35 enable icache in default.

Change-Id: I87f3e8a2539186f3e408fad8ea903c375118b1d9
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
This commit is contained in:
Zhihuan He 2018-07-27 16:55:08 +08:00 committed by Kever Yang
parent 5b580fb9ec
commit 9563e87b41
2 changed files with 13 additions and 0 deletions

View File

@ -78,6 +78,17 @@ lr .req x30
b.eq \el1_label
.endm
/*
* Branch if current processor is a Cortex-A35 core.
*/
.macro branch_if_a35_core, xreg, a35_label
mrs \xreg, midr_el1
lsr \xreg, \xreg, #4
and \xreg, \xreg, #0x00000FFF
cmp \xreg, #0xD04 /* Cortex-A35 MPCore processor. */
b.eq \a35_label
.endm
/*
* Branch if current processor is a Cortex-A57 core.
*/

View File

@ -37,6 +37,8 @@ ENTRY(longjmp)
/* Move the return value in place, but return 1 if passed 0. */
adds x0, xzr, x1
csinc x0, x0, xzr, ne
/* invalid icache for cortex a35 */
branch_if_a35_core x1, __asm_invalidate_icache_all
ret
ENDPROC(longjmp)
.popsection