aboutsummaryrefslogtreecommitdiffstats
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/arch/arm64/mmu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/payloads/libpayload/arch/arm64/mmu.c b/payloads/libpayload/arch/arm64/mmu.c
index 86d9fc5ee..da2127d0d 100644
--- a/payloads/libpayload/arch/arm64/mmu.c
+++ b/payloads/libpayload/arch/arm64/mmu.c
@@ -332,9 +332,10 @@ static uint32_t is_mmu_enabled(void)
*/
void mmu_disable(void)
{
+ uint32_t el = get_current_el();
uint32_t sctlr;
- sctlr = raw_read_sctlr_current();
+ sctlr = raw_read_sctlr(el);
sctlr &= ~(SCTLR_C | SCTLR_M | SCTLR_I);
tlbiall_current();
@@ -343,7 +344,7 @@ void mmu_disable(void)
dsb();
isb();
- raw_write_sctlr_current(sctlr);
+ raw_write_sctlr(sctlr, el);
dcache_clean_invalidate_all();
dsb();