Re: Qemu and ARM secure state.

2021-11-09 Thread Peter Maydell
On Tue, 9 Nov 2021 at 19:06, Jean-Christophe DUBOIS wrote: > So basically the Qemu i.MX7 processor code needs to set psci-conduit to SMC > because we want to be able to boot the Linux kernel directly (without u-boot) > with Qemu emulating the PSCI services when an SMC instruction is triggered. >

Re: Qemu and ARM secure state.

2021-11-09 Thread Jean-Christophe DUBOIS
Le 09/11/2021 à 11:55, Peter Maydell a écrit : On Mon, 8 Nov 2021 at 22:09, Jean-Christophe DUBOIS wrote: OK, so one problem seems to be that PSCI-via-SMC is enabled on i.MX6UL when there is no built in PSCI related function on this processor. According the Linux DTS, i.MX7 (solo and dual) pr

Re: Qemu and ARM secure state.

2021-11-09 Thread Peter Maydell
On Mon, 8 Nov 2021 at 22:09, Jean-Christophe DUBOIS wrote: > OK, so one problem seems to be that PSCI-via-SMC is enabled on i.MX6UL > when there is no built in PSCI related function on this processor. > > According the Linux DTS, i.MX7 (solo and dual) processors have a > somewhat PSCI related "en

Re: Qemu and ARM secure state.

2021-11-08 Thread Jean-Christophe DUBOIS
Le 08/11/2021 à 15:50, Peter Maydell a écrit : On Sat, 6 Nov 2021 at 18:11, Jean-Christophe DUBOIS wrote: One small question/remark: According to the the "Arm Power State Coordinate Interface" (DEN0022D.b) document (chapter 5) PSCI calls can only be issued by "normal world" (EL1 or EL2). The

Re: Qemu and ARM secure state.

2021-11-08 Thread Jean-Christophe DUBOIS
Le 08/11/2021 à 15:14, Alex Bennée a écrit : Jean-Christophe DUBOIS writes: One small question/remark: According to the the "Arm Power State Coordinate Interface" (DEN0022D.b) document (chapter 5) PSCI calls can only be issued by "normal world" (EL1 or EL2). Therefore, should we be adding a

Re: Qemu and ARM secure state.

2021-11-08 Thread Peter Maydell
On Sat, 6 Nov 2021 at 18:11, Jean-Christophe DUBOIS wrote: > > One small question/remark: > > According to the the "Arm Power State Coordinate Interface" (DEN0022D.b) > document (chapter 5) PSCI calls can only be issued by "normal world" (EL1 or > EL2). Therefore, should we be adding a test for

Re: Qemu and ARM secure state.

2021-11-08 Thread Alex Bennée
Jean-Christophe DUBOIS writes: > One small question/remark: > > According to the the "Arm Power State Coordinate Interface" (DEN0022D.b) > document (chapter 5) PSCI calls can only be issued by > "normal world" (EL1 or EL2). Therefore, should we be adding a test for the > current secure state

Re: Qemu and ARM secure state.

2021-11-06 Thread Jean-Christophe DUBOIS
One small question/remark: According to the the "Arm Power State Coordinate Interface" (DEN0022D.b) document (chapter 5) PSCI calls can only be issued by "normal world" (EL1 or EL2). Therefore, should we be adding a test for the current secure state in the arm_is_psci_call() function? This wou

Re: Qemu and ARM secure state.

2021-11-06 Thread Jean-Christophe DUBOIS
So it seems that what is needed is a way to choose on the command line if we want to enable the Qemu built-in PSCI implementation (because we are booting linux for example) or if we really want a bare metal processor (because we are booting a trustedOS like optee). The "virt" platform allows t

Re: Qemu and ARM secure state.

2021-11-06 Thread Jean-Christophe DUBOIS
So, I am trying to understand: Contrary to what I said, In my case the SMC instruction is not really a "no-op" as it sets R0 to -1 (0x) to indicate an unknown PSCI service (by the Qemu internal PSCI handler). With the new code introduced by the "arm: tcg: Adhere to SMCCC 1.3 section

Re: Qemu and ARM secure state.

2021-11-04 Thread Jean-Christophe DUBOIS
Le 04/11/2021 à 12:11, Peter Maydell a écrit : On Wed, 3 Nov 2021 at 13:27, Jean-Christophe DUBOIS wrote: I have a little application that is designed to work on the i.MX6UL processor. I developed it and tested it on the mcimx6ul-evk platform emulated by Qemu. This application used to work "

Re: Qemu and ARM secure state.

2021-11-04 Thread Peter Maydell
On Wed, 3 Nov 2021 at 13:27, Jean-Christophe DUBOIS wrote: > I have a little application that is designed to work on the i.MX6UL processor. > > I developed it and tested it on the mcimx6ul-evk platform emulated by Qemu. > > This application used to work "flawlessly" on Qemu 5.0.50 and is working