From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFNPs-0006c7-Am for qemu-devel@nongnu.org; Mon, 17 Feb 2014 07:35:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFNPl-0003z4-0j for qemu-devel@nongnu.org; Mon, 17 Feb 2014 07:35:20 -0500 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:59752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFNPk-0003yy-Q6 for qemu-devel@nongnu.org; Mon, 17 Feb 2014 07:35:12 -0500 Message-ID: <53020191.20804@ilande.co.uk> Date: Mon, 17 Feb 2014 12:33:21 +0000 From: Mark Cave-Ayland MIME-Version: 1.0 References: <1391877522-17254-1-git-send-email-mark.cave-ayland@ilande.co.uk> <1391877522-17254-2-git-send-email-mark.cave-ayland@ilande.co.uk> <52F79C89.2010204@ilande.co.uk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2 1/2] sun4m: Add Sun CG3 framebuffer and corresponding OpenBIOS FCode ROM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Blue Swirl , Bob Breuer , QEMU Developers , Anthony Liguori , Artyom Tarasenko On 09/02/14 15:33, Peter Maydell wrote: >> It's been a little while since I looked, however this was my interpretation >> of the table 3-12 on p.66 of the SBus specification. While that particular >> table refers to the acknowledgment cycle from the slave back to the master, >> it seems to work here in the same way when transferring between the master >> and the slave. > > It's not that I think your comment is wrong about how SBus does > byte transfers, or that the code is wrong, I just don't think that the > reason for the code is the SBus behaviour; it's the device behaviour. > QEMU abstracts a bus's mechanisms for transferring data into the > MemoryRegion ops, which means that for a byte access you'll > always get called with the byte value in the low 8 bits of the input > argument. This would be true whether SBus passed byte values in > lines 31..28, 7..0 or by sending them one bit at a time on D13. The > relation between a byte write and a word write here is a property > of the device, not the bus. > > (You'll notice that 3-12 allows the slave to send the byte data > in various different lanes depending on which size acknowlegement > it chooses to send. The documentation of what the master does > is on page 53 and actually says you have to send it in two lanes > for a non-aligned address, and certainly QEMU won't do anything > corresponding to that. In any case I don't think it's relevant here.) (goes and thinks about this for a bit) Okay I can agree with that it's more an artifact of the implementation, rather than dependent upon the behaviour of the bus. I'll alter the comment for the next revision which I hope to post to the list over the next day or so. ATB, Mark.