All of lore.kernel.org
 help / color / mirror / Atom feed
* Qemu and ARM secure state.
@ 2021-11-03 13:27 Jean-Christophe DUBOIS
  2021-11-04 11:11 ` Peter Maydell
  0 siblings, 1 reply; 14+ messages in thread
From: Jean-Christophe DUBOIS @ 2021-11-03 13:27 UTC (permalink / raw)
  To: qemu-arm

[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]

Hi,

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 
on Qemu 6.0.0 (available as a pre-built package on the latest Ubuntu).

But when I try to run the exact same command line on a Qemu version I 
compile myself from main/latest of github (Qemu 6.1.50), my application 
fails to start.

So a little background:

My application expects to start in "secure" state and supervisor mode 
(which is the default state of i.MX6UL when booting barebone [without 
u-boot]).

 From this state the application tries to get to "non secure" / 
hypervisor mode which imply going to the "secure" / monitor state before 
being able to drop to "non secure" / hypervisor. To do so is runs a "smc 
0" operand (from "secure" / supervisor).

This "smc" instruction is processed "as expected" by Qemu 5.0.50 and 
Qemu 6.0.0 (getting to "secure" / monitor mode) but on Qemu 6.1.50 
(latest from github) it is as if the smc operand was a no-op. It doesn't 
trigger any exception and the processor just get to the next instruction 
after the "smc" instruction. So I am a bit puzzled.

  * Is there something that changed in Qemu (since Qemu 6.0.0) when it
    comes to the "secure" world/state?
  * Is there some additional command line parameters to use (I search in
    the documentation but without luck) to get secure world behavior ?
  * Is it necessary to "adapt" the emulated platform
    (i.MX6UL/mcimx6ul-evk) in some way (it looks like the "virt" machine
    with "secure=on" does work for arm platform)?

Thanks for your help.

JC

[-- Attachment #2: Type: text/html, Size: 2128 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-11-09 19:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-03 13:27 Qemu and ARM secure state Jean-Christophe DUBOIS
2021-11-04 11:11 ` Peter Maydell
2021-11-04 21:11   ` Jean-Christophe DUBOIS
2021-11-06 10:04     ` Jean-Christophe DUBOIS
2021-11-06 13:04       ` Jean-Christophe DUBOIS
2021-11-06 18:11         ` Jean-Christophe DUBOIS
2021-11-08 14:14           ` Alex Bennée
2021-11-08 14:14             ` Alex Bennée
2021-11-08 22:06             ` Jean-Christophe DUBOIS
2021-11-08 14:50           ` Peter Maydell
2021-11-08 22:09             ` Jean-Christophe DUBOIS
2021-11-09 10:55               ` Peter Maydell
2021-11-09 19:06                 ` Jean-Christophe DUBOIS
2021-11-09 19:20                   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.