On 16/5/25 16:06, Thomas Huth wrote:
On 16/05/2025 17.00, Philippe Mathieu-Daudé wrote:
On 15/5/25 15:20, Thomas Huth wrote:
From: Thomas Huth <th...@redhat.com>
Both machines were added with little-endian in mind only (the
"endianness" CPU property was hard-wired to "true", see commits
133d23b3ad1 and a88bbb006a52), so the variants that showed up
on the big endian target likely never worked. We deprecated these
non-working machine variants two releases ago, and so far nobody
complained, so it should be fine now to disable them. Hard-wire
the machines to little endian now.
Signed-off-by: Thomas Huth <th...@redhat.com>
---
docs/about/deprecated.rst | 6 ------
docs/about/removed-features.rst | 9 +++++++++
hw/microblaze/petalogix_ml605_mmu.c | 15 ++++-----------
hw/microblaze/xlnx-zynqmp-pmu.c | 7 +------
4 files changed, 14 insertions(+), 23 deletions(-)
\o/
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Thanks!
I won't be able to look at the rest of this series until in 10 days,
feel free to merge if necessary.
Maybe you could at least provide a quick comment on the idea of
controlling the endianness of the s3adsp1800 machine via a machine
property? (since your original idea was to do it via different machine
names instead ... does the property sound acceptable to you?)
IIRC my goal was to remove TARGET_BIG_ENDIAN from hw/, but I was
aiming for heterogeneous binary, trying to not introduce any changes
for users. Now we are only considering "single binary" and we have
the TargetInfo API, so things are simpler.
Using the TargetInfo API, that would be:
-- >8 --
@@ -26,7 +26,8 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "qapi/error.h"
+#include "qemu/target-info.h"
#include "hw/sysbus.h"
#include "net/net.h"
#include "hw/block/flash.h"
@@ -71,13 +83,16 @@ petalogix_s3adsp1800_init(MachineState *machine)
MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
qemu_irq irq[32];
MemoryRegion *sysmem = get_system_memory();
- EndianMode endianness = TARGET_BIG_ENDIAN ? ENDIAN_MODE_BIG
- : ENDIAN_MODE_LITTLE;
+ EndianMode endianness = psms->endianness;
+
+ if (endianness == ENDIAN_MODE_UNSPECIFIED) {
+ endianness = target_endian_mode();
+ }
---
(NB target_endian_mode is not on the list yet)