From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39663 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMHy2-0003yB-EF for qemu-devel@nongnu.org; Sat, 27 Nov 2010 05:26:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMHx3-00082t-Bn for qemu-devel@nongnu.org; Sat, 27 Nov 2010 05:25:17 -0500 Received: from mail.codesourcery.com ([38.113.113.100]:57145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMHx3-00082J-3g for qemu-devel@nongnu.org; Sat, 27 Nov 2010 05:24:17 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 01/15] exec: introduce endianness swapped mmio Date: Sat, 27 Nov 2010 10:24:00 +0000 References: <1290670555-12575-1-git-send-email-agraf@suse.de> <201011262347.46536.paul@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011271024.01876.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Andreas =?utf-8?q?F=C3=A4rber?= , Alexander Graf , QEMU-devel Developers > > Switching endianness of a CPU generally does not effect the endianness of > > the CPU/peripheral busses. It makes the CPU byteswap accesses before > > they are seen by either memory or devices. > > > > In theory it might be possible to avoid redundant byteswaps if you're > > really clever. In practice you still have to handle the fact that your > > devices are a different endianness to RAM, so it probably doesn't gain > > you a whole lot. > > Sparc64 MMU can also perform byte swapping, there is also a byte > swapping CPU mode and byte swapping access instructions. I think only > the instructions are used (for PCI). Right, but that is (to a large extent) a separate problem from memory mapped peripherals. You still have to handle the case where a single TLB entry covers both ram and a cross-endian device. Paul