Lines Matching defs:mapping
29 * Header files for the hardware virtual memory mapping stuff
87 * for mapping this non-contiguous space into the contiguous
88 * physical->virtual mapping tables. An array of this type is
141 #define GV_SLOT_SZ_LG2 5 /* 32 bytes per slot (mapping size) */
175 * have from 5-12. Only 1 in 256 mappings is large, so an average mapping is 64.25 bytes.
193 typedef struct mapping {
196 #define mpPrevious 0x00800000 /* A previous mapping exists in a composite */
197 #define mpNext 0x00400000 /* A next mapping exist in a composite */
202 #define mpBlock 0x00001000 /* Block mapping - used for I/O memory or non-RC maintained RAM, logical page size is independent from physical */
203 #define mpMinSpecial 0x00002000 /* Any mapping with this type or above has extra special handling */
207 #define mpGuest 0x00005000 /* Guest->physical shadow mapping */
219 #define mpLists 0x0000001F /* Number of skip lists mapping is on, max of 27 */
220 #define mpListsb 27 /* Number of skip lists mapping is on, max of 27 */
229 unsigned char mpgCursor; /* 0x006 - Shadow-cache group allocation cursor (first mapping in the group) */
266 /* 0x040 - End of basic mapping */
269 /* note the dependence on kSkipListMaxLists, which must be <= #lists in a 256-byte mapping (ie, <=28) */
271 /* 0x080 - End of first extended mapping */
273 /* 0x0C0 - End of second extended mapping */
275 /* 0x100 - End of third extended mapping */
280 #define MAPPING_NULL ((struct mapping *) 0)
288 /* All counts are in units of basic 64-byte mappings. A 128-byte mapping is
294 addr64_t addr; /* Start address to search mapping */
302 struct mappingblok *mapcnext; /* First mapping block with free entries */
303 struct mappingblok *mapclast; /* Last mapping block with free entries */
309 unsigned int mapcfreec; /* Total calls to mapping free */
310 unsigned int mapcallocc; /* Total calls to mapping alloc */
311 unsigned int mapcbig; /* Count times a big mapping was requested of mapping_alloc */
325 unsigned int mapblokfree[2]; /* Bit map of free mapping entrys */
329 struct mappingblok *nextblok; /* Pointer to the next mapping block */
345 #define mapRtSmash 10 /* Mapping already exists and doesn't match new mapping */
377 extern addr64_t mapping_remove(pmap_t pmap, addr64_t va); /* Remove a single mapping for this VADDR */
378 extern mapping_t *mapping_find(pmap_t pmap, addr64_t va, addr64_t *nextva, int full); /* Finds a mapping */
383 extern mapping_t *mapping_alloc(int lists); /* Obtain a mapping */
384 extern void mapping_free(struct mapping *mp); /* Release a mapping */
394 extern void mapping_protect(pmap_t pmap, addr64_t va, vm_prot_t prot, addr64_t *nextva); /* Change protection of a single mapping to page */
395 extern addr64_t mapping_make(pmap_t pmap, addr64_t va, ppnum_t pa, unsigned int flags, unsigned int size, vm_prot_t prot); /* Make a mapping */
404 extern addr64_t mapping_p2v(pmap_t pmap, ppnum_t pa); /* Finds first virtual mapping of a physical page in a space */
405 extern void mapping_drop_busy(struct mapping *mapping); /* Drops busy count on mapping */
407 extern int mapalc1(struct mappingblok *mb); /* Finds and allcates a 1-bit mapping entry */
408 extern int mapalc2(struct mappingblok *mb); /* Finds and allcates a 2-bit mapping entry */
412 extern void mapping_fake_zone_info( /* return mapping usage stats as a fake zone info */
421 extern mapping_t *hw_rem_map(pmap_t pmap, addr64_t va, addr64_t *next); /* Remove a mapping from the system */
422 extern mapping_t *hw_purge_map(pmap_t pmap, addr64_t va, addr64_t *next); /* Remove a regular mapping from the system */
423 extern mapping_t *hw_purge_space(struct phys_entry *pp, pmap_t pmap); /* Remove the first mapping for a specific pmap from physentry */
424 extern mapping_t *hw_purge_phys(struct phys_entry *pp); /* Remove the first mapping for a physentry */
425 extern mapping_t *hw_scrub_guest(struct phys_entry *pp, pmap_t pmap); /* Scrub first guest mapping belonging to this host */
426 extern mapping_t *hw_find_map(pmap_t pmap, addr64_t va, addr64_t *nextva); /* Finds a mapping */
427 extern mapping_t *hw_find_space(struct phys_entry *pp, unsigned int space); /* Given a phys_entry, find its first mapping in the specified space */
428 extern addr64_t hw_add_map(pmap_t pmap, struct mapping *mp); /* Add a mapping to a pmap */
430 extern unsigned int hw_test_rc(pmap_t pmap, addr64_t va, boolean_t reset); /* Test and optionally reset the RC bit of specific mapping */
439 #define hwpSPrtMap 2 /* Sets protection in mapping */
441 #define hwpSAtrMap 4 /* Sets attributes in mapping */
443 #define hwpCRefMap 6 /* Clears reference in mapping */
445 #define hwpCCngMap 8 /* Clears change in mapping */
447 #define hwpSRefMap 10 /* Sets reference in mapping */
449 #define hwpSCngMap 12 /* Sets change in mapping */
451 #define hwpTRefMap 14 /* Tests reference in mapping */
453 #define hwpTCngMap 16 /* Tests change in mapping */
455 #define hwpTRefCngMap 18 /* Tests reference and change in mapping */
457 #define hwpCRefCngMap 20 /* Clears reference and change in mapping */
459 #define hwpPurgePTE 0 /* Invalidate/purge PTE and merge RC bits for each connected mapping */
460 #define hwpMergePTE 1 /* Merge RC bits for each connected mapping */
461 #define hwpNoopPTE 2 /* Take no additional action for each connected mapping */
478 /* Resume a guest mapping */
480 /* Add a guest mapping */
482 /* Suspend a guest mapping */
484 /* Test/reset mapping ref and chg */
489 /* Find and copy guest mapping into buffer */