From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeQ3C-0004IR-Eh for qemu-devel@nongnu.org; Wed, 06 Jul 2011 07:13:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeQ3A-0001o8-1O for qemu-devel@nongnu.org; Wed, 06 Jul 2011 07:13:50 -0400 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:51867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeQ39-0001nz-0O for qemu-devel@nongnu.org; Wed, 06 Jul 2011 07:13:47 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp01.in.ibm.com (8.14.4/8.13.1) with ESMTP id p66BDf9u026237 for ; Wed, 6 Jul 2011 16:43:41 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p66BDfIi3924078 for ; Wed, 6 Jul 2011 16:43:41 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p66BDe9M006636 for ; Wed, 6 Jul 2011 16:43:41 +0530 Message-ID: <4E14435F.9050601@in.ibm.com> Date: Wed, 06 Jul 2011 16:43:35 +0530 From: Suzuki Poulose MIME-Version: 1.0 References: <4E0C68DB.1050705@in.ibm.com> <20110630123223.GA1955@edde.se.axis.com> <4E0C7354.2030009@in.ibm.com> <20110630131002.GB1955@edde.se.axis.com> <4E130C58.6050301@in.ibm.com> In-Reply-To: <4E130C58.6050301@in.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Setting up PPC440 Virtex Image for Qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: Michal Simek , qemu-devel@nongnu.org On 07/05/11 18:36, Suzuki Poulose wrote: > On 06/30/11 18:40, Edgar E. Iglesias wrote: >> On Thu, Jun 30, 2011 at 06:30:04PM +0530, Suzuki Poulose wrote: >>> On 06/30/11 18:02, Edgar E. Iglesias wrote: >>>> On Thu, Jun 30, 2011 at 05:45:23PM +0530, Suzuki Poulose wrote: >>>>> Hi, >>>>> >>>>> I am working on enabling the KEXEC on PPC440 chipsets. To debug my patches, >>>>> I would like to use the Qemu. The only available PPC440 support in Qemu is >>>>> for the ppc-virtex. (Thanks for adding the support). >>>>> >>>>> I was trying to use the default image provided at >>>>> >>>>> http://wiki.qemu.org/download/ppc-virtexml507-linux-2_6_34.tgz >>>>> >>>>> However I cannot get the network up for the board to use the nfs root file >>>>> system. >>>> >>>> Hi, >>>> >>>> The problem is that there is no model of the LL-TEMAC in qemu, the one in >>>> the refdesign beeing emulated. An easy way out is probably to connect >>>> a xilinx,ethlite instead. You'll need to modify both QEMU and the dtb. >>>> >>>> IIRC, the dtb published with the image has the lltemac removed. >>>> >>>> I've got a working LL-temac model here, will try to post it this weekend. >>>> Or if you're interested in hacking on it, I could probably code dump it as >>>> is. >>> >>> Edgar, >>> >>> Thanks a lot for the quick reply. >>>>> >>>>> Is there something I can do to get the networking up ? I think this may need to >>>>> be fixed in the dtb. >>>>> >>>>> Or is there any other mechanism to use a different file system ? >>>>> ( I have the tool chain to build the kernel etc) >>>> >>>> >>>> Another way is to create ramdisks with all the stuff you need and just >>>> not use networking. Thats how the image from the wiki does it. >>> >>> I think I can try this option. By the way, could you pass on the steps to >>> attach the ramdisks to the image ? >> >> Hi, >> >> If I dont remember wrong, the image on the wiki contains a kernelconfig file. >> The config file sets the CONFIG_INITRAMFS_SOURCE option to "./romfs". >> In my case I created a romfs subdir right in my linux-2.6 kernel tree, >> e.g linux-2.6/romfs/. >> >> You'll then have to populate the romfs directory with all the things >> you need. romfs/dev/xxx, romfs/lib/xxx etc etc. >> >> Then, once you build the kernel, an image of the romfs/ will be baked >> into the kernel image. You then need to choose your init cmd by >> passing an rdinit option in ther kernel cmd line. >> >> With qemu: >> -append "rdinit=/bin/sh" >> >> The qemu-run.sh script from the wiki does that aswell. >> >> There are probably other better ways to do it that I am not aware >> of at the moment. But I hope it helps as example. > > However, I have got it working using an initrd.img (7M) which I pass using -initrd option. > > I have also hacked qemu to display the tlb entries (which is very much needed for my > work) with "info registers" and gdb works like a charm. Nothing more, I could ask for. > Btw, I have come across a bug in qemu-system-ppc while doing single stepping with GDB. Somehow, the "rfi" instruction is not emulated properly. If I single step on an rfi instruction, the pc is set to $pc+4 and not the value in SPRN_SRR0. I have a work around for the time being. I am not that familiar with the qemu code. I could take a look at fixing it, once I get some time to breath :-). Cheers Suzuki