From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39812 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PYkN7-0003fo-NP for qemu-devel@nongnu.org; Fri, 31 Dec 2010 14:10:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PYkN3-0003VF-3a for qemu-devel@nongnu.org; Fri, 31 Dec 2010 14:10:38 -0500 Received: from hall.aurel32.net ([88.191.126.93]:60104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PYkN2-0003Tp-UV for qemu-devel@nongnu.org; Fri, 31 Dec 2010 14:10:37 -0500 Date: Fri, 31 Dec 2010 20:10:27 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] Fix curses on big endian hosts Message-ID: <20101231191027.GE3615@hall.aurel32.net> References: <1293658029-10184-1-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On Thu, Dec 30, 2010 at 05:42:43PM +0000, Blue Swirl wrote: > On Wed, Dec 29, 2010 at 9:27 PM, Aurelien Jarno wrote: > > On big endian hosts, the curses interface is unusable: the emulated > > graphic card only displays garbage, while the monitor interface displays > > nothing (or rather only spaces). > > > > The curses interface is waiting for data in native endianness, so > > console_write_ch() should not do any conversion. The conversion should > > be done when reading the video buffer in hw/vga.c. I supposed this > > buffer is in little endian mode, though it's not impossible that the > > data is actually in guest endianness. I currently have no big endian > > guest to way (they all switch to graphic mode immediately). > > First versions of OpenBIOS for Sparc64 used text console, I switched > to VBE frame buffer later. Do you know if it is easy to switch back to text console? That would be an easy way to check what is correct. > I'm also puzzled by the uses of TARGET_WORDS_BIGENDIAN in > hw/vga_template.h. I'd suppose that VGA (especially PCI devices) would > be always little endian, so why the checks? > I also don't explain them. I have tried to remove them, and powerpc and sparc target still seems to work. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net