From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MFtVq-0005p6-L3 for qemu-devel@nongnu.org; Sun, 14 Jun 2009 13:28:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MFtVl-0005jO-1P for qemu-devel@nongnu.org; Sun, 14 Jun 2009 13:28:57 -0400 Received: from [199.232.76.173] (port=42794 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MFtVk-0005j6-RI for qemu-devel@nongnu.org; Sun, 14 Jun 2009 13:28:52 -0400 Received: from mail-yx0-f192.google.com ([209.85.210.192]:55000) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MFtVk-0006Rl-26 for qemu-devel@nongnu.org; Sun, 14 Jun 2009 13:28:52 -0400 Received: by yxe30 with SMTP id 30so1432483yxe.4 for ; Sun, 14 Jun 2009 10:28:44 -0700 (PDT) MIME-Version: 1.0 Sender: slightlyunconventional@gmail.com Date: Sun, 14 Jun 2009 12:28:43 -0500 Message-ID: Subject: Re: [Qemu-devel] PowerPC 440 support From: Hollis Blanchard 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: Baojun Wang Cc: Blue Swirl , "Richard W.M. Jones" , qemu-devel@nongnu.org Yes, I wrote the code you quoted. In case there is any confusion, let me restate: You can boot a Bamboo (PowerPC 440) guest under KVM on a PowerPC 440 host. KVM bypasses qemu's CPU emulation (TCG), but uses qemu's device emulation. Therefore, if someone were to implement 440 core emulation in qemu, you could boot a 440 kernel with qemu without KVM. Most devices found on 440 SoCs are the same as or very similar to the devices found on 405 SoCs. Qemu's 440 device emulation isn't perfect, but because Linux is highly modular, with a modified device tree you can boot it. See pc-bios/bamboo.dts. -Hollis On Sat, Jun 13, 2009 at 10:47 PM, Baojun Wang wrote: > > in hw/ppc440.c: > > =A0 =A0env =3D cpu_ppc_init("440EP"); > =A0 =A0if (!env && kvm_enabled()) { > =A0 =A0 =A0 =A0/* XXX Since qemu doesn't yet emulate 440, we just say it'= s a 405. > =A0 =A0 =A0 =A0 * Since KVM doesn't use qemu's CPU emulation it seems to = be working > =A0 =A0 =A0 =A0 * OK. */ > =A0 =A0 =A0 =A0env =3D cpu_ppc_init("405"); > =A0 =A0} > =A0 =A0if (!env) { > =A0 =A0 =A0 =A0fprintf(stderr, "Unable to initialize CPU!\n"); > =A0 =A0 =A0 =A0exit(1); > =A0 =A0} > > also in hw/ppc.c: > > I can find ppc40x_irq_init/e500_irq_init(used mpc8544ds), but there is > no ppcbooke_irq_init? It seems hw/ppc405_uc.c is emulation for DCRs, > PLB, DMA, GPIO, I2C.., but there is no hw/ppc44x_uc.c. > > the qemu source I used is 0.10.5. > > Also in ppc/translate_init.c, there lots of CONFIG_USER_ONLY, but I > many of them are DEBUG or CACHE related SPR emulation, and since qemu > doesn't emulate cache, I think it's OK. > > =A0Thanks, > Wang > > On Sun, Jun 14, 2009 at 1:47 AM, Hollis Blanchard = wrote: > > On Fri, Jun 12, 2009 at 10:48 AM, Blue Swirl wro= te: > >> > >> On 6/11/09, Baojun Wang wrote: > >> > could qemu emulate some board like bamboo (without kvm) or MPC8544ds > >> > now? Thanks > >> > >> Yes, if someone adds emulation for these devices: UIC, PLB, DMA, POB, > >> EBC, IIC, ZMII. Maybe some are not needed in all cases. > > > > No, qemu still doesn't emulate Book E cores, such as the PowerPC 440 in= a > > Bamboo board. > > > > UIC is of course emulated, otherwise KVM guests on 440 wouldn't get ver= y > > far. :) Enough 440 SoC devices are emulated to support Linux boot with = a > > properly stripped device tree. > > > > -Hollis > >