qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: sparc esp dma endianness [patch-rfc]


From: Blue Swirl
Subject: [Qemu-devel] Re: sparc esp dma endianness [patch-rfc]
Date: Tue, 1 Sep 2009 18:54:24 +0300

On Mon, Aug 31, 2009 at 11:48 PM, Artyom
Tarasenko<address@hidden> wrote:
> Trying to find out what could be the mysterious scsi commands 60, 80,
> c0 and e0, I found out that OBP during dma exchange has problems with
> endianness.
> OBP sends commands like this:
> 12 20 00 00 05 00 or this 12 80 00 00 05 00, but esp.c expects
> that the second byte is the command and the first one is the target.
>
> The following patch solves the problem, but breaks OpenBIOS. The
> question is where do we have wrong endianness? It's not necessarily
> esp, it may be something on the way like dma or mmu. Any ideas?

In addition to OpenBIOS, I'd also think Linux, NetBSD and OpenBSD
should break. Lance needs similar operation, but there the bus is
little endian and one bit configures byte swapping for some of data.

Usually the first byte is bus id. What if you changed (as a hack) here:
    DPRINTF("do_cmd: busid 0x%x\n", buf[0]);
    lun = buf[0] & 7;
    datalen = s->current_dev->send_command(s->current_dev, 0, &buf[1], lun);
&buf[1] to &buf[0]?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]