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

查看:27
本文介绍了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天全站免登陆