* many address spaces.
*/
+/* Copy between a physical page and a virtual address */
+extern kern_return_t copypv(
+ addr64_t source,
+ addr64_t sink,
+ unsigned int size,
+ int which);
+#define cppvPsnk 1
+#define cppvPsrc 2
+#define cppvFsnk 4
+#define cppvFsrc 8
+#define cppvNoModSnk 16
+#define cppvNoRefSrc 32
+#define cppvKmap 64 /* User the kernel's vm_map */
+
#if !defined(MACH_KERNEL_PRIVATE)
typedef void *pmap_t;
* However, for best performance pmap_free_pages should be accurate.
*/
-extern boolean_t pmap_next_page(vm_offset_t *paddr);
+extern boolean_t pmap_next_page(ppnum_t *pnum);
/* During VM initialization,
* return the next unused
* physical page.
extern void pmap_enter( /* Enter a mapping */
pmap_t pmap,
vm_offset_t v,
- vm_offset_t pa,
+ ppnum_t pn,
vm_prot_t prot,
unsigned int flags,
boolean_t wired);
extern void pmap_remove_some_phys(
pmap_t pmap,
- vm_offset_t pa);
+ ppnum_t pn);
/*
*/
extern void pmap_page_protect( /* Restrict access to page. */
- vm_offset_t phys,
+ ppnum_t phys,
vm_prot_t prot);
extern void (pmap_zero_page)(
- vm_offset_t phys);
+ ppnum_t pn);
extern void (pmap_zero_part_page)(
- vm_offset_t p,
+ ppnum_t pn,
vm_offset_t offset,
vm_size_t len);
extern void (pmap_copy_page)(
- vm_offset_t src,
- vm_offset_t dest);
+ ppnum_t src,
+ ppnum_t dest);
extern void (pmap_copy_part_page)(
- vm_offset_t src,
+ ppnum_t src,
vm_offset_t src_offset,
- vm_offset_t dst,
+ ppnum_t dst,
vm_offset_t dst_offset,
vm_size_t len);
extern void (pmap_copy_part_lpage)(
vm_offset_t src,
- vm_offset_t dst,
+ ppnum_t dst,
vm_offset_t dst_offset,
vm_size_t len);
extern void (pmap_copy_part_rpage)(
- vm_offset_t src,
+ ppnum_t src,
vm_offset_t src_offset,
vm_offset_t dst,
vm_size_t len);
* debug/assertions. pmap_verify_free returns true iff
* the given physical page is mapped into no pmap.
*/
-extern boolean_t pmap_verify_free(vm_offset_t paddr);
+extern boolean_t pmap_verify_free(ppnum_t pn);
/*
* Statistics routines
extern kern_return_t (pmap_attribute_cache_sync)( /* Flush appropriate
* cache based on
- * phys addr sent */
- vm_offset_t addr,
+ * page number sent */
+ ppnum_t pn,
vm_size_t size,
vm_machine_attribute_t attribute,
vm_machine_attribute_val_t* value);
pmap_enter( \
(pmap), \
(virtual_address), \
- (page)->phys_addr, \
+ (page)->phys_page, \
(protection) & ~(page)->page_lock, \
flags, \
(wired) \
* by the hardware.
*/
/* Clear reference bit */
-extern void pmap_clear_reference(vm_offset_t paddr);
+extern void pmap_clear_reference(ppnum_t pn);
/* Return reference bit */
-extern boolean_t (pmap_is_referenced)(vm_offset_t paddr);
+extern boolean_t (pmap_is_referenced)(ppnum_t pn);
/* Set modify bit */
-extern void pmap_set_modify(vm_offset_t paddr);
+extern void pmap_set_modify(ppnum_t pn);
/* Clear modify bit */
-extern void pmap_clear_modify(vm_offset_t paddr);
+extern void pmap_clear_modify(ppnum_t pn);
/* Return modify bit */
-extern boolean_t pmap_is_modified(vm_offset_t paddr);
+extern boolean_t pmap_is_modified(ppnum_t pn);
/*
* Routines that operate on ranges of virtual addresses.
extern void pmap_remove( /* Remove mappings. */
pmap_t map,
- vm_offset_t s,
- vm_offset_t e);
+ addr64_t s,
+ addr64_t e);
+
#endif /* __APPLE_API_PRIVATE */