From owner-freebsd-mips@FreeBSD.ORG Fri Sep 10 07:07:08 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 AA5ED1065695 for ; Fri, 10 Sep 2010 07:07:08 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCF88FC1F for ; Fri, 10 Sep 2010 07:07:08 +0000 (UTC) Received: by iwn34 with SMTP id 34so2206658iwn.13 for ; Fri, 10 Sep 2010 00:07:07 -0700 (PDT) Received: by 10.231.15.9 with SMTP id i9mr525670iba.58.1284102427741; Fri, 10 Sep 2010 00:07:07 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.231.37.135 with HTTP; Fri, 10 Sep 2010 00:06:46 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Fri, 10 Sep 2010 00:06:46 -0700 X-Google-Sender-Auth: F1uDaSP17eXkQOvnHVgSqsgF2Yg Message-ID: To: "Jayachandran C." Content-Type: text/plain; charset=ISO-8859-1 Cc: gonzo@freebsd.org, freebsd-mips@freebsd.org Subject: Re: busdma_machdep.c with more than 512M memory 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: Fri, 10 Sep 2010 07:07:08 -0000 On Fri, Sep 10, 2010 at 00:00, Jayachandran C. wrote: > On Fri, Sep 10, 2010 at 11:22 AM, Neel Natu wrote: >> This assumes that pmap_mapdev() always returns an uncached mapping >> which is true for n64 kernels but not for o32 kernels with memory >> beyond 512MB. > > I think my original patch was incorrect, pmap_mapdev() should not be > used to map physical memory uncached. It may be just for mapping > device address space uncached, and that may be why it checks if the > physical address is cacheable. I think that's a wrong inference from the brokenness of pmap_mapdev because of using the general-purpose pmap_kenter. pmap_mapdev is implicitly uncacheable -- check i386 pmap for confirmation. Neel's patch is right.