From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LN8VJ-0002TN-0W for qemu-devel@nongnu.org; Wed, 14 Jan 2009 11:22:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LN8VH-0002SX-U9 for qemu-devel@nongnu.org; Wed, 14 Jan 2009 11:22:04 -0500 Received: from [199.232.76.173] (port=40762 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LN8VH-0002SN-AP for qemu-devel@nongnu.org; Wed, 14 Jan 2009 11:22:03 -0500 Received: from caffeine.csclub.uwaterloo.ca ([129.97.134.17]:58486) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LN8VH-0005Or-1k for qemu-devel@nongnu.org; Wed, 14 Jan 2009 11:22:03 -0500 Received: from caffeine.csclub.uwaterloo.ca (localhost [127.0.0.1]) by caffeine.csclub.uwaterloo.ca (Postfix) with ESMTP id 514EC73F08 for ; Wed, 14 Jan 2009 11:21:40 -0500 (EST) Date: Wed, 14 Jan 2009 11:21:40 -0500 Message-ID: <20090114162140.GI29175@csclub.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen) Subject: [Qemu-devel] Small powerpc system emulation problem with linux 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 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. 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. 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. 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. 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. 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? I tried adding an entry for 'interrupt-controller' following the pearpc code in openbios, but that just resulted in a failure to boot the linux kernel, probably because it tried to access the machine as a newworld box, and couldn't find something it needed. I wish I knew how to dump the openfirmware tree on the real powermac g3 to see what it has compared to what qemu with openbios currently sees. Any hints would be appreciated. -- Len Sorensen