Hi,
I am trying to enable stage-2 translation for Armv8 aarch32, cortex-a53. If I set HCR.VM=1(enable stage-2 translation) it will crash. I suspect it does not set up stage-2 translation table. But when I read the Arm Architecture Reference Manual, I cannot find the pseudo-code for creating such table(only find pictures).
So could anyone provide some code or pseudo-code for creating stage-2 translation table?
You could have a look at hafnium project, which is type1 hypervisor
https://git.trustedfirmware.org/hafnium/hafnium.git/tree/src/arch/aarch64/mm.c?id=66378c0f802a60937ddd421e4910037113ced4b0