From owner-freebsd-sparc64@freebsd.org Tue Apr 12 09:06:46 2016 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 6388FB0CE81 for ; Tue, 12 Apr 2016 09:06:46 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (chuckie.co.uk [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28B3C1372 for ; Tue, 12 Apr 2016 09:06:45 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from host81-154-31-210.range81-154.btcentralplus.com ([81.154.31.210] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1apuHR-0003bR-K3 for freebsd-sparc64@freebsd.org; Tue, 12 Apr 2016 10:06:43 +0100 To: "freebsd-sparc64@freebsd.org" References: <570CAFD6.2010004@ilande.co.uk> From: Mark Cave-Ayland Message-ID: <570CBA7E.2080509@ilande.co.uk> Date: Tue, 12 Apr 2016 10:06:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <570CAFD6.2010004@ilande.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 81.154.31.210 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: Re: qemu-system-sparc64: entering the debugger X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 09:06:46 -0000 On 12/04/16 09:20, Mark Cave-Ayland wrote: > So it looks like something has already gone wrong simply trying to dump > the process map. Fortunately the number of QEMU translation blocks > between the output of the "ps/m" header and the "KDB reentering" is > quite small so I've uploaded it to > https://www.ilande.co.uk/tmp/qemu/freebsd-tb.txt. > > Can anyone have a quick look at the link above and give me an idea as to > roughly what the code is doing here? To my FreeBSD-untrained eye, it looks like we're going okay until around this part: IN: 0x00000000c0122008: ldx [ %l2 + 0x3d8 ], %g1 0x00000000c012200c: ldx [ %g1 + 0x18 ], %g1 0x00000000c0122010: brz,pn %g1, 0xc0122050 0x00000000c0122014: nop -------------- IN: 0x00000000c00a4d1c: mov %g6, %g6 ! 0x0 0x00000000c00a4d20: sllx %g6, 0x20, %g6 0x00000000c00a4d24: sethi %hi(0xbfc00000), %g7 0x00000000c00a4d28: or %g7, %g6, %g7 0x00000000c00a4d2c: sethi %hi(0x1fc00), %g6 0x00000000c00a4d30: or %g6, 0x3ff, %g6 ! 0x1ffff 0x00000000c00a4d34: srlx %g5, 0xd, %g5 0x00000000c00a4d38: and %g5, %g6, %g6 0x00000000c00a4d3c: sllx %g6, 5, %g6 0x00000000c00a4d40: add %g6, %g7, %g6 0x00000000c00a4d44: ldda [ %g6 ] (36), %g6 0x00000000c00a4d48: brgez,pn %g7, 0xc00b0880 0x00000000c00a4d4c: srlx %g6, 2, %g6 Notice a jump to a translation block that isn't the target or continuation of the branch. Here the code at 0xc00a4d1c looks suspiciously like that in tl1_immu_miss_patch_tsb_1 which suggests we've bailed out to a trap handler due to an invalid address. ATB, Mark.