/*******************************************************************************
* TLB maintenance accessor prototypes
******************************************************************************/
-extern void tlbiall(void);
-extern void tlbiallis(void);
extern void tlbialle1(void);
extern void tlbialle1is(void);
extern void tlbialle2(void);
#include <arch_helpers.h>
- .globl tlbiall
- .globl tlbiallis
.globl tlbialle1
.globl tlbialle1is
.globl tlbialle2
.section .text, "ax"
-tlbiall:; .type tlbiall, %function
- mrs x0, CurrentEl
- cmp x0, #(MODE_EL1 << MODE_EL_SHIFT)
- b.eq tlbialle1
- cmp x0, #(MODE_EL2 << MODE_EL_SHIFT)
- b.eq tlbialle2
- cmp x0, #(MODE_EL3 << MODE_EL_SHIFT)
- b.eq tlbialle3
-
-
-tlbiallis:; .type tlbiallis, %function
- mrs x0, CurrentEl
- cmp x0, #(MODE_EL1 << MODE_EL_SHIFT)
- b.eq tlbialle1is
- cmp x0, #(MODE_EL2 << MODE_EL_SHIFT)
- b.eq tlbialle2is
- cmp x0, #(MODE_EL3 << MODE_EL_SHIFT)
- b.eq tlbialle3is
-
-
tlbialle1:; .type tlbialle1, %function
tlbi alle1
dsb sy
TCR_RGN_INNER_WBA | TCR_T0SZ_4GB;
if (GET_EL(current_el) == MODE_EL3) {
tcr |= TCR_EL3_RES1;
- /* Invalidate all TLBs */
+ /* Invalidate EL3 TLBs */
tlbialle3();
} else {
/* Invalidate EL1 TLBs */
write_ttbr0(0);
write_sctlr(0);
- /* Invalidate TLBs of the CurrentEL */
- tlbiall();
-
/* Flush the caches */
dcsw_op_all(DCCISW);