qemu-system-aarch64在模拟a53通电时进入el1 [英] qemu-system-aarch64 entering el1 when emulating a53 power up

查看:628
本文介绍了qemu-system-aarch64在模拟a53通电时进入el1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了最新的qemu Windows版本,然后在下面的行中运行

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

模拟一个双核cortex-a53,我可以使用aarch64 gdb客户端连接到它,在mybaremetal.axf的入口处,我通过以下方式检查了执行的异常级别:

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

我总是在x1中获得值4,但是在这里应该像ARM文档中那样获得值0xc,它说:上电和复位时,处理器进入EL3

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

有人知道原因吗?

推荐答案

默认情况下,QEMU的Cortex-A53仿真仅仿真具有EL1的CPU,而不仿真具有EL2或EL3的CPU,因此(根据体系结构要求)我们在EL1中启动.如果要使用带有EL2或EL3的CPU,则需要在命令行上专门启用它,使用-machine虚拟化= on启用EL2,使用-machine secure = on启用EL3.请注意,EL2支持是最近才有的,此刻您需要从上游git master进行构建才能获得(它将在即将到来的QEMU 2.9.0版本中提供).

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).

这篇关于qemu-system-aarch64在模拟a53通电时进入el1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆