Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJBvX-0002c1-QE for qemu-devel@nongnu.org; Fri, 11 Dec 2009 15:17:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJBvT-0002Ue-Ne for qemu-devel@nongnu.org; Fri, 11 Dec 2009 15:17:23 -0500 Received: from [199.232.76.173] (port=35562 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJBvT-0002UI-Jt for qemu-devel@nongnu.org; Fri, 11 Dec 2009 15:17:19 -0500 Received: from mx2.seakr.com ([64.207.50.19]:4658 helo=mail-relay.seakr.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJBvS-0000SQ-3d for qemu-devel@nongnu.org; Fri, 11 Dec 2009 15:17:18 -0500 Received: from mx-inside.seakr.com (mx-inside.seakr.com [192.168.100.31]) by mail-relay.seakr.com (8.12.10/8.12.10) with ESMTP id nBBKH4w2004101 for ; Fri, 11 Dec 2009 13:17:06 -0700 Received: from collaborate.seakr.com (collaborate.seakr.com [192.168.100.28]) by mx-inside.seakr.com (Postfix) with ESMTP id 89F724491B for ; Fri, 11 Dec 2009 13:17:04 -0700 (MST) Message-Id: <4B22461602000099000327DE@collaborate.seakr.com> Date: Fri, 11 Dec 2009 13:16:06 -0700 From: "Nick Couchman" Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: [Qemu-devel] Bug in Sparc64/IDE Code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org In working to try to get Sparc64 system emulation developed, we seem to h= ave run into an issue with the IDE code in Qemu. The OpenBIOS folks have= been working quite a few issues with the OpenBIOS code that need to be r= esolved in order to boot 64-bit Solaris kernels correctly, but the most r= ecent issue indicates that the IDE code for the Sparc64 emulator is readi= ng from and writing to the wrong memory locations. The end result is the= following output when trying to boot off an ISO image in Qemu: 0 > boot cdrom=20 [sparc64] Booting file 'cdrom' with parameters '' Not a bootable ELF image Not a Linux kernel image Not a bootable a.out image Loading FCode image... Loaded 7084 bytes entry point is 0x4000 Evaluating FCode... qemu: unsupported keyboard cmd=3D0x57 sSegmentation fault This is using the "-nographic" option - the results reported with graphic= s tend to be more interesting, with lots of garbage being written to the = VGA device. Turning on IDE debugging in Qemu and then trying to boot yie= lds a lot of output - the last few lines look like this: ide: write control addr=3D0x682 val=3D02 IDE: write addr=3D0x601 val=3D0x00 IDE: write addr=3D0x602 val=3D0x00 IDE: write addr=3D0x603 val=3D0x00 IDE: write addr=3D0x604 val=3D0x08 IDE: write addr=3D0x605 val=3D0x00 IDE: write addr=3D0x606 val=3D0x00 IDE: write addr=3D0x607 val=3D0xa0 ide: CMD=3Da0 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read addr=3D0x607 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read status addr=3D0x682 val=3D58 ide: read addr=3D0x607 val=3D58 ide: read addr=3D0x602 val=3D02 ide: read addr=3D0x604 val=3D08 ide: read addr=3D0x605 val=3D00 ide: read status addr=3D0x682 val=3D50 ide: read status addr=3D0x682 val=3D50 ide: read status addr=3D0x682 val=3D50 ide: read status addr=3D0x682 val=3D50 ide: read status addr=3D0x682 val=3D50 ide: read status addr=3D0x682 val=3D50 ide: read status addr=3D0x682 val=3D50 ide: read status addr=3D0x682 val=3D50 ide: read addr=3D0x607 val=3D50 ide: read status addsIDE: write addr=3D0x502 val=3D0x9a IDE: write addr=3D0x503 val=3D0xa9 IDE: write addr=3D0x504 val=3D0x06 IDE: write addr=3D0x505 val=3D0xed IDE: write addr=3D0x506 val=3D0x14 IDE: write addr=3D0x507 val=3D0xcd ide: CMD=3Dcd ide: write control addr=3D0x582 val=3D97 IDE: write addr=3D0x602 val=3D0xba IDE: write addr=3D0x603 val=3D0xae IDE: write addr=3D0x604 val=3D0xce IDE: write addr=3D0x605 val=3D0xb6 IDE: write addr=3D0x606 val=3D0x58 IDE: write addr=3D0x607 val=3D0x57 ide: CMD=3D57 ide: write control addr=3D0x682 val=3D70 bmdma_cmd_writeb: 0x00000054 bmdma: writeb 0x701 : 0xd7 bmdma: writeb 0x702 : 0x79 bmdma: writeb 0x703 : 0xfe bmdma_addr_writew: 0x0000ddef bmdma_addr_writew: 0x0000b12b bmdma_cmd_writeb: 0x000000da bmdma: writeb 0x709 : 0x95 Segmentation fault On the OpenBIOS list it was pointed out that the addresses for the IDE co= ntrol seem to be in the 0x6nn range (0x602 to 0x607 with the register at = 0x682), but then toward the end the addresses switch over to the 0x5nn ra= nge, with the IDE code trying to write to locations 0x502 through 0x507 a= nd the register at 0x582. This seems to be what causes the segmentation = fault and the garbage written to the screen, including the error about an= invalid keyboard command. Any help in tracking down the error would be = greatly appreciated, and I'm happy to do any debugging/testing necessary! Thanks! -Nick --------=0D This e-mail may contain confidential and privileged material for the sole= use of the intended recipient. If this email is not intended for you, o= r you are not responsible for the delivery of this message to the intende= d recipient, please note that this message may contain SEAKR Engineering = (SEAKR) Privileged/Proprietary Information. In such a case, you are stri= ctly prohibited from downloading, photocopying, distributing or otherwise= using this message, its contents or attachments in any way. If you have= received this message in error, please notify us immediately by replying= to this e-mail and delete the message from your mailbox. Information co= ntained in this message that does not relate to the business of SEAKR is = neither endorsed by nor attributable to SEAKR.