Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O70Cz-0006EV-Bv for qemu-devel@nongnu.org; Wed, 28 Apr 2010 01:53:17 -0400 Received: from [140.186.70.92] (port=44262 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O70Cx-0006Cf-7S for Qemu-devel@nongnu.org; Wed, 28 Apr 2010 01:53:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O70Cv-0005vS-Mc for Qemu-devel@nongnu.org; Wed, 28 Apr 2010 01:53:15 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:36538) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O70Cv-0005vK-Ix for Qemu-devel@nongnu.org; Wed, 28 Apr 2010 01:53:13 -0400 Received: by gwb15 with SMTP id 15so2017621gwb.4 for ; Tue, 27 Apr 2010 22:53:12 -0700 (PDT) Subject: Re: [Qemu-devel] SPARC not booting SMP Linux kernel Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=utf-8 From: =?utf-8?B?6ZmI5a6H6aOe?= In-Reply-To: Date: Wed, 28 Apr 2010 13:53:10 +0800 Content-Transfer-Encoding: quoted-printable Message-Id: <48F76423-A4AD-4A42-A198-53624C33C7AB@gmail.com> References: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl , Artyom Tarasenko Cc: Qemu-devel@nongnu.org I've tested the latest git HEAD version. But still has the problem. Investigating Linux kernel execution shows that the function which will = clear the interrupt is not executed. Here's the relevant kernel code. maybe_smp4m_msg: GET_PROCESSOR4M_ID(o3) set sun4m_interrupts, %l5 ld [%l5], %o5 sethi %hi(0x40000000), %o2 sll %o3, 12, %o3 ld [%o5 + %o3], %o1 andcc %o1, %o2, %g0 be,a smp4m_ticker /* Jump to smp4m_ticker, which will = clear interrupt */ cmp %l7, 14 /* Comparing the interrupt level*/ st %o2, [%o5 + 0x4] WRITE_PAUSE ld [%o5], %g0 WRITE_PAUSE or %l0, PSR_PIL, %l4 wr %l4, 0x0, %psr WRITE_PAUSE wr %l4, PSR_ET, %psr WRITE_PAUSE call smp_reschedule_irq nop RESTORE_ALL On 2010-4-28, at =E4=B8=8A=E5=8D=882:23, Blue Swirl wrote: > On 4/27/10, =E9=99=88=E5=AE=87=E9=A3=9E wrote: >> Actually this has been test before. >>=20 >> http://lists.gnu.org/archive/html/qemu-devel/2006-08/msg00512.html >=20 > That was before I added SMP support to OpenBIOS. >=20 >> I've tested Debian 3.1 (with Linux 2.4.27.3) and Debian 4.0 (with >> Linux 2.6.18.6), on both qemu 0.10.6 and 0.12.3, emulating machine is >> set to SS-20. >>=20 >> 1. non-smp kernel successfully boots with both -smp 1 or -smp 2. >> 2. smp kernel can only boot with -smp 1. (The 2.6 kernel is cross >> compiled by gcc 4.2.4 since no binary package is available) >>=20 >> Some investigation with qemu's debug message and Linux kernel dump >> (the 2.6 kernel) shows that >>=20 >> 1. When the boot cpu tries to start cpu 1, cpu 1 calls >> local_irq_enable. After that, cpu 1 get's lot's of level 14 = interrupt. >> 2. Printing out the executed TBs' pc values shows that kernel >> interrupt handler is executed. >> 3. Qemu's do_interrupt debug message shows that cpu 1 always get = level >> 14 interrupt at the same pc, which is the nop instruction just after >> the "mov %g1, %psr" instruction. >>=20 >> I guess that the interrupt is not cleared even after the execution of >> the interrupt handler. I've found debian installation report which >> boots smp linux kernel, so I thinks this problem is caused by qemu? >>=20 >> I'm tring to fix this problem but I'm not familiar with sparc >> architecture, is there any clue? >=20 > This sounds awfully familiar to the problems Solaris had with > interrupts. Does the problem still exist with git HEAD version of > QEMU? -- Best regards, Chen Yufei