From: Blue Swirl <blauwirbel@gmail.com>
To: Artyom Tarasenko <atar4qemu@googlemail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: sparc esp dma endianness [patch-rfc]
Date: Tue, 1 Sep 2009 18:54:24 +0300 [thread overview]
Message-ID: <f43fc5580909010854m7e259849g93e09d7f27f65da1@mail.gmail.com> (raw)
In-Reply-To: <fb8d4f70908311348p4b63220bqb661705b8c3d3f3b@mail.gmail.com>
On Mon, Aug 31, 2009 at 11:48 PM, Artyom
Tarasenko<atar4qemu@googlemail.com> 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]?
next prev parent reply other threads:[~2009-09-01 15:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 20:48 [Qemu-devel] sparc esp dma endianness [patch-rfc] Artyom Tarasenko
2009-09-01 15:54 ` Blue Swirl [this message]
2009-09-01 17:08 ` [Qemu-devel] " Artyom Tarasenko
2009-09-01 17:11 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f43fc5580909010854m7e259849g93e09d7f27f65da1@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=atar4qemu@googlemail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).