From: Corey Minyard <minyard@acm.org>
To: kvm-ppc@vger.kernel.org
Subject: Re: KVM on 440GP
Date: Fri, 22 Jan 2010 20:04:55 +0000 [thread overview]
Message-ID: <4B5A04E7.5010900@acm.org> (raw)
In-Reply-To: <4B59BFE4.5040107@acm.org>
Hollis Blanchard wrote:
> On Fri, Jan 22, 2010 at 11:13 AM, Corey Minyard <minyard@acm.org> wrote:
>
>> I tried using telnet for the console, and it worked for a little while:
>>
>> root@ebony:~# ./qemu-system-ppcemb --enable-kvm -nographic -m 128 -M bamb
>> oo -kernel uImage.bamboo -L . -append "" -m 64 -serial tcp::4444,server
>> QEMU waiting for connection on: tcp:0.0.0.0:4444,server
>> Truncating memory to 64 MiB to fit SDRAM controller limits.
>> QEMU 0.12.50 monitor - type 'help' for more information
>> (qemu) info kvm
>> kvm support: enabled
>> (qemu)
>>
>> So things are getting closer, but there's no output on the telnet screen.
>>
>> Doing an "info registers" causes qemu to abort.
>>
>
> I believe that's a known bug.
>
The following patch, which is almost certainly wrong, works around the
problem:
diff --git a/hw/ppc440.c b/hw/ppc440.c
index abe0a56..03ae356 100644
--- a/hw/ppc440.c
+++ b/hw/ppc440.c
@@ -44,6 +44,7 @@ CPUState *ppc440ep_init(ram_addr_t *ram_size, PCIBus
**pcip,
qemu_irq *pic;
qemu_irq *irqs;
qemu_irq *pci_irqs;
+ uint32_t sysclk = 33333333;
if (cpu_model = NULL)
cpu_model = "405"; // XXX: should be 440EP
@@ -53,6 +54,9 @@ CPUState *ppc440ep_init(ram_addr_t *ram_size, PCIBus
**pcip,
exit(1);
}
+ /* Set time-base frequency to sysclk */
+ ppc_emb_timers_init(env, sysclk);
+
ppc_dcr_init(env, NULL, NULL);
/* interrupt controller */
>
>> Now, nothing should have changed, but it's crashing at startup:
>>
>> root@ebony:~# ./qemu-system-ppcemb -nographic -m 128 -M bamboo -kernel uI
>> mage.bamboo -L . -append "" -m 64 -serial tcp::4444,server
>> QEMU waiting for connection on: tcp:0.0.0.0:4444,server
>> Truncating memory to 64 MiB to fit SDRAM controller limits.
>>
>
> I don't think it's related, but there must be a silly bug in
> ppc4xx_sdram_adjust(). 128MB should require just a single bank in the
> SDRAM controller.
>
>
>> QEMU 0.12.0 monitor - type 'help' for more information
>> (qemu) qemu: fatal: Trying to execute code outside RAM or ROM at 0x00000000
>>
>> NIP 00000000 LR 00000000 CTR 00000000 XER 00000000
>> MSR 00000000 HID0 00000300 HF 00000000 idx 0
>> Segmentatio
>>
>> backtrace show the invalid memory address, and the segfault is due to
>> something happening while printing out the information.
>>
>
> If you provide the backtrace, I can see if it looks familiar...
>
> -Hollis
>
>
Here's how far I can get now:
root@xilinx-ml507:~# ./qemu-system-ppcemb --enable-kvm -nographic -m 64
-M bambo
o -kernel uImage.bamboo -L . -append "" -serial tcp::4444,server
QEMU waiting for connection on: tcp:0.0.0.0:4444,server
Truncating memory to 64 MiB to fit SDRAM controller limits.
QEMU 0.12.50 monitor - type 'help' for more information
(qemu) info cpus
* CPU #0: nip=0x00000000
(qemu) info registers
NIP 00000000 LR 00000000 CTR 00000000 XER 00000000
MSR 00000000 HID0 00000300 HF 00000000 idx 0
TB 00000000 00000bb4 DECR 00000000
GPR00 0000000000000000 0000000000fffff8 0000000000000000 0000000000000000
GPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
CR 00000000 [ - - - - - - - - ] RES 00000000
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 00000000
SRR0 00000000 SRR1 00000000 SDR1 101d23e0
(qemu) x/10x 0
00000000: 0x00000000 0x00000000 0x00000000 0x00000000
00000010: 0x00000000 0x00000000 0x00000000 0x00000000
00000020: 0x00000000 0x00000000
(qemu)
So the ROM doesn't seem to be set up properly, though bamboo.dtb is in
the current directory.
I'm wondering if it is something bad about the memory setup.
-corey
next prev parent reply other threads:[~2010-01-22 20:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-22 15:10 KVM on 440GP Corey Minyard
2010-01-22 15:27 ` Corey Minyard
2010-01-22 16:52 ` Hollis Blanchard
2010-01-22 17:23 ` Corey Minyard
2010-01-22 17:27 ` Alexander Graf
2010-01-22 18:14 ` Hollis Blanchard
2010-01-22 18:29 ` Corey Minyard
2010-01-22 18:48 ` Alexander Graf
2010-01-22 19:13 ` Corey Minyard
2010-01-22 19:28 ` Hollis Blanchard
2010-01-22 20:04 ` Corey Minyard [this message]
2010-03-09 5:38 ` Hollis Blanchard
2010-03-09 13:46 ` Corey Minyard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B5A04E7.5010900@acm.org \
--to=minyard@acm.org \
--cc=kvm-ppc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.