]> xenbits.xensource.com Git - qemu-xen.git/commit
hw/arm/raspi: Use arm_write_bootloader() to write boot code
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Apr 2023 15:27:17 +0000 (16:27 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 10 May 2023 17:50:38 +0000 (20:50 +0300)
commit975f12aa528d6cab5cc41efebaf05d7eb7296d94
tree7d6b60c1264ee468649ec01b005d0aa8a773f361
parent5477a21350355d557c7dc729782f90c6c71ba9a9
hw/arm/raspi: Use arm_write_bootloader() to write boot code

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: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230424152717.1333930-4-peter.maydell@linaro.org
(cherry picked from commit 0acbdb4c4ab6b0a09f159bae4899b0737cf64242)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/arm/raspi.c