summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/pmap.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-08-31 17:42:52 +0000
committerjhb <jhb@FreeBSD.org>2009-08-31 17:42:52 +0000
commitd76071806c706221b52589281af03f879e61c28b (patch)
treebeec5b4266aa5dc0f6912c72668e2e097f6af0a7 /sys/i386/include/pmap.h
parentff163fe63bae53abcd2e9f1d913887d3fe1e68b6 (diff)
downloadFreeBSD-src-d76071806c706221b52589281af03f879e61c28b.zip
FreeBSD-src-d76071806c706221b52589281af03f879e61c28b.tar.gz
Improve pmap_change_attr() so that it is able to demote a large (2/4MB)
page into 4KB pages as needed. This should be fairly rare in practice on i386. This includes merging the following changes from the amd64 pmap: 180430, 180485, 180845, 181043, 181077, and 196318. - Add basic support for changing attributes on PDEs to pmap_change_attr() similar to the support in the initial version of pmap_change_attr() on amd64 including inlines for pmap_pde_attr() and pmap_pte_attr(). - Extend pmap_demote_pde() to include the ability to instantiate a new page table page where none existed before. - Enhance pmap_change_attr(). Use pmap_demote_pde() to demote a 2/4MB page mapping to 4KB page mappings when the specified attribute change only applies to a portion of the 2/4MB page. Previously, in such cases, pmap_change_attr() gave up and returned an error. - Correct a critical accounting error in pmap_demote_pde(). Reviewed by: alc MFC after: 3 days
Diffstat (limited to 'sys/i386/include/pmap.h')
-rw-r--r--sys/i386/include/pmap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index c90f947..54e8c20 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -81,6 +81,10 @@
#define PG_PROT (PG_RW|PG_U) /* all protection bits . */
#define PG_N (PG_NC_PWT|PG_NC_PCD) /* Non-cacheable */
+/* Page level cache control fields used to determine the PAT type */
+#define PG_PDE_CACHE (PG_PDE_PAT | PG_NC_PWT | PG_NC_PCD)
+#define PG_PTE_CACHE (PG_PTE_PAT | PG_NC_PWT | PG_NC_PCD)
+
/*
* Promotion to a 2 or 4MB (PDE) page mapping requires that the corresponding
* 4KB (PTE) page mappings have identical settings for the following fields:
OpenPOWER on IntegriCloud