* [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb @ 2011-01-23 12:59 Dushyant Bansal 2011-01-23 18:42 ` Rob Landley 0 siblings, 1 reply; 10+ messages in thread From: Dushyant Bansal @ 2011-01-23 12:59 UTC (permalink / raw) To: qemu-devel Hi all, I have configured and built qemu with device tree support. qemu-version: 0.13.50 I have built kernel image (uImage) for bamboo using powerpc-440 toolchain. kernel-version: 2.6.37-rc6+ When I try to run this command, # qemu-system-ppcemb -nographic -m 128 -M bamboo -kernel uImage -append "" I get the following output and qemu just hangs there: Trying to read privileged spr 947 3b3 at 00001028 Trying to read invalid spr 62 03e at 00000778 Has anyone tried to emulate bamboo with qemu before ? Thanks, Dushyant ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 12:59 [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb Dushyant Bansal @ 2011-01-23 18:42 ` Rob Landley 2011-01-23 19:01 ` Dushyant Bansal 2011-01-23 19:52 ` Andreas Färber 0 siblings, 2 replies; 10+ messages in thread From: Rob Landley @ 2011-01-23 18:42 UTC (permalink / raw) To: Dushyant Bansal, qemu-devel On 01/23/2011 06:59 AM, Dushyant Bansal wrote: > Hi all, > > I have configured and built qemu with device tree support. > qemu-version: 0.13.50 > I have built kernel image (uImage) for bamboo using powerpc-440 toolchain. > kernel-version: 2.6.37-rc6+ > > When I try to run this command, > # qemu-system-ppcemb -nographic -m 128 -M bamboo -kernel uImage -append "" > > I get the following output and qemu just hangs there: > Trying to read privileged spr 947 3b3 at 00001028 > Trying to read invalid spr 62 03e at 00000778 > > Has anyone tried to emulate bamboo with qemu before ? > > Thanks, > Dushyant In my Aboriginal Linux project (http://landley.net/aboriginal) I have a config that builds a ppc440 cross compiler and builds a root filesystem and kernel with it, but the kernel .config is bog standard 32 bit PPC (mac99 board I think). It boots and runs, gives you a shell prompt, but occasionally misbehaves you try to do anything fancy with it. Last I checked, the bamboo board was implemented for KVM not QEMU, and QEMU didn't have a ppc440 processor emulation. But that was over a year ago, things could easily have changed... What kernel .config are you using for the bamboo kernel? Rob ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 18:42 ` Rob Landley @ 2011-01-23 19:01 ` Dushyant Bansal 2011-01-23 19:21 ` Rob Landley 2011-01-23 19:52 ` Andreas Färber 1 sibling, 1 reply; 10+ messages in thread From: Dushyant Bansal @ 2011-01-23 19:01 UTC (permalink / raw) To: Rob Landley; +Cc: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1935 bytes --] On Monday 24 January 2011 12:12 AM, Rob Landley wrote: > On 01/23/2011 06:59 AM, Dushyant Bansal wrote: > >> Hi all, >> >> I have configured and built qemu with device tree support. >> qemu-version: 0.13.50 >> I have built kernel image (uImage) for bamboo using powerpc-440 toolchain. >> kernel-version: 2.6.37-rc6+ >> >> When I try to run this command, >> # qemu-system-ppcemb -nographic -m 128 -M bamboo -kernel uImage -append "" >> >> I get the following output and qemu just hangs there: >> Trying to read privileged spr 947 3b3 at 00001028 >> Trying to read invalid spr 62 03e at 00000778 >> >> Has anyone tried to emulate bamboo with qemu before ? >> >> Thanks, >> Dushyant >> > In my Aboriginal Linux project (http://landley.net/aboriginal) I have a > config that builds a ppc440 cross compiler and builds a root filesystem > and kernel with it, but the kernel .config is bog standard 32 bit PPC > (mac99 board I think). It boots and runs, gives you a shell prompt, but > occasionally misbehaves you try to do anything fancy with it. > > I am also using <http://www.landley.net/aboriginal/downloads/binaries/cross-compiler-powerpc-440fp.tar.bz2>"cross-compiler-powerpc-440fp" from the aboriginal project (http://www.landley.net/aboriginal/downloads/binaries/) to build the kernel image :). > Last I checked, the bamboo board was implemented for KVM not QEMU, and > QEMU didn't have a ppc440 processor emulation. But that was over a year > ago, things could easily have changed... > Yes, qemu supports ppc440(bamboo). $ qemu-system-ppcemb -M ? Supported machines are: mpc8544ds mpc8544ds bamboo bamboo ref405ep ref405ep taihu taihu mac99 Mac99 based PowerMAC g3beige Heathrow based PowerMAC (default) prep PowerPC PREP platform > What kernel .config are you using for the bamboo kernel? > > Rob > > I am using arch/powerpc/configs/44x/bamboo_defconfig. Thanks, Dushyant [-- Attachment #2: Type: text/html, Size: 2850 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 19:01 ` Dushyant Bansal @ 2011-01-23 19:21 ` Rob Landley 2011-01-23 19:52 ` Dushyant Bansal 0 siblings, 1 reply; 10+ messages in thread From: Rob Landley @ 2011-01-23 19:21 UTC (permalink / raw) To: Dushyant Bansal, qemu-devel On 01/23/2011 01:01 PM, Dushyant Bansal wrote: > I am also using > <http://www.landley.net/aboriginal/downloads/binaries/cross-compiler-powerpc-440fp.tar.bz2>"cross-compiler-powerpc-440fp" > from the aboriginal project > (http://www.landley.net/aboriginal/downloads/binaries/) to build the > kernel image :). Heh. :) Note that I don't have any actual ppc440 hardware. Somebody else once tested this on real hardware for me and said it worked (their interest was why i added the platform in the first place), and I haven't changed the compiler config since then, but I can't prove anything if QEMU won't cooperate. > Yes, qemu supports ppc440(bamboo). > > $ qemu-system-ppcemb -M ? > Supported machines are: > mpc8544ds mpc8544ds > bamboo bamboo > ref405ep ref405ep > taihu taihu > mac99 Mac99 based PowerMAC > g3beige Heathrow based PowerMAC (default) > prep PowerPC PREP platform Those are board emulations. Does it have a 440 _cpu_ emulation? ./qemu-system-ppc -cpu ? | grep 440 (Don't ask me why qemu-system-ppc lists every single powerpc stepping ever as a separate interesting CPU emulation. Seems kind of crazy to me, but eh...) >> What kernel .config are you using for the bamboo kernel? > I am using arch/powerpc/configs/44x/bamboo_defconfig. Reasonable. Note that beating a usable console out of the thing so you can see output is the second hard step. (The first hard step is getting everything set up so that the kernel will actually build and boot on the hardware. Without a console, you can't prove it did.) I prefer serial console to pop-up window because it's scriptable with "expect" or similar, I can log the output via "tee", and cut and paste works without further effort. But if you're just trying to see boot messages, a SDL frame buffer window (or vnc) is fine. Rob ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 19:21 ` Rob Landley @ 2011-01-23 19:52 ` Dushyant Bansal 2011-01-23 22:21 ` Rob Landley 0 siblings, 1 reply; 10+ messages in thread From: Dushyant Bansal @ 2011-01-23 19:52 UTC (permalink / raw) To: Rob Landley; +Cc: qemu-devel > Those are board emulations. Does it have a 440 _cpu_ emulation? > > ./qemu-system-ppc -cpu ? | grep 440 > This is the output. PowerPC 440-Xilinx PVR 7ff21910 Is this right for my requirement? This is qemu version 0.13.50. And, it seems this support has been added recently. It is missing in qemu version 0.12.5. I have one more query. You said 440 was supported in kvm. But kvm also uses qemu as its userspace component. So, 440 was supported through kvm kernel module? -- Dushyant ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 19:52 ` Dushyant Bansal @ 2011-01-23 22:21 ` Rob Landley 0 siblings, 0 replies; 10+ messages in thread From: Rob Landley @ 2011-01-23 22:21 UTC (permalink / raw) To: Dushyant Bansal; +Cc: qemu-devel On 01/23/2011 01:52 PM, Dushyant Bansal wrote: > >> Those are board emulations. Does it have a 440 _cpu_ emulation? >> >> ./qemu-system-ppc -cpu ? | grep 440 >> > This is the output. > PowerPC 440-Xilinx PVR 7ff21910 > > Is this right for my requirement? I have no idea? Sounds worth a try... > This is qemu version 0.13.50. And, it seems this support has been added > recently. It is missing in qemu version 0.12.5. > I have one more query. You said 440 was supported in kvm. KVM runs on powerpc systems, including PPC 440. KVM doesn't do CPU emulation, it does CPU virtualization. IT can't do PowerPC on an x86 host, it does PowerPC on a PowerPC host. (It only uses QEMU to attach I/O devices to the virtual CPUs the hardware provides. It needs a CPU that can do nested page tables, things like the Intel VT extensions.) So KVM can run PowerPC 440 code when running on a PowerPC 440 host. That's where the Bamboo board emulation came from: somebody was running KVM on a PowerPC 440 host, and wanted a board emulation for the virtual systems to do I/O through. > But kvm also > uses qemu as its userspace component. So, 440 was supported through kvm > kernel module? KVM just uses the QEMU code to attach virtual I/O devices to a CPU context that's provided by the hardware. So in order to get KVM to emulate a PowerPC 440, you have to run it on a PowerPC 440 host. (If you do so, QEMU will happily emulate a bamboo board for it.) I suspect the problem is that the kernel's actual bamboo drivers have inline assembly instructions snippets, and QEMU isn't emulating those instructions. Note that the powerpc 440 is mostly a subset of normal 32 bit powerpc (um, 405?). Specifically, powerpc 440 userspace code should run on a full-fledged PPC just fine, at least with software floating point. It's the protected mode instructions (mmu management and such) that differ, stuff that only really happens in the kernel. My fuzzy understanding is that the 440 happened when IBM tried to strip down the PowerPC for the embedded market, mostly by removing several instructions. (So 405 code won't run on it, but 440 code will mostly run on a 405, except for the priviledged instructions which of course are all wildly different, but that should only get used inside the kernel. Don't ask me about floating point.) Motorola did the same thing by the way, except they removed a DIFFERENT set of instructions so the two were incompatible. You can find traces of that in kernel under "arch/powerpc/platforms/8xx" if you're curious, but I think that died even before they spun off Freescale. (Maybe it just doesn't get used on Linux? They tried to revive it as the "PowerQUIC" SOC line a few years ago but I dunno if it went anywhere.) Of course wikipedia will have an opinion. (A subset of it might even be correct, who knows? It's the best source of anecdotal evidence on the net.) http://en.wikipedia.org/wiki/List_of_PowerPC_processors Rob ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 18:42 ` Rob Landley 2011-01-23 19:01 ` Dushyant Bansal @ 2011-01-23 19:52 ` Andreas Färber 2011-01-23 20:08 ` Dushyant Bansal 2011-01-23 22:11 ` Alexander Graf 1 sibling, 2 replies; 10+ messages in thread From: Andreas Färber @ 2011-01-23 19:52 UTC (permalink / raw) To: Rob Landley; +Cc: Dushyant Bansal, QEMU Developers, Alexander Graf Am 23.01.2011 um 19:42 schrieb Rob Landley: > On 01/23/2011 06:59 AM, Dushyant Bansal wrote: >> When I try to run this command, >> # qemu-system-ppcemb -nographic -m 128 -M bamboo -kernel uImage - >> append "" >> >> I get the following output and qemu just hangs there: >> Trying to read privileged spr 947 3b3 at 00001028 >> Trying to read invalid spr 62 03e at 00000778 > > Last I checked, the bamboo board was implemented for KVM not QEMU, and > QEMU didn't have a ppc440 processor emulation. But that was over a > year > ago, things could easily have changed... Matches my info. No ppc440 series since then. Andreas ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 19:52 ` Andreas Färber @ 2011-01-23 20:08 ` Dushyant Bansal 2011-01-23 21:00 ` Edgar E. Iglesias 2011-01-23 22:11 ` Alexander Graf 1 sibling, 1 reply; 10+ messages in thread From: Dushyant Bansal @ 2011-01-23 20:08 UTC (permalink / raw) To: Andreas Färber; +Cc: qemu-devel On Monday 24 January 2011 01:22 AM, Andreas Färber wrote: > Am 23.01.2011 um 19:42 schrieb Rob Landley: > >> On 01/23/2011 06:59 AM, Dushyant Bansal wrote: >>> When I try to run this command, >>> # qemu-system-ppcemb -nographic -m 128 -M bamboo -kernel uImage >>> -append "" >>> >>> I get the following output and qemu just hangs there: >>> Trying to read privileged spr 947 3b3 at 00001028 >>> Trying to read invalid spr 62 03e at 00000778 >> >> Last I checked, the bamboo board was implemented for KVM not QEMU, and >> QEMU didn't have a ppc440 processor emulation. But that was over a year >> ago, things could easily have changed... > > Matches my info. No ppc440 series since then. > > Andreas $ ./qemu-system-ppc -cpu ? | grep 440 This is the output. PowerPC 440-Xilinx PVR 7ff21910 qemu version: 0.13.50. Will it work for ppc440 processor emulation? Dushyant ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 20:08 ` Dushyant Bansal @ 2011-01-23 21:00 ` Edgar E. Iglesias 0 siblings, 0 replies; 10+ messages in thread From: Edgar E. Iglesias @ 2011-01-23 21:00 UTC (permalink / raw) To: Dushyant Bansal; +Cc: Andreas Färber, qemu-devel On Mon, Jan 24, 2011 at 01:38:35AM +0530, Dushyant Bansal wrote: > On Monday 24 January 2011 01:22 AM, Andreas Färber wrote: > > Am 23.01.2011 um 19:42 schrieb Rob Landley: > > > >> On 01/23/2011 06:59 AM, Dushyant Bansal wrote: > >>> When I try to run this command, > >>> # qemu-system-ppcemb -nographic -m 128 -M bamboo -kernel uImage > >>> -append "" > >>> > >>> I get the following output and qemu just hangs there: > >>> Trying to read privileged spr 947 3b3 at 00001028 > >>> Trying to read invalid spr 62 03e at 00000778 > >> > >> Last I checked, the bamboo board was implemented for KVM not QEMU, and > >> QEMU didn't have a ppc440 processor emulation. But that was over a year > >> ago, things could easily have changed... > > > > Matches my info. No ppc440 series since then. > > > > Andreas > > $ ./qemu-system-ppc -cpu ? | grep 440 > This is the output. > PowerPC 440-Xilinx PVR 7ff21910 > > qemu version: 0.13.50. > Will it work for ppc440 processor emulation? Yes, for a long time the MMU emulation was half done. A few months ago I pushed a set of patches to add enough MMU emulation to handle linux guests. But there are still parts missing. The virtex-ml507 board works good enough to run linux on. I can dig for kernel configs and publish devicetrees and kernel images if there is interest. Cheers ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb 2011-01-23 19:52 ` Andreas Färber 2011-01-23 20:08 ` Dushyant Bansal @ 2011-01-23 22:11 ` Alexander Graf 1 sibling, 0 replies; 10+ messages in thread From: Alexander Graf @ 2011-01-23 22:11 UTC (permalink / raw) To: Andreas Färber; +Cc: Edgar E. Iglesias, Dushyant Bansal, QEMU Developers On 23.01.2011, at 20:52, Andreas Färber wrote: > Am 23.01.2011 um 19:42 schrieb Rob Landley: > >> On 01/23/2011 06:59 AM, Dushyant Bansal wrote: >>> When I try to run this command, >>> # qemu-system-ppcemb -nographic -m 128 -M bamboo -kernel uImage -append "" >>> >>> I get the following output and qemu just hangs there: >>> Trying to read privileged spr 947 3b3 at 00001028 >>> Trying to read invalid spr 62 03e at 00000778 >> >> Last I checked, the bamboo board was implemented for KVM not QEMU, and >> QEMU didn't have a ppc440 processor emulation. But that was over a year >> ago, things could easily have changed... > > Matches my info. No ppc440 series since then. Edgar did some work on 440 emulation, but not with bamboo IIRC. Alex ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-01-23 22:22 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-01-23 12:59 [Qemu-devel] Emulating powerpc 440EP with qemu-system-ppcemb Dushyant Bansal 2011-01-23 18:42 ` Rob Landley 2011-01-23 19:01 ` Dushyant Bansal 2011-01-23 19:21 ` Rob Landley 2011-01-23 19:52 ` Dushyant Bansal 2011-01-23 22:21 ` Rob Landley 2011-01-23 19:52 ` Andreas Färber 2011-01-23 20:08 ` Dushyant Bansal 2011-01-23 21:00 ` Edgar E. Iglesias 2011-01-23 22:11 ` Alexander Graf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).