From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJQvu-0007OJ-1y for qemu-devel@nongnu.org; Sat, 12 Dec 2009 07:18:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJQvm-0007LU-AS for qemu-devel@nongnu.org; Sat, 12 Dec 2009 07:18:42 -0500 Received: from [199.232.76.173] (port=39984 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJQvj-0007L6-Ss for qemu-devel@nongnu.org; Sat, 12 Dec 2009 07:18:36 -0500 Received: from mail-bw0-f212.google.com ([209.85.218.212]:51930) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJQvj-0003u3-17 for qemu-devel@nongnu.org; Sat, 12 Dec 2009 07:18:35 -0500 Received: by bwz4 with SMTP id 4so1138014bwz.2 for ; Sat, 12 Dec 2009 04:18:33 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <4B22461602000099000327DE@collaborate.seakr.com> Date: Sat, 12 Dec 2009 15:18:33 +0300 Message-ID: Subject: Re: [Qemu-devel] Bug in Sparc64/IDE Code From: Igor Kovalenko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, Nick Couchman On Sat, Dec 12, 2009 at 1:12 PM, Blue Swirl wrote: > On Fri, Dec 11, 2009 at 10:16 PM, Nick Couchman = wrote: >> In working to try to get Sparc64 system emulation developed, we seem to = have run into an issue with the IDE code in Qemu. =A0The OpenBIOS folks hav= e been working quite a few issues with the OpenBIOS code that need to be re= solved in order to boot 64-bit Solaris kernels correctly, but the most rece= nt issue indicates that the IDE code for the Sparc64 emulator is reading fr= om and writing to the wrong memory locations. =A0The end result is the foll= owing output when trying to boot off an ISO image in Qemu: > >> 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 > > I can't reproduce this with milaX 0.3.1, QEMU git HEAD and OpenBIOS > svn r644. The bug could be that the BMDMA address may need BE to LE > conversion, or OpenBIOS could just clobber BMDMA registers with > garbage (the DMA address candidates 0xddefb12b and 0xb12bddef do not > look valid). > > Another possibility is that the PCI host bridge should have an IOMMU > which is not implemented yet, but I doubt we are at that stage. > > Could you run QEMU in a GDB session and send the backtrace from the segfa= ult? > There seems to be an issue with pci_from_bm cast: bm->unit is not assigned anywhere in the code so it is zero for second unit, and pci_from_bm returns wrong address. Crash happens writing to address mapped for second unit. --=20 Kind regards, Igor V. Kovalenko