summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include/pmap.h
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-05-08 16:54:09 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-05-08 16:54:09 +0000
commitea4827a4442b75f4140eea87a6dfa524be47c27b (patch)
tree90f87f4e69ea2e2ac08d16ac91ed840ff707b426 /sys/arch/i386/include/pmap.h
parentbecca50a1aedd8b5fde673c36ffa1dd72463f682 (diff)
Page Attribute Tables (PAT) support for x86.
PAT allows setting per-mapping cachability bits. Our main interest in it for write combining mappings so we do not have to rely so heaviliy on mtrrs (which are stupidly set up on more and more machines). MD flags to pmap allow setting these bits (which bus_space now uses for PREFETCHABLE maps), if a vm page has a bit set, then we will use WC for all mappings of a page (used for userland mappings). We also check for known errata and fall back to UC- mappings in that case. comments from kettenis@, tedu@ and william@. kettenis@, tedu@ ok.
Diffstat (limited to 'sys/arch/i386/include/pmap.h')
-rw-r--r--sys/arch/i386/include/pmap.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index bd62351d892..393938975ac 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.54 2009/12/09 14:31:57 oga Exp $ */
+/* $OpenBSD: pmap.h,v 1.55 2010/05/08 16:54:08 oga Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -298,12 +298,14 @@ struct pv_entry { /* locked by its list's pvh_lock */
/* to get just the pa from params to pmap_enter */
#define PMAP_PA_MASK ~((paddr_t)PAGE_MASK)
#define PMAP_NOCACHE 0x1 /* map uncached */
+#define PMAP_WC 0x2 /* map write combining. */
/*
* We keep mod/ref flags in struct vm_page->pg_flags.
*/
-#define PG_PMAP_MOD PG_PMAP0
+#define PG_PMAP_MOD PG_PMAP0
#define PG_PMAP_REF PG_PMAP1
+#define PG_PMAP_WC PG_PMAP2
/*
* pv_entrys are dynamically allocated in chunks from a single page.