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: ckim
Subject: RE: Setting sp_el2 causes trap while in EL3 (arm64 virt, cortex-a72)
Date: Thu, 4 Mar 2021 20:59:48 +0900

Hello, Peter Maydell

Thank you so much! That solved the problem.
(believe it or not, I had vaguely thought about it because EL2 is for 
virtualization but had soon forgotten. 😊)
Helps from experts like you here saves me many days..
Best regards,

Chan Kim

> -----Original Message-----
> From: Peter Maydell <peter.maydell@linaro.org>
> Sent: Thursday, March 4, 2021 6:43 PM
> To: Chan Kim <ckim@etri.re.kr>
> Cc: qemu-discuss <qemu-discuss@nongnu.org>
> Subject: Re: Setting sp_el2 causes trap while in EL3 (arm64 virt, cortex-
> a72)
> 
> 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]