From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFNgD-0003K4-18 for qemu-devel@nongnu.org; Mon, 17 Feb 2014 07:52:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFNg5-0000E1-JU for qemu-devel@nongnu.org; Mon, 17 Feb 2014 07:52:12 -0500 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:59777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFNg5-0000D3-CV for qemu-devel@nongnu.org; Mon, 17 Feb 2014 07:52:05 -0500 Message-ID: <53020584.9050004@ilande.co.uk> Date: Mon, 17 Feb 2014 12:50:12 +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> <52F7840F.4090608@ilande.co.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; 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 Crosthwaite Cc: Peter Maydell , "qemu-devel@nongnu.org Developers" , Blue Swirl , Bob Breuer , Anthony Liguori , Artyom Tarasenko On 14/02/14 14:54, Peter Crosthwaite wrote: >> The short answer is "we don't know" because we don't have any documentation. > > Sigh.... This has happened quite a lot lately. > > If the kernel driver has macros, re-use them as much as possible. If > you have a vague idea on whats, what, a few well invented names would > help the device self-documentation. Okay. I now have a revised version which borrows macro names from the Linux and BSD drivers which I think should be more readable. I'll post the revised version to the list shortly. >>> Your hander switch statements stride in 4, are you only doing this for >>> your one exception case of that one-byte big-endian access I commented >>> earlier. >> >> >> Yes, that is correct. >> > > Should you trap misaligned accesses then? Over the weekend I found out that the non-BT458 accesses (addr >= 0x10) are done as byte accesses and so byte accesses do need to be allowed to these registers. My interpretation of reading the SBus documentation is that on real hardware the bus converts accesses for you, and so I don't think a trap would be suitable here. Also I've not found an image (yet) that attempts bad accesses in this way across my OpenBIOS ISO test suite... ATB, Mark.