Skip to content

ARM big-endian and setend support

Peter Crosthwaite qemu-arm qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest17 of 18 patches 6 repliesIn review
  2. v117 patches 33 repliesSuperseded

Changes in v2 from the cover letter

Addressed PMM review
Added doc comments to new/changed loader.h APIs

17 of 18 patches are in this archive. The cover letter announces 18.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18linux-user: arm: fix coding style for some linux-user signal functionslinux-user/signal.c+56 -540 replies
2/18linux-user: arm: pass env to get_user_code_*linux-user/main.c+9 -110 replies
3/18target-arm: implement SCTLR.B, drop bswap_codelinux-user/main.c target-arm/arm_ldst.h target-arm/cpu.c +5 more+67 -320 replies
4/18target-arm: cpu: Move cpu_is_big_endian to headertarget-arm/cpu.c target-arm/cpu.h+22 -160 replies
5/18arm: cpu: handle BE32 user-mode as BEtarget-arm/cpu.h+16 -10 replies
6/18linux-user: arm: set CPSR.E/SCTLR.E0E correctly for BE modelinux-user/main.c+2 -10 replies
7/18linux-user: arm: handle CPSR.E correctly in strex emulationlinux-user/main.c target-arm/cpu.h+54 -71 reply
8/18target-arm: implement SCTLR.EEtarget-arm/helper.c+21 -20 replies
9/18target-arm: pass DisasContext to gen_aa32_ld*/st*target-arm/translate.c+142 -1280 replies
10/18target-arm: introduce disas flag for endiannesstarget-arm/translate-a64.c target-arm/translate.c target-arm/translate.h+26 -150 replies
11/18target-arm: a64: Add endianness supporttarget-arm/translate-a64.c+30 -190 replies
12/18target-arm: introduce tbflag for endiannesstarget-arm/cpu.h target-arm/translate-a64.c target-arm/translate.c+9 -20 replies
13/18target-arm: implement setendtarget-arm/helper.h target-arm/op_helper.c target-arm/translate.c+12 -80 replies
15/18loader: add API to load elf headerhw/core/loader.c include/hw/loader.h+68 -01 reply
16/18loader: load_elf(): Add doc commentinclude/hw/loader.h+23 -00 replies
17/18loader: Add data swap option to load-elfhw/alpha/dp264.c hw/arm/armv7m.c hw/arm/boot.c +31 more+81 -460 replies
18/18arm: boot: Support big-endian elfshw/arm/boot.c include/hw/arm/arm.h+92 -101 reply

Reviews trailers per patch

10 of 17 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPeter MaydellAlistair Francis
SeriesR-b
1/18R-b
2/18R-b
3/18
4/18R-b
5/18
6/18
7/18R-b
8/18
9/18R-b
10/18R-b
11/18R-b
12/18
13/18
15/18R-b
16/18
17/18R-b
18/18R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-arm] [PATCH v2 00/18] ARM big-endian and setend support

Hi All,

This patch series adds system-mode big-endian support for ARM. It also implements the setend instruction, and loading of BE binaries even in LE emulation mode.

Based on Paolo's original work.

I have tested all of LE, BE8 and BE32 in both linux-user mode (for regressions) and system mode (BE8 and BE32 are new here). My test application is here, the README gives some example command lines you can run:

https://github.com/pcrost/arm-be-test

Regards,
Peter

Changed since v1:
Addressed PMM review
Added doc comments to new/changed loader.h APIs

Paolo Bonzini (8):
linux-user: arm: fix coding style for some linux-user signal functions
linux-user: arm: pass env to get_user_code_*
target-arm: implement SCTLR.B, drop bswap_code
linux-user: arm: handle CPSR.E correctly in strex emulation
target-arm: pass DisasContext to gen_aa32_ld*/st*
target-arm: introduce disas flag for endianness
target-arm: implement setend
target-arm: implement BE32 mode in system emulation

Peter Crosthwaite (10):
target-arm: cpu: Move cpu_is_big_endian to header
arm: cpu: handle BE32 user-mode as BE
linux-user: arm: set CPSR.E/SCTLR.E0E correctly for BE mode
target-arm: implement SCTLR.EE
target-arm: a64: Add endianness support
target-arm: introduce tbflag for endianness
loader: add API to load elf header
loader: load_elf(): Add doc comment
loader: Add data swap option to load-elf
arm: boot: Support big-endian elfs

 hw/alpha/dp264.c               |   4 +-
 hw/arm/armv7m.c                |   2 +-
 hw/arm/boot.c                  |  93 +++++++++-
 hw/core/loader.c               |  64 ++++++-
 hw/cris/boot.c                 |   2 +-
 hw/i386/multiboot.c            |   3 +-
 hw/lm32/lm32_boards.c          |   4 +-
 hw/lm32/milkymist.c            |   2 +-
 hw/m68k/an5206.c               |   2 +-
 hw/m68k/dummy_m68k.c           |   2 +-
 hw/m68k/mcf5208.c              |   2 +-
 hw/microblaze/boot.c           |   4 +-
 hw/mips/mips_fulong2e.c        |   2 +-
 hw/mips/mips_malta.c           |   2 +-
 hw/mips/mips_mipssim.c         |   2 +-
 hw/mips/mips_r4k.c             |   2 +-
 hw/moxie/moxiesim.c            |   3 +-
 hw/openrisc/openrisc_sim.c     |   3 +-
 hw/pci-host/prep.c             |   2 +-
 hw/ppc/e500.c                  |   2 +-
 hw/ppc/mac_newworld.c          |   5 +-
 hw/ppc/mac_oldworld.c          |   5 +-
 hw/ppc/ppc440_bamboo.c         |   3 +-
 hw/ppc/spapr.c                 |   6 +-
 hw/ppc/virtex_ml507.c          |   3 +-
 hw/s390x/ipl.c                 |   4 +-
 hw/sparc/leon3.c               |   2 +-
 hw/sparc/sun4m.c               |   4 +-
 hw/sparc64/sun4u.c             |   4 +-
 hw/tricore/tricore_testboard.c |   2 +-
 hw/xtensa/sim.c                |   4 +-
 hw/xtensa/xtfpga.c             |   2 +-
 include/hw/arm/arm.h           |   9 +
 include/hw/elf_ops.h           |  22 ++-
 include/hw/loader.h            |  41 ++++-
 linux-user/main.c              |  77 ++++++--
 linux-user/signal.c            | 110 +++++------
 target-arm/arm_ldst.h          |   8 +-
 target-arm/cpu.c               |  21 +--
 target-arm/cpu.h               |  98 +++++++++-
 target-arm/helper.c            |  31 +++-
 target-arm/helper.h            |   1 +
 target-arm/op_helper.c         |   5 +
 target-arm/translate-a64.c     |  56 +++---
 target-arm/translate.c         | 405 ++++++++++++++++++++++++-----------------
 target-arm/translate.h         |   3 +-
 46 files changed, 783 insertions(+), 350 deletions(-)
Signature · 1 line
1.9.1