如何在 QEMU 中模拟 TrustZone? [英] How to emulate TrustZone in QEMU?

查看:30
本文介绍了如何在 QEMU 中模拟 TrustZone?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Qemu 中模拟 TrustZone 功能.我找到了两个似乎可以解释此过程的链接.

I'm trying to emulate TrustZone features in Qemu. I've found two links that seems explain this process.

The First Reference 未附上图片支持 TrustZone 的内核(在哪里可以找到?)

The First Reference doesn't attach the image kernel that supports TrustZone (where can I find it?)

第二个参考 解释了我如何编译内核但它不以第一个网站写的命令行开头,如下

The Second Reference explains how can I compile a kernel but it doesn't start with the command line written in the first website which is as follows

./arm-softmmu/qemu-system-arm -kernel $PATH_TO_KERNEL/zImage -M vexpress-a15 -cpu cortex-a15 -dtb PATH_TO_DTB/vexpress-v2p-ca15-tc1.dtb -m 1024 -append 'console=ttyAMA0,38400n8' -serial stdio -initrd $PATH_TO_INITRD/initrd.img

是否有其他方法可以运行 TrustZone 模拟器?

Is there an alternate way to run a TrustZone emulator?

推荐答案

With OP-TEE(一个开源 TEE)在 QEMU 上运行 TrustZone 非常容易.您拥有从普通用户空间和 Linux 内核到安全世界的整个堆栈运行代码,运行 TEE 本身以及受信任的应用程序.QEMU + OP-TEE 适用于 ARMv7-A 和 ARMv8-A.如果您想在本地 PC 上试用,我鼓励您前往 optee_os/README.md 并按照第 4.1、5(仅与 QEMU 相关)和第 6 节中的说明进行操作.总而言之,我们在 shell 中讨论的命令少于 10 个,您将下载、编译所有源代码以及所有内容在您的 PC 上本地启动并运行.

With OP-TEE (an open source TEE) it's very easy to run TrustZone on QEMU. You have the entire stack running code from normal world user space and Linux kernel down to secure world, running both the TEE itself as well as Trusted Applications. QEMU + OP-TEE works on both ARMv7-A and ARMv8-A. If you want to try it out on a local PC I encourage that you head over to optee_os/README.md and follow the instructions in section 4.1, 5 (only QEMU related) and 6. All in all, we're talking about less than 10 commands in a shell and you'll have all the source code downloaded, compiled and everything up and running locally on your PC.

我写了一篇博文 为什么 QEMU 是进行 TrustZone 开发的不错选择.

I wrote a blog post about why QEMU is a pretty good choice for doing TrustZone development.

这篇关于如何在 QEMU 中模拟 TrustZone?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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