mbox series

[0/2] arm: allwinner: fix endianness bugs in sdhost and sun8i-emac

Message ID 20230424165053.1428857-1-peter.maydell@linaro.org
Headers show
Series arm: allwinner: fix endianness bugs in sdhost and sun8i-emac | expand

Message

Peter Maydell April 24, 2023, 4:50 p.m. UTC
This patchset fixes bugs in the sd controller and ethernet controller
devices used in the orangepi-pc board model. The bug is the same in
both cases: we read and write a descriptor struct from guest memory
without byte-swapping it, so the code only does the right thing on
a little-endian host.

These fixes (together with some of the others I've sent out earlier
today) are enough to get the BootLinuxConsole.test_arm_orangepi_sd
avocado test passing on an s390x host.

thanks
-- PMM

Peter Maydell (2):
  hw/sd/allwinner-sdhost: Correctly byteswap descriptor fields
  hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields

 hw/net/allwinner-sun8i-emac.c | 22 +++++++++++++++-------
 hw/sd/allwinner-sdhost.c      | 31 ++++++++++++++++++++++++++-----
 2 files changed, 41 insertions(+), 12 deletions(-)

Comments

Peter Maydell May 2, 2023, 10:34 a.m. UTC | #1
On Mon, 24 Apr 2023 at 17:50, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> This patchset fixes bugs in the sd controller and ethernet controller
> devices used in the orangepi-pc board model. The bug is the same in
> both cases: we read and write a descriptor struct from guest memory
> without byte-swapping it, so the code only does the right thing on
> a little-endian host.
>
> These fixes (together with some of the others I've sent out earlier
> today) are enough to get the BootLinuxConsole.test_arm_orangepi_sd
> avocado test passing on an s390x host.
>



Applied to target-arm.next, thanks.

-- PMM