From owner-freebsd-sparc64@freebsd.org Sun Sep 6 11:03:08 2015 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6429F9CBA2E for ; Sun, 6 Sep 2015 11:03:08 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 546311C32; Sun, 6 Sep 2015 11:03:08 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 522881DAC; Sun, 6 Sep 2015 11:03:08 +0000 (UTC) Date: Sun, 6 Sep 2015 11:03:08 +0000 From: Alexey Dokuchaev To: Mark Cave-Ayland Cc: John Baldwin , "freebsd-sparc64@freebsd.org" Subject: Re: PCI range checking under qemu-system-sparc64 Message-ID: <20150906110308.GA68829@FreeBSD.org> References: <53F73E6F.9080805@ilande.co.uk> <2084808.1lxSgnvf69@ralph.baldwin.cx> <557ADCAB.9020409@FreeBSD.org> <557B6116.70900@ilande.co.uk> <557C1162.3000106@FreeBSD.org> <557D82F8.50908@ilande.co.uk> <557DA6D5.4070800@FreeBSD.org> <557DCF54.7020606@ilande.co.uk> <557DF887.20508@ilande.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <557DF887.20508@ilande.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 11:03:08 -0000 On Sun, Jun 14, 2015 at 10:56:23PM +0100, Mark Cave-Ayland wrote: > Got it. The module name was geom_part_vtoc8 and that was enough to > enable me to generate a valid ISO, apply your patch and verify that the > build works. Thank you for your help so far! > > A quick test with QEMU debugging enabled shows the following on the > console just before the freeze: > > IN: > 0x00000000c0590188: st %g1, [ %l3 + 0x8c ] > 0x00000000c059018c: membar #MemIssue > 0x00000000c0590190: sll %l0, 2, %g2 > 0x00000000c0590194: ld [ %i3 + 0x88 ], %g1 > 0x00000000c0590198: cmp %g2, %g1 > 0x00000000c059019c: clr %o0 > 0x00000000c05901a0: movg %icc, 1, %o0 > 0x00000000c05901a4: call 0xc08aaee0 > > (hangs) > > Examining the kernel symbols show that 0xc08aaee0 is the address of the > cpu_idle() function which is being called from sched_idletd(). My next > job will be to step through cpu_idle() and see if we're getting stuck in > a loop or disappearing somewhere else. Applying the patch (extended version in D2791) fixed the panic for me as well (on qemu v2.4.0 built from emulators/qemu-devel port). Kernel keeps booting and hangs after printing "IPsec: Initialized Security Association Processing." line, however last assembly lines in the log are different: IN: 0x00000000c06183b8: ldsh [ %l3 + 0x9a ], %g1 0x00000000c06183bc: ldsh [ %l3 + 0x98 ], %g2 0x00000000c06183c0: add %g1, %g2, %l0 0x00000000c06183c4: ld [ %l3 + 0x88 ], %g1 0x00000000c06183c8: cmp %g1, 0 0x00000000c06183cc: bne %icc, 0xc061812c 0x00000000c06183d0: cmp %l0, %l1 Mark did you have any success with getting the boot process further? ./danfe