On Thu, 4 Mar 2021 at 07:25, <c...@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