]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/mips/malta: Fix the malta machine on big endian hosts
authorThomas Huth <thuth@redhat.com>
Thu, 30 Mar 2023 15:26:13 +0000 (17:26 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 7 Jun 2023 09:36:29 +0000 (12:36 +0300)
commit903c71251bdae24aca55a5191ee438b85f936ce6
treedeca14f8d88b12cf7cfac4b86352ea030b0e9c27
parent454d4e438022161c6488753a7b90e4f42dc7abbc
hw/mips/malta: Fix the malta machine on big endian hosts

Booting a Linux kernel with the malta machine is currently broken
on big endian hosts. The cpu_to_gt32 macro wants to byteswap a value
for little endian targets only, but uses the wrong way to do this:
cpu_to_[lb]e32 works the other way round on big endian hosts! Fix
it by using the same ways on both, big and little endian hosts.

Fixes: 0c8427baf0 ("hw/mips/malta: Use bootloader helper to set BAR registers")
Cc: qemu-stable@nongnu.org
Message-Id: <20230330152613.232082-1-thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit dc96009afd8cf2372fa1bbced0bcbcbb2c5d6f1b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/mips/malta.c