From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LN8k5-0007u1-BU for qemu-devel@nongnu.org; Wed, 14 Jan 2009 11:37:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LN8k4-0007rR-3h for qemu-devel@nongnu.org; Wed, 14 Jan 2009 11:37:20 -0500 Received: from [199.232.76.173] (port=52196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LN8k3-0007r5-T7 for qemu-devel@nongnu.org; Wed, 14 Jan 2009 11:37:19 -0500 Received: from hall.aurel32.net ([88.191.82.174]:44886) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LN8k3-0000Xy-C7 for qemu-devel@nongnu.org; Wed, 14 Jan 2009 11:37:19 -0500 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LN8k1-0002x2-PC for qemu-devel@nongnu.org; Wed, 14 Jan 2009 17:37:17 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1LN8k0-00022q-SF for qemu-devel@nongnu.org; Wed, 14 Jan 2009 17:37:16 +0100 Date: Wed, 14 Jan 2009 17:37:16 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] Small powerpc system emulation problem with linux Message-ID: <20090114163716.GA15397@volta.aurel32.net> References: <20090114162140.GI29175@csclub.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20090114162140.GI29175@csclub.uwaterloo.ca> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, Jan 14, 2009 at 11:21:40AM -0500, Lennart Sorensen wrote: > I did a subversion checkout of qemu last week and built it, and no > problems with that part so far. > > I noticed it now supports using openbios-ppc32 instead of openhackware, > so I went looking for that and did a subversion checkout of openbios > and the fcode tools. I used the openbios-elf ppc object as openbios-ppc32 > and qemu seems quite happy with that. First of all, please retry with the current SVN, a lot of things have been fixed. > I then booted a debian 4.0 (etch) install cd, but the network interface > didn't work (it gave a dumb error about the PCI bar 0 which was clearly > wrong). I then grabbed a daily build of debian 5.0 (lenny) instead, and > booted that, and then networking worked fine. I installed debian, and > had no problems until I hit installing the bootloader. This is a known problem, looks like there is a problem with IO ports. You can workaround the problem by using an other card, like e1000. > Debian tried to isntall the quik boot loader for oldworld mac's since > that is what /proc/cpuinfo in linux claims to see, even though powermac > g3 blue&white boxes (I have one here) is newworld, as are all powermac's > using openfirmware 3. newworld systems should use yaboot, but of course > the installer had not setup the partitions for yaboot since it didn't > see a newworld machine, and yaboot's installer refused to run since it > wasn't a newworld machine. quik boot's installer also refused to run > since it wasn't a supported oldworld machine either. The machine that is emulated is actually a g3beige, that is an OldWorld machine. Installing quik on such machine is correct. Note that the current version of debian installer installs a totally buggy quik.conf file. It has to be fixed manually. > So I managed to lie to yaboot enough to convince it to run the ofpath > tools and such as if it was a newworld machine, and that all worked > fine, other than failing to access some part of nvram as far as I can > tell. > > On rebooting I found that yaboot loaded from the disk, but failed to > load the system. Turns out debian uses an ancient version of yaboot > that doesn't correctly work on some newer systems, and has issues with > initrd images. I found a newer binary for yaboot and replaced it in the > bootstrap partition using a loopback mount. After doing this, it > finally loaded and booted. I now have a working debian system on qemu. Quik is now working correctly with the current SVN. > So the main problems seem to be that the openbios firmware doesn't > include an entry for 'interrupt-controller' which is the entry the linux > kernel looks for to device a machine is newworld rather than oldworld in > the powermac setup. The other is that debian's yaboot is out of date. No, this is actually normal, as an OldWorld machine is emulated. > The yaboot problem is being worked on. > > So now I am wondering what has to be done to make qemu appear as a > newworld mac, since that is what the machine it claims to emulate is. > Is this simply a mistake in openbios for qemu or does qemu actually > emulate oldworld to some extent? The machine in ppc_oldworld.c is an OldWorld machine. There has been some mistakes in both OpenBIOS and QEMU, that should now be fixed. We plan to emulated a NewWorld machine using ppc_chrp.c as a basis when all the problem with the OldWorld machine have been solved. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net