[PATCH 0/3] hw/arm: Fix raspi, aspeed bootloaders on big-endian hosts

Peter Maydell posted 3 patches 1 year ago
Failed in applying to current master (apply log)
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Andrew Jeffery <andrew@aj.id.au>, Joel Stanley <joel@jms.id.au>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
include/hw/arm/boot.h | 49 +++++++++++++++++++++++++++++++++
hw/arm/aspeed.c       | 38 +++++++++++++------------
hw/arm/boot.c         | 35 ++++++-----------------
hw/arm/raspi.c        | 64 +++++++++++++++++++++++--------------------
4 files changed, 111 insertions(+), 75 deletions(-)
[PATCH 0/3] hw/arm: Fix raspi, aspeed bootloaders on big-endian hosts
Posted by Peter Maydell 1 year ago
Both the raspi and aspeed boards load their secondary CPU bootloader
code in a way that only works on little-endian hosts. This patchset
fixes that by making them both use the write_bootloader() function
in boot.c, which gets endianness-handling right.

Patches 1 and 2 are essentially a patch from Cédric from a few
months ago:
https://patchew.org/QEMU/20230119123449.531826-1-clg@kaod.org/20230119123449.531826-9-clg@kaod.org/
I've split it into two patches and tweaked it a bit.

These fixes let us run the avocado tests for these boards on
big-endian hosts.

thanks
-- PMM

Cédric Le Goater (2):
  hw/arm/boot: Make write_bootloader() public as arm_write_bootloader()
  hw/arm/aspeed: Use arm_write_bootloader() to write the bootloader

Peter Maydell (1):
  hw/arm/raspi: Use arm_write_bootloader() to write boot code

 include/hw/arm/boot.h | 49 +++++++++++++++++++++++++++++++++
 hw/arm/aspeed.c       | 38 +++++++++++++------------
 hw/arm/boot.c         | 35 ++++++-----------------
 hw/arm/raspi.c        | 64 +++++++++++++++++++++++--------------------
 4 files changed, 111 insertions(+), 75 deletions(-)

-- 
2.34.1


Re: [PATCH 0/3] hw/arm: Fix raspi, aspeed bootloaders on big-endian hosts
Posted by Peter Maydell 1 year ago
On Mon, 24 Apr 2023 at 16:27, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> Both the raspi and aspeed boards load their secondary CPU bootloader
> code in a way that only works on little-endian hosts. This patchset
> fixes that by making them both use the write_bootloader() function
> in boot.c, which gets endianness-handling right.
>
> Patches 1 and 2 are essentially a patch from Cédric from a few
> months ago:
> https://patchew.org/QEMU/20230119123449.531826-1-clg@kaod.org/20230119123449.531826-9-clg@kaod.org/
> I've split it into two patches and tweaked it a bit.
>
> These fixes let us run the avocado tests for these boards on
> big-endian hosts.



Applied to target-arm.next, thanks.

-- PMM
Re: [PATCH 0/3] hw/arm: Fix raspi, aspeed bootloaders on big-endian hosts
Posted by Philippe Mathieu-Daudé 1 year ago
> Cédric Le Goater (2):
>    hw/arm/boot: Make write_bootloader() public as arm_write_bootloader()
>    hw/arm/aspeed: Use arm_write_bootloader() to write the bootloader
> 
> Peter Maydell (1):
>    hw/arm/raspi: Use arm_write_bootloader() to write boot code
> 
>   include/hw/arm/boot.h | 49 +++++++++++++++++++++++++++++++++
>   hw/arm/aspeed.c       | 38 +++++++++++++------------
>   hw/arm/boot.c         | 35 ++++++-----------------
>   hw/arm/raspi.c        | 64 +++++++++++++++++++++++--------------------
>   4 files changed, 111 insertions(+), 75 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH 0/3] hw/arm: Fix raspi, aspeed bootloaders on big-endian hosts
Posted by Cédric Le Goater 1 year ago
On 4/24/23 17:27, Peter Maydell wrote:
> Both the raspi and aspeed boards load their secondary CPU bootloader
> code in a way that only works on little-endian hosts. This patchset
> fixes that by making them both use the write_bootloader() function
> in boot.c, which gets endianness-handling right.
> 
> Patches 1 and 2 are essentially a patch from Cédric from a few
> months ago:
> https://patchew.org/QEMU/20230119123449.531826-1-clg@kaod.org/20230119123449.531826-9-clg@kaod.org/
> I've split it into two patches and tweaked it a bit.
> 
> These fixes let us run the avocado tests for these boards on
> big-endian hosts.

LGTM, the aspeed tests ran fine on a ppc64/debian host (pseries VM).

Tested-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> thanks
> -- PMM
> 
> Cédric Le Goater (2):
>    hw/arm/boot: Make write_bootloader() public as arm_write_bootloader()
>    hw/arm/aspeed: Use arm_write_bootloader() to write the bootloader
> 
> Peter Maydell (1):
>    hw/arm/raspi: Use arm_write_bootloader() to write boot code
> 
>   include/hw/arm/boot.h | 49 +++++++++++++++++++++++++++++++++
>   hw/arm/aspeed.c       | 38 +++++++++++++------------
>   hw/arm/boot.c         | 35 ++++++-----------------
>   hw/arm/raspi.c        | 64 +++++++++++++++++++++++--------------------
>   4 files changed, 111 insertions(+), 75 deletions(-)
>