]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/pmap.c
xnu-344.49.tar.gz
[apple/xnu.git] / osfmk / i386 / pmap.c
index b23cdca1bdd4e125ee98ec06c1511b8c8a2d0568..14edd73266741574b4f76d7454fbefa8aba3b418 100644 (file)
@@ -3,19 +3,22 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
  * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -552,7 +555,7 @@ pmap_map(
 
        ps = PAGE_SIZE;
        while (start < end) {
-               pmap_enter(kernel_pmap, virt, start, prot, FALSE);
+               pmap_enter(kernel_pmap, virt, start, prot, 0, FALSE);
                virt += ps;
                start += ps;
        }
@@ -1415,9 +1418,6 @@ pmap_page_protect(
                    /*
                     * Remove the mapping, collecting any modify bits.
                     */
-                   if (iswired(*pte))
-                       panic("pmap_remove_all removing a wired page");
-
                    {
                        register int    i = ptes_per_vm_page;
 
@@ -1584,6 +1584,7 @@ pmap_enter(
        vm_offset_t             v,
        register vm_offset_t    pa,
        vm_prot_t               prot,
+       unsigned int            flags,
        boolean_t               wired)
 {
        register pt_entry_t     *pte;
@@ -2026,6 +2027,7 @@ pmap_change_wiring(
        register int            i;
        spl_t                   spl;
 
+#if 0
        /*
         *      We must grab the pmap system lock because we may
         *      change a pte_page queue.
@@ -2058,6 +2060,11 @@ pmap_change_wiring(
        }
 
        PMAP_READ_UNLOCK(map, spl);
+
+#else
+       return;
+#endif
+
 }
 
 /*
@@ -2924,7 +2931,7 @@ pmap_movepage(unsigned long from, unsigned long to, vm_size_t size)
                PMAP_READ_UNLOCK(kernel_pmap, spl);
 
                pmap_enter(kernel_pmap, to, i386_trunc_page(*pte),
-                       VM_PROT_READ|VM_PROT_WRITE, *pte & INTEL_PTE_WIRED);
+                       VM_PROT_READ|VM_PROT_WRITE, 0, *pte & INTEL_PTE_WIRED);
 
                pmap_remove(kernel_pmap, from, from+PAGE_SIZE);
 
@@ -2975,5 +2982,12 @@ kern_return_t bmapmapr(vm_offset_t va) {
 }
 #endif
 
-
-
+/* temporary workaround */
+boolean_t
+coredumpok(vm_map_t map, vm_offset_t va)
+{
+  pt_entry_t *ptep;
+  ptep = pmap_pte(map->pmap, va);
+  if (0 == ptep) return FALSE;
+  return ((*ptep & (INTEL_PTE_NCACHE|INTEL_PTE_WIRED)) != (INTEL_PTE_NCACHE|INTEL_PTE_WIRED));
+}