[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/18] hw/mips/jazz: specify correct endian for dp8393x device
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 17/18] hw/mips/jazz: specify correct endian for dp8393x device |
Date: |
Fri, 2 Jul 2021 15:35:56 +0200 |
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
The MIPS magnum machines are available in both big endian (mips64) and little
endian (mips64el) configurations. Ensure that the dp893x big_endian property
is set accordingly using logic similar to that used for the MIPS malta
machines.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210625065401.30170-11-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/mips/jazz.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index 89ca8bb9107..ee1789183eb 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -126,7 +126,7 @@ static void mips_jazz_init(MachineState *machine,
{
MemoryRegion *address_space = get_system_memory();
char *filename;
- int bios_size, n;
+ int bios_size, n, big_endian;
Clock *cpuclk;
MIPSCPU *cpu;
MIPSCPUClass *mcc;
@@ -158,6 +158,12 @@ static void mips_jazz_init(MachineState *machine,
[JAZZ_PICA61] = {33333333, 4},
};
+#ifdef TARGET_WORDS_BIGENDIAN
+ big_endian = 1;
+#else
+ big_endian = 0;
+#endif
+
if (machine->ram_size > 256 * MiB) {
error_report("RAM size more than 256Mb is not supported");
exit(EXIT_FAILURE);
@@ -290,6 +296,7 @@ static void mips_jazz_init(MachineState *machine,
dev = qdev_new("dp8393x");
qdev_set_nic_properties(dev, nd);
qdev_prop_set_uint8(dev, "it_shift", 2);
+ qdev_prop_set_bit(dev, "big_endian", big_endian > 0);
object_property_set_link(OBJECT(dev), "dma_mr",
OBJECT(rc4030_dma_mr), &error_abort);
sysbus = SYS_BUS_DEVICE(dev);
--
2.31.1
- [PULL 07/18] tests/acceptance: Test Linux on the Fuloong 2E machine, (continued)
- [PULL 07/18] tests/acceptance: Test Linux on the Fuloong 2E machine, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 08/18] g364fb: use RAM memory region for framebuffer, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 09/18] g364fb: add VMStateDescription for G364SysBusState, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 10/18] dp8393x: checkpatch fixes, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 11/18] dp8393x: convert to trace-events, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 12/18] hw/mips/jazz: move PROM and checksum calculation from dp8393x device to board, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 13/18] hw/m68k/q800: move PROM and checksum calculation from dp8393x device to board, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 14/18] dp8393x: remove onboard PROM containing MAC address and checksum, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 15/18] qemu/bitops.h: add bitrev8 implementation, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 16/18] hw/m68k/q800: fix PROM checksum and MAC address storage, Philippe Mathieu-Daudé, 2021/07/02
- [PULL 17/18] hw/mips/jazz: specify correct endian for dp8393x device,
Philippe Mathieu-Daudé <=
- [PULL 18/18] hw/mips/jazz: Map the UART devices unconditionally, Philippe Mathieu-Daudé, 2021/07/02
- Re: [PULL 00/18] MIPS patches for 2021-07-02, Peter Maydell, 2021/07/04