mbox series

[0/3] hw/arm: Replace tswap32() by stl_endian_p()

Message ID 20240930221205.59101-1-philmd@linaro.org
Headers show
Series hw/arm: Replace tswap32() by stl_endian_p() | expand

Message

Philippe Mathieu-Daudé Sept. 30, 2024, 10:12 p.m. UTC
- Expose arm_cpu_code_is_big_endian()
- pass ARMCPU argument to arm_write_bootloader() so we can call
  arm_cpu_code_is_big_endian() on it,
- Replace target specific tswap32() by target agnostic stl_endian_p()

Tested on little & big endian hosts.

Philippe Mathieu-Daudé (3):
  target/arm: Expose arm_cpu_code_is_big_endian() prototype in 'cpu.h'
  hw/arm: Have arm_write_bootloader() take a ARMCPU argument
  hw/arm: Replace tswap32() calls by target agnostic stl_endian_p()

 include/hw/arm/boot.h         |  9 ++++++---
 target/arm/cpu.h              |  7 +++++++
 hw/arm/aspeed.c               |  3 +--
 hw/arm/boot.c                 | 17 ++++++++++-------
 hw/arm/exynos4210.c           |  7 +++----
 hw/arm/npcm7xx.c              |  6 ++++--
 hw/arm/raspi.c                |  4 ++--
 hw/arm/xilinx_zynq.c          |  5 +++--
 linux-user/aarch64/cpu_loop.c |  4 ++--
 linux-user/arm/cpu_loop.c     |  4 ++--
 target/arm/cpu.c              |  6 ++----
 11 files changed, 42 insertions(+), 30 deletions(-)