Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Dec 1998 15:18:22 +0100
From:      Johan Karlsson <k@numeri.campus.luth.se>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Cache disabling
Message-ID:  <199812041418.PAA26753@numeri.campus.luth.se>

next in thread | raw e-mail | index | archive | help
Hi
I'm using 2.2-Stable and want to disable caching for some memory.

Will the page with the physical address phys have caching disabled if the 
function (see patch below) pmap_page_noncacheable is used?

Is there another (better) way to do it?
If not, could this patch make it into the src tree (when I submit a PR)?

==== patch =====
*** i386/i386/pmap.c.orig       Fri Dec  4 11:32:21 1998
--- i386/i386/pmap.c    Fri Dec  4 11:44:59 1998
***************
*** 2771,2776 ****
--- 2771,2789 ----
  }
  
  /*
+  *      pmap_page_noncacheable:
+  *
+  *      Set/Clear Non-cacheable option (i.e. PG_N) for page
+  */
+ void
+ pmap_page_noncacheable(phys, noncacheable)
+       vm_offset_t phys;
+       boolean_t  noncacheable;
+ {
+       pmap_changebit(phys, PG_N, noncacheable); 
+ }
+ 
+ /*
   *      pmap_page_protect:
   *
   *      Lower the permission for all mappings to a given page.
===============

/K
-- 
Johan Karlsson		mailto:k@numeri.campus.luth.se
SWEDEN



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



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