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

查看:48
本文介绍了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,但这里预期值 0xc,如 ARM 文档中所说:在上电和复位时,处理器进入 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,因此(根据架构要求)我们在 EL1 中启动.如果您想要一个带有 EL2 或 EL3 的 CPU,您需要在命令行上专门启用它,使用 -machine virtualization=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天全站免登陆