From owner-freebsd-alpha@FreeBSD.ORG Fri Apr 16 09:27:51 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7432C16A4FA; Fri, 16 Apr 2004 09:27:49 -0700 (PDT) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45F5543D1F; Fri, 16 Apr 2004 09:27:49 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: from localhost (calypso.cs.rice.edu [128.42.1.127]) by cs.rice.edu (Postfix) with ESMTP id D65694ACAB; Fri, 16 Apr 2004 11:27:48 -0500 (CDT) Received: from cs.rice.edu ([128.42.1.30]) by localhost (calypso.cs.rice.edu [128.42.1.127]) (amavisd-new, port 10024) with LMTP id 15098-01-15; Fri, 16 Apr 2004 11:27:48 -0500 (CDT) Received: by cs.rice.edu (Postfix, from userid 19572) id 83DAB4ACA7; Fri, 16 Apr 2004 11:27:48 -0500 (CDT) Date: Fri, 16 Apr 2004 11:27:48 -0500 From: Alan Cox To: Andrew Gallatin Message-ID: <20040416162748.GB238@cs.rice.edu> References: <20040411093343.GA89809@xor.obsecurity.org> <200404132236.20792.jhb@FreeBSD.org> <16509.42895.49213.222503@grasshopper.cs.duke.edu> <20040416045453.GA78366@xor.obsecurity.org> <407F68BA.6000405@imimic.com> <20040416053930.GA78940@xor.obsecurity.org> <20040416054340.GZ238@cs.rice.edu> <20040416054804.GA79165@xor.obsecurity.org> <407F775D.7020908@imimic.com> <16511.61586.123216.627307@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16511.61586.123216.627307@grasshopper.cs.duke.edu> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavis-20030616-p7 at cs.rice.edu cc: alc@FreeBSD.org cc: "Alan L. Cox" cc: alpha@FreeBSD.org cc: Kris Kennaway Subject: Re: Another alpha panic X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2004 16:27:52 -0000 On Fri, Apr 16, 2004 at 10:41:22AM -0400, Andrew Gallatin wrote: > > Alan L. Cox writes: > > Kris Kennaway wrote: > > > > > > Dump of assembler code for function pmap_activate: > > > 0xfffffc00005cf0b0 : ldah gp,14(t12) > > ... > > > 0xfffffc00005cf160 : srl t1,0xd,t1 > > > 0xfffffc00005cf164 : stq t1,16(t2) > > ... > > I believe that the shift right is the "... >> PAGE_SHIFT" in > > > > td->td_pcb->pcb_hw.apcb_ptbr = > > ALPHA_K0SEG_TO_PHYS((vm_offset_t) pmap->pm_lev1) >> PAGE_SHIFT; > > > > and the store quad is dereferencing "td->td_pcb". In other words, > > td->td_pcb points to never-never land. > > > > Is it really pointing into never-never land? The original panic was > that pmap_emulate_reference() was complaining that the page was not > managed.. The physical address 0xb0a0000 is not totally unreasonable, > and would sit around ~176MB into memory. > > The fact that the trap was an ALPHA_MMCSR_FOW, and not an > ALPHA_MMCSR_INVALTRANS or ALPHA_MMCSR_ACCESS makes me think that the > kva was also good... > Here is an observation that may or may not be related: The alpha pmap doesn't implement the PG_UNMANAGED flag on vm_pages. So, it instantiates pv entries even though the machine-independent VM says not to. Fixing this should be mechanical in nature: Search for all uses of PG_UNMANAGED in amd64's or i386's and change alpha's pmap accordingly. Volunteer? I can review the patch but not test it. Alan