qemu-system-aarch64 entering el1 when emulating a53 power up

大兔子大兔子 提交于 2019-12-17 17:10:45

问题


I have downloaded latest qemu Windows version then run below line

qemu-system-aarch64 -M virt,gic_version=3 -cpu cortex-a53 -smp 2 -nographic 
-m 2048 -kernel mybaremetal.axf -s -S

to emulate a dual core cortex-a53, and I can use an aarch64 gdb client to connect to it, at the entry of mybaremetal.axf, I checked the exception level of excution by:

mrs x1, CurrentEL

I always get value 4 in x1, but value 0xc is expected here as in ARM document, it says: On powerup and on reset, the processor enters EL3

anyone knows the reason?


回答1:


QEMU's Cortex-A53 emulation by default only emulates a CPU with EL1, not EL2 or EL3, and therefore (as the architecture requires) we boot up in EL1. If you want a CPU with EL2 or EL3 you need to specifically enable it on the command line, with -machine virtualization=on to enable EL2, and -machine secure=on to enable EL3. Note that EL2 support is very recent and at the moment you'll need to build from upstream git master to get that (it will be in the upcoming QEMU 2.9.0 release).



来源:https://stackoverflow.com/questions/42824706/qemu-system-aarch64-entering-el1-when-emulating-a53-power-up

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!