From owner-freebsd-mips@FreeBSD.ORG Thu Feb 11 17:15:39 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B3F11065672 for ; Thu, 11 Feb 2010 17:15:39 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-px0-f176.google.com (mail-px0-f176.google.com [209.85.216.176]) by mx1.freebsd.org (Postfix) with ESMTP id 17ADA8FC12 for ; Thu, 11 Feb 2010 17:15:38 +0000 (UTC) Received: by pxi6 with SMTP id 6so1965633pxi.14 for ; Thu, 11 Feb 2010 09:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Xklq8vnfECwYrzk5rcbbxZvJkbJHt4G4fAB7r1Kf5Ng=; b=OuZHU5cfYn803m3gZ4JrEo1zNlj59PLSfzuonL5AKdsDu49tsUyDWhUJh5+699Ld+a 7eaJ3ikb9PFiU4QUYyoUKQPT0zgwshJ1YjQe36dBDAZXXJynsLHAvTPMEkvYoirEUP4y 07XZVOYtqqFZaySGFkzVke0tkwzQgZsF5ah2c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=q3WEk3EtcFCTQuS3H8R0ImuNvIWmAirV8CQEH5BI9fKPpLvEr0k4/QbatuXQ49wI3x Gi8tNaNeOtlNeC8l9tQbwCanzpMppq1NQaQ+06gW04TNGUXzpHSQFAlbFqxtcbMmNIk2 QQb4FmCkExh5ROjZ3waWCzn/Q3RWDXDdDUk6Q= MIME-Version: 1.0 Received: by 10.140.57.5 with SMTP id f5mr104915rva.90.1265908537556; Thu, 11 Feb 2010 09:15:37 -0800 (PST) In-Reply-To: References: <5709963B-3F83-44FE-991F-A3227A2052DC@lakerest.net> <98a59be81002110655y60ab4e8cj473f4b6ecf6f5ae4@mail.gmail.com> Date: Thu, 11 Feb 2010 22:45:37 +0530 Message-ID: <98a59be81002110915l2fa64189g28f13f8ad39c9584@mail.gmail.com> From: "C. Jayachandran" To: Randall Stewart Content-Type: text/plain; charset=ISO-8859-1 Cc: Jayachandran C , Harrison Zou , Warner Losh , freebsd-mips@freebsd.org Subject: Re: RMI status X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2010 17:15:39 -0000 On Thu, Feb 11, 2010 at 9:08 PM, Randall Stewart wrote: >> >> I usually try buildworld with '-j16' to stress the system, I got the >> crash after a few hours of buildworld. Anyway I will update to the >> latest trunk, remove my local changes and see if I get the same issue. >> If I can get it to crash consistently on my setup, I'll do some more >> work on this. > > Ahh.. I don't use a -jN since there is only one core > currently... That would use more memory... maybe running > the kernel out of memory below the magic 512Meg mark. If that > happens things will break... > I think you are right - I added the following patch (probably whitespace damaged) to trap this case and it certainly seems to get pages above 256M before it crashed(on XLR the default bootloader maps physmem from 0-256M after that is IO and flash mapping). Index: sys/mips/mips/pmap.c =================================================================== --- sys/mips/mips/pmap.c (revision 203767) +++ sys/mips/mips/pmap.c (working copy) @@ -1049,6 +1049,9 @@ pmap->pm_segtab = (pd_entry_t *) MIPS_PHYS_TO_CACHED(VM_PAGE_TO_PHYS(ptdpg)); + if (VM_PAGE_TO_PHYS(ptdpg) > 0x10000000) + printf("PM segtab pa=%lx va=%lx\n", (u_long)VM_PAGE_TO_PHYS(ptdpg), + (u_long)pmap->pm_segtab); if ((ptdpg->flags & PG_ZERO) == 0) bzero(pmap->pm_segtab, PAGE_SIZE); @@ -1116,6 +1119,8 @@ ptepa = VM_PAGE_TO_PHYS(m); pteva = MIPS_PHYS_TO_CACHED(ptepa); + if (ptepa > 0x10000000) + printf("Bad page allocated ptepa=%lx pteva %lx\n", (u_long)ptepa, (u_long)pteva); pmap->pm_segtab[ptepindex] = (pd_entry_t)pteva; /* got the following prints: Bad page allocated ptepa=3f401000 pteva bf401000 Bad page allocated ptepa=3f402000 pteva bf402000 Bad page allocated ptepa=3f403000 pteva bf403000 PM segtab pa=3f404000 va=bf404000 Bad page allocated ptepa=3f405000 pteva bf405000 Bad page allocated ptepa=3f406000 pteva bf406000 Bad page allocated ptepa=3f407000 pteva bf407000 Bad page allocated ptepa=3f408000 pteva bf408000 Bad page allocated ptepa=3f409000 pteva bf409000 PM segtab pa=3f40a000 va=bf40a000 Bad page allocated ptepa=3f40b000 pteva bf40b000 Bad page allocated ptepa=3f40c000 pteva bf40c000 Bad page allocated ptepa=3f40d000 pteva bf40d000 Bad page allocated ptepa=3f40e000 pteva bf40e000 I am checking things again to see I haven't missed anything. JC.