• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/ppc/

Lines Matching refs:mp

224 	mapping_t	*mp;
231 mp = hw_rem_map(pmap, va, &nextva); /* Remove a mapping from this pmap */
232 } while (mapRtRemove == ((unsigned int)mp & mapRetCode));
234 switch ((unsigned int)mp & mapRetCode) {
241 pmap, va, mp);
245 pgaddr = mp->mpPAddr; /* Get page number from mapping */
247 mapping_free(mp); /* Add mapping to the free list */
259 mp = hw_scrub_guest(physent, pmap); /* Attempt to scrub a guest mapping */
260 switch ((unsigned int)mp & mapRetCode) {
267 physent, mp); /* Cry havoc, cry wrack,
271 } while (mapRtEmpty != ((unsigned int)mp & mapRetCode));
314 register mapping_t *mp;
382 mp = mapping_alloc(nlists); /* Get a spare mapping block with this many lists */
385 mp->mpFlags |= mflags; /* Add in the rest of the flags to mpLists */
386 mp->mpSpace = pmap->space; /* Set the address space/pmap lookup ID */
387 mp->u.mpBSize = size; /* Set the size */
388 mp->mpPte = 0; /* Set the PTE invalid */
389 mp->mpPAddr = pa; /* Set the physical page number */
394 mp->mpVAddr = (va & ~mpHWFlags) | (wimg << 3) | getProtPPC(prot, disable_NX); /* Add the protection and attributes to the field */
397 colladdr = hw_add_map(pmap, mp); /* Go add the mapping to the pmap */
410 mapping_free(mp); /* Free duplicate mapping */
414 mapping_free(mp); /* Free duplicate mapping */
419 colladdr, rc, pmap, va, mp); /* Die dead */
447 register mapping_t *mp;
458 mp = hw_find_map(curpmap, curva, nextva); /* Find the mapping for this address */
459 if((unsigned int)mp == mapRtBadLk) { /* Did we lock up ok? */
460 panic("mapping_find: pmap lock failure - rc = %p, pmap = %p\n", mp, curpmap); /* Die... */
463 if(!mp || ((mp->mpFlags & mpType) < mpMinSpecial) || !full) break; /* Are we done looking? */
465 if((mp->mpFlags & mpType) != mpNest) { /* Don't chain through anything other than a nested pmap */
466 mapping_drop_busy(mp); /* We have everything we need from the mapping */
467 mp = NULL; /* Set not found */
476 curva = curva + mp->mpNestReloc; /* Relocate va to new pmap */
477 curpmap = (pmap_t) pmapTrans[mp->mpSpace].pmapVAddr; /* Get the address of the nested pmap */
478 mapping_drop_busy(mp); /* We have everything we need from the mapping */
482 return mp; /* Return the mapping if we found one */
889 * mapping_free(mapping *mp) - release a mapping to the free list
898 void mapping_free(struct mapping *mp) { /* Release a mapping */
904 mindx = ((unsigned int)mp & (PAGE_SIZE - 1)) >> 6; /* Get index to mapping */
905 mb = (mappingblok_t *)((unsigned int)mp & -PAGE_SIZE); /* Point to the mapping block */
906 lists = (mp->mpFlags & mpLists); /* get #lists */
911 mp->mpFlags = 0x99999999; /* (BRINGUP) */
912 mp->mpSpace = 0x9999; /* (BRINGUP) */
913 mp->u.mpBSize = 0x9999; /* (BRINGUP) */
914 mp->mpPte = 0x99999998; /* (BRINGUP) */
915 mp->mpPAddr = 0x99999999; /* (BRINGUP) */
916 mp->mpVAddr = 0x9999999999999999ULL; /* (BRINGUP) */
917 mp->mpAlias = 0x9999999999999999ULL; /* (BRINGUP) */
918 mp->mpList0 = 0x9999999999999999ULL; /* (BRINGUP) */
919 mp->mpList[0] = 0x9999999999999999ULL; /* (BRINGUP) */
920 mp->mpList[1] = 0x9999999999999999ULL; /* (BRINGUP) */
921 mp->mpList[2] = 0x9999999999999999ULL; /* (BRINGUP) */
924 mp->mpList[3] = 0x9999999999999999ULL; /* (BRINGUP) */
925 mp->mpList[4] = 0x9999999999999999ULL; /* (BRINGUP) */
926 mp->mpList[5] = 0x9999999999999999ULL; /* (BRINGUP) */
927 mp->mpList[6] = 0x9999999999999999ULL; /* (BRINGUP) */
928 mp->mpList[7] = 0x9999999999999999ULL; /* (BRINGUP) */
929 mp->mpList[8] = 0x9999999999999999ULL; /* (BRINGUP) */
930 mp->mpList[9] = 0x9999999999999999ULL; /* (BRINGUP) */
931 mp->mpList[10] = 0x9999999999999999ULL; /* (BRINGUP) */
973 if(!mbn) panic("mapping_free: attempt to release mapping block (%p) not on list\n", mp);
1025 register mapping_t *mp;
1089 mp = hw_purge_map(ckpmap, va, &nextva);
1091 switch ((unsigned int)mp & mapRetCode) {
1093 mapping_free(mp);
1099 panic("mapping_alloc: hw_purge_map failed - pmap = %p, va = %16llX, code = %p\n", ckpmap, va, mp);
1103 if (mapRtNotFnd == ((unsigned int)mp & mapRetCode)) {
1213 mp = &((mapping_t *)mb)[mindx]; /* Point to the allocated mapping */
1214 mp->mpFlags = lists; /* set the list count */
1217 return mp; /* Send it back... */
1499 mapping_t *mp;
1511 mp = hw_find_space(physent, pmap->space); /* Go find the first mapping to the page from the requested pmap */
1513 if(mp) { /* Did we find one? */
1514 va = mp->mpVAddr & -4096; /* If so, get the cleaned up vaddr */
1515 mapping_drop_busy(mp); /* Go ahead and relase the mapping now */
1600 mapping_t *mp = NULL;
1636 mapping_drop_busy(mp); /* Release the old mapping now */
1641 mp = mapping_find(map->pmap, vaddr, &nextva, 1); /* Find and busy the mapping */
1642 if(!mp) { /* Was it there? */
1655 if (mp->mpVAddr & mpI) { /* cache inhibited, so force the appropriate page to be flushed before */
1666 if((which & cppvPsnk) || !(mp->mpVAddr & 1)) break; /* We got it mapped R/W or the source is not virtual, leave... */
1668 mapping_drop_busy(mp); /* Go ahead and release the mapping for now */
1677 paddr = ((addr64_t)mp->mpPAddr << 12) + (vaddr - (mp->mpVAddr & -4096LL)); /* construct the physical address... this calculation works */
1716 if(!bothphys) mapping_drop_busy(mp); /* Go ahead and release the mapping of the virtual page if any */