最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Why does Qemu enter different exception levels when loading image files of different formats (elf vs. bin)? - Stack Overflow

programmeradmin1浏览0评论

I use qemu to emulate a Raspberry Pi 4b , then I found when I load elf image , the exception level is EL3 , but when I load bin file , the exception level is EL2 .

Why do different image file formats result in different exception levels?

qemu-system-aarch64 -nographic -kernel benos.bin -S -s


.section ".text.boot"

.globl _start
_start:
    mrs x0, mpidr_el1       
    and x0, x0,#0xFF
    cbz x0, master
    b   proc_hang

proc_hang: 
    b   proc_hang

master:
    bl getel

.globl getel
getel:
    mrs x0, currentel
    lsr x0, x0, 2
    and x0, x0, 0x3
    ret

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论