Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 1997 02:36:27 -0800
From:      David Greenman <dg@root.com>
To:        "Guillermo A. Loyola" <gmo@epigram.com>
Cc:        Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE>, freebsd-hackers@freefall.FreeBSD.org
Subject:   Re: mmap/mlock problem 
Message-ID:  <199710281036.CAA12019@implode.root.com>
In-Reply-To: Your message of "Tue, 28 Oct 1997 01:37:44 PST." <3455B267.FBC7DD67@epigram.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710281036.CAA12019>