mirror of https://gitee.com/openkylin/qemu.git
hw/mips/jazz: specify correct endian for dp8393x device
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>
This commit is contained in:
parent
846feac2ae
commit
b1600ff195
|
@ -126,7 +126,7 @@ static void mips_jazz_init(MachineState *machine,
|
||||||
{
|
{
|
||||||
MemoryRegion *address_space = get_system_memory();
|
MemoryRegion *address_space = get_system_memory();
|
||||||
char *filename;
|
char *filename;
|
||||||
int bios_size, n;
|
int bios_size, n, big_endian;
|
||||||
Clock *cpuclk;
|
Clock *cpuclk;
|
||||||
MIPSCPU *cpu;
|
MIPSCPU *cpu;
|
||||||
MIPSCPUClass *mcc;
|
MIPSCPUClass *mcc;
|
||||||
|
@ -158,6 +158,12 @@ static void mips_jazz_init(MachineState *machine,
|
||||||
[JAZZ_PICA61] = {33333333, 4},
|
[JAZZ_PICA61] = {33333333, 4},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef TARGET_WORDS_BIGENDIAN
|
||||||
|
big_endian = 1;
|
||||||
|
#else
|
||||||
|
big_endian = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (machine->ram_size > 256 * MiB) {
|
if (machine->ram_size > 256 * MiB) {
|
||||||
error_report("RAM size more than 256Mb is not supported");
|
error_report("RAM size more than 256Mb is not supported");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
@ -290,6 +296,7 @@ static void mips_jazz_init(MachineState *machine,
|
||||||
dev = qdev_new("dp8393x");
|
dev = qdev_new("dp8393x");
|
||||||
qdev_set_nic_properties(dev, nd);
|
qdev_set_nic_properties(dev, nd);
|
||||||
qdev_prop_set_uint8(dev, "it_shift", 2);
|
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_property_set_link(OBJECT(dev), "dma_mr",
|
||||||
OBJECT(rc4030_dma_mr), &error_abort);
|
OBJECT(rc4030_dma_mr), &error_abort);
|
||||||
sysbus = SYS_BUS_DEVICE(dev);
|
sysbus = SYS_BUS_DEVICE(dev);
|
||||||
|
|
Loading…
Reference in New Issue