Received: from eggs.gnu.org ([2001:4830:134:3::10]:50111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8uYn-0001yk-6O for qemu-devel@nongnu.org; Wed, 07 Jan 2015 12:38:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8uYj-0003o3-5Z for qemu-devel@nongnu.org; Wed, 07 Jan 2015 12:38:21 -0500 Received: from mail-qg0-x235.google.com ([2607:f8b0:400d:c04::235]:54720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8uYj-0003nz-12 for qemu-devel@nongnu.org; Wed, 07 Jan 2015 12:38:17 -0500 Received: by mail-qg0-f53.google.com with SMTP id l89so1169531qgf.26 for ; Wed, 07 Jan 2015 09:38:16 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <54AD0BDE.7020200@redhat.com> Date: Wed, 7 Jan 2015 12:38:13 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <5C75CA70-CE86-4565-BA58-4B5DC868E7D2@gmail.com> References: <3154DC97-3B67-4DBF-BD02-C64E4A9591E3@gmail.com> <77FFD738-1433-4B15-8522-C1EA965B774B@gmail.com> <122C8E58-48F5-4A54-B0AF-A826492D73B6@gmail.com> <4A37A1CE-EE81-4408-A13E-8A4C7C91D498@gmail.com> <54AC45AE.5020804@redhat.com> <54AD0BDE.7020200@redhat.com> Subject: Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , qemu-devel qemu-devel On Jan 7, 2015, at 5:35 AM, Paolo Bonzini wrote: >=20 >=20 > On 06/01/2015 22:33, G 3 wrote: >>=20 >> 00:01.0 VGA compatible controller: Technical Corp. Device 1111 (rev >> 02) (prog-if 00 [VGA controller]) >> Subsystem: Qumranet, Inc. Device 1100 >> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- >> ParErr- Stepping- SERR- FastB2B- DisINTx- >> Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=3Dfast = >TAbort- >> SERR- > Region 0: Memory at 80000000 (32-bit, prefetchable) [size=3D16M]= >> Region 2: Memory at 81000000 (32-bit, non-prefetchable) = [size=3D4K] >> Expansion ROM at 81010000 [disabled] [size=3D64K] >=20 > Yes. So this is "-vga std", not "-vga cirrus". In this case, it = might > make sense to add a property to the VGA that forces an endianness over > the other, and then to specify that property in order to use Mac OS X. >=20 > However, you should specify it whatever the host endianness and the = host > OS is. If this is not the case, you're just exchanging a bug with = another. >=20 > If something >=20 > a) works with Linux host but not with Mac OS X host >=20 > b) and works with Linux guest but not with Mac OS X guest >=20 > the only logical explanation is that you have more than one bug, and > they somehow cancel each other. The fix is to find and stomp all the > bugs, not to introduce an option for the cases that end up buggy. I was told there is a frame buffer byte swap in Linux, that is why the = colors appear correctly. But if that happened all the time, then Linux = guest would have the color problem. Maybe we should all makes theories and guest where to look. Here is my = theories so far: - Incorrect OpenBIOS settings - VGA isn't correctly supported in Mac OS X - Vague standards that didn't take endianness of processor into account - Some function of VGA not implemented or not implemented fully - Some assumption about writing to IO ports that is true on real Macs = but not implemented on QEMU If anyone wants to add to the list, please do so. -Incorrect OpenBIOS settings If this is true, it wouldn't be the first time OpenBIOS issues have = effected Mac OS X. - VGA isn't correctly supported in Mac OS X: If there is someone out there that has some early VGA PCI card, and a = PowerMac that runs Mac OS X, it would help a lot to let us know if it = displays colors correctly. I am pretty sure all such cards were made for = PC's only, so this would probably not work. I'm surprised Apple = implemented a generic VGA driver in the first place.=20 - Vague standards that didn't take endianness of processor into account Never seen any mention of endianness of pixel data in the VGA standards. = It was probably just assumed little endian. - Some function of VGA not implemented or not implemented fully This could be a possibility, but not sure about it.=20 - Some assumption about writing to IO ports that is true on real Macs = but not implemented on QEMU This is just a guess for now. It would take a lot of memory poking to = prove this.=20