I have ARMv8 A65.
I'm enabling MMU from uboot. Uboot hang on setting sctlr_el3.M bit to 1.
So my question is Can i enable MMU with EL3?
if not when exactly i need to move to EL1 to enable MMU?
Thanks in advance
Sure you can enable the MMU in EL3, but be sure you have setup all relevant registers and the MMU table correctly.
From where i can get the information what are the register and the MMU table i need to set to enable MMU?
Reference manual would be my first guess.
Yes, you can enable MMU for EL1/EL2/EL3 independently.
Please refer to this source code example about how we enable the MMU for different ELs.
Thanks for the reply. This is very helpful.
I'm able to enable MMU in EL3.
Is there any way to check MMU is enabled and working properly or not? (SCTLR_EL.M bit is 1 i verified any other way)
Provoke an exception (writing to un-mapped memory) .
MMU can be enabled in EL3. Did you get hang right after enable sctlr_el3.m=1?
If yes, you need to check the MMU page table, and SCTLR_EL3.WXN setting.
The MMU page table can be checked with help of armDS https://developer.arm.com/documentation/100953/0529/ds-5-debug-perspectives-and-views/mmu-mpu-view
You should also make sure that the piece of code which enables MMU should be in a va-pa 1:1 flat mapping.