diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2023-04-24 17:50:53 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-05-02 15:47:41 +0100 |
commit | a4ae17e5ec512862bf73e40dfbb1e7db71f2c1e7 (patch) | |
tree | bc5a014b8d2dfff4d738a4c5b9935b7f5fbf481e /hw/cpu | |
parent | 3e20d90824c262de6887aa1bc52af94db69e4310 (diff) |
hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields
In allwinner-sun8i-emac we just read directly from guest memory into
a host FrameDescriptor struct and back. This only works on
little-endian hosts. Reading and writing of descriptors is already
abstracted into functions; make those functions also handle the
byte-swapping so that TransferDescriptor structs as seen by the rest
of the code are always in host-order, and fix two places that were
doing ad-hoc descriptor reading without using the functions.
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230424165053.1428857-3-peter.maydell@linaro.org
Diffstat (limited to 'hw/cpu')
0 files changed, 0 insertions, 0 deletions