qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting sp_el2 causes trap while in EL3 (arm64 virt, cortex-a72)


From: Peter Maydell
Subject: Re: Setting sp_el2 causes trap while in EL3 (arm64 virt, cortex-a72)
Date: Thu, 4 Mar 2021 09:42:37 +0000

On Thu, 4 Mar 2021 at 07:25, <ckim@etri.re.kr> wrote:
> When I run a bare-metal program on virt, cortex-a72 using command below, 
> (beginning of pflash.img containing .bin file objcopy’ed from .elf)
>
> ${QEMU_DIR}/qemu-system-aarch64 -machine type=virt,gic-version=3,secure=true 
> -cpu cortex-a72 -nographic -smp 1 -m 2048 -drive 
> if=pflash,file=pflash.img,format=raw,readonly=on -s -S

> Why does it cause trap when I set sp_el2 while in EL3?

Because your command line is requesting a CPU with EL3 but not EL2,
and QEMU UNDEFs SP_EL2 if EL2 doesn't exist.
You want 'virtualization=true', which does the same thing for EL2 that
'secure=true' does for EL3 for the virt board.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]