qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] big endian arm.
@ 2017-08-11  9:59 KONRAD Frederic
  2017-08-11 10:18 ` Peter Maydell
  2017-08-11 11:29 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 8+ messages in thread
From: KONRAD Frederic @ 2017-08-11  9:59 UTC (permalink / raw)
  To: Peter Maydell, crosthwaite.peter; +Cc: QEMU Developers

Hi Peters,

I got some strange results since this commit:

commit 9776f636455b6f0d9c14dce112242ed653f954b4
Author: Peter Crosthwaite <crosthwaitepeter@gmail.com>
Date:   Fri Mar 4 11:30:21 2016 +0000

     arm: boot: Support big-endian elfs

     Support ARM big-endian ELF files in system-mode emulation. 
When loading
     an elf, determine the endianness mode expected by the elf, 
and set the
     relevant CPU state accordingly.

     With this, big-endian modes are now fully supported via 
system-mode LE,
     so there is no need to restrict the elf loading to the TARGET
     endianness so the ifdeffery on TARGET_WORDS_BIGENDIAN goes away.

     Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
     Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
     [PMM: fix typo in comments]
     Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

It seems that when I try to load a big endian image on a
Cortex-R5 it gets confused:
  * the instructions are fine it executes some code.
  * GDB address / insns are wrong endianness.
  * in monitor x command is good endianness.
  * the data order seems to be wrong endianness:
    Here is my Hello World: lleHlroW

We used to add a armeb-softmmu/qemu-system-armeb target for the
big endian cpu but it doesn't work anymore as it's double
reversed by the elf endianness (data_swab <= 2).

And I'm surprised we don't set the CPSR_E and SCTLR_EE bits
accordingly?

Thanks,
Fred

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

end of thread, other threads:[~2017-08-11 14:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-11  9:59 [Qemu-devel] big endian arm KONRAD Frederic
2017-08-11 10:18 ` Peter Maydell
2017-08-11 11:03   ` KONRAD Frederic
2017-08-11 11:05     ` Peter Maydell
2017-08-11 11:08       ` KONRAD Frederic
2017-08-11 14:27   ` Philippe Mathieu-Daudé
2017-08-11 11:29 ` Philippe Mathieu-Daudé
2017-08-11 13:53   ` KONRAD Frederic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).