]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/pmap.c
xnu-344.26.tar.gz
[apple/xnu.git] / osfmk / ppc / pmap.c
index f6f6a8e34d732d53fd0a1d62b1952c45f629837f..58deccbb73ecca0e9340fae902ac23169f09c8c8 100644 (file)
@@ -483,6 +483,9 @@ pmap_bootstrap(unsigned int mem_size, vm_offset_t *first_avail, vm_offset_t *fir
             hash_table_size *= 2)
                continue;
 
+       if (num > (sizeof(pte_t) * 524288))
+               hash_table_size = hash_table_size/2; /* reduce by half above 512MB */
+
        /* Scale to within any physical memory layout constraints */
        do {
                num = atop(mem_size);   /* num now holds mem_size in pages */
@@ -1050,7 +1053,10 @@ void pmap_remove_some_phys(
        pp = pmap_find_physentry(pa);                           /* Get the physent for this page */
        if (pp == PHYS_NULL) return;                            /* Leave if not in physical RAM */
 
-       mapping_purge_pmap(pp, pmap);   
+       if (pmap->vflags & pmapVMhost)
+               mapping_purge(pp);
+       else
+               mapping_purge_pmap(pp, pmap);   
 
        return;                                                 /* Leave... */
 }