From owner-freebsd-hackers Tue Oct 28 02:36:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA13429 for hackers-outgoing; Tue, 28 Oct 1997 02:36:04 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA13424 for ; Tue, 28 Oct 1997 02:36:01 -0800 (PST) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id CAA12019; Tue, 28 Oct 1997 02:36:27 -0800 (PST) Message-Id: <199710281036.CAA12019@implode.root.com> To: "Guillermo A. Loyola" cc: Christoph Kukulies , freebsd-hackers@freefall.FreeBSD.org Subject: Re: mmap/mlock problem In-reply-to: Your message of "Tue, 28 Oct 1997 01:37:44 PST." <3455B267.FBC7DD67@epigram.com> From: David Greenman Reply-To: dg@root.com Date: Tue, 28 Oct 1997 02:36:27 -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Worse yet, the interface for drivers to do it pmap_mapdev() >claims to make the mapping non-cached in the comment, but the code >does not seem to be doing it. The non-cached bits are defined in >pmap.h: > >i386/include/pmap.h:75:#define PG_N (PG_NC_PWT|PG_NC_PCD) /* Non-cacheable */ > >but are only used in machdep.c when probing memory. > >Questions for FreeBSD hackers: > >1) Shouldn't the line that sets the ptes in pmap_mapdev read: > *pte = pa | PG_RW | PG_N | PG_V; > > instead of > *pte = pa | PG_RW | PG_V; > ? > >2) WOuld it be reasonalbe to add a new flag to mmap to allow > specification of uncached mappings? The code used to set the no-cache flags, but I changed it to do a normal mapping after seeing relibility problems with certain memory mapped devices (I suspect this was caused by PWT rather than PCD). The cachability is normally determined by chipset settings and the page table flags are not needed to disable it for non-RAM areas of the address space. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project