]> git.proxmox.com Git - mirror_qemu.git/commit - hw/arm/aspeed.c
hw/arm/aspeed: Use arm_write_bootloader() to write the bootloader
authorCédric Le Goater <clg@kaod.org>
Mon, 24 Apr 2023 15:27:16 +0000 (16:27 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 2 May 2023 14:47:40 +0000 (15:47 +0100)
commit902bba549fc386b4b9805320ed1a2e5b68478bdd
treebae803f9227c1196abbfe22e6c47db02432ec50c
parent0fe43f0abf19bbe24df3dbf0613bb47ed55f1482
hw/arm/aspeed: Use arm_write_bootloader() to write the bootloader

When writing the secondary-CPU stub boot loader code to the guest,
use arm_write_bootloader() instead of directly calling
rom_add_blob_fixed().  This fixes a bug on big-endian hosts, because
arm_write_bootloader() will correctly byte-swap the host-byte-order
array values into the guest-byte-order to write into the guest
memory.

Cc: qemu-stable@nongnu.org
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230424152717.1333930-3-peter.maydell@linaro.org
[PMM: Moved the "make arm_write_bootloader() function public" part
 to its own patch; updated commit message to note that this fixes
 an actual bug; adjust to the API changes noted in previous commit]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/aspeed.c