]> git.proxmox.com Git - mirror_qemu.git/commit
hw/arm/boot: Make write_bootloader() public as arm_write_bootloader()
authorCédric Le Goater <clg@kaod.org>
Mon, 24 Apr 2023 15:27:15 +0000 (16:27 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 2 May 2023 14:47:40 +0000 (15:47 +0100)
commit0fe43f0abf19bbe24df3dbf0613bb47ed55f1482
tree10d2496d9cc417a6e3a3e65947212c899a0d29f0
parentd565f58b38424e9a390a7ea33ff7477bab693fda
hw/arm/boot: Make write_bootloader() public as arm_write_bootloader()

The arm boot.c code includes a utility function write_bootloader()
which assists in writing a boot-code fragment into guest memory,
including handling endianness and fixing it up with entry point
addresses and similar things.  This is useful not just for the boot.c
code but also in board model code, so rename it to
arm_write_bootloader() and make it globally visible.

Since we are making it public, make its API a little neater: move the
AddressSpace* argument to be next to the hwaddr argument, and allow
the fixupcontext array to be const, since we never modify it in this
function.

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-2-peter.maydell@linaro.org
[PMM: Split out from another patch by Cédric, added doc comment]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/boot.c
include/hw/arm/boot.h