#include <mach/boolean.h>
#include <mach/vm_prot.h>
+#include <kern/trustcache.h>
+
#ifdef KERNEL_PRIVATE
/*
if (__obj->internal) { \
__options |= PMAP_OPTIONS_INTERNAL; \
} \
- if (__page->reusable || __obj->all_reusable) { \
+ if (__page->vmp_reusable || __obj->all_reusable) { \
__options |= PMAP_OPTIONS_REUSABLE; \
} \
result = pmap_enter_options(__pmap, \
if (__obj->internal) { \
__extra_options |= PMAP_OPTIONS_INTERNAL; \
} \
- if (__page->reusable || __obj->all_reusable) { \
+ if (__page->vmp_reusable || __obj->all_reusable) { \
__extra_options |= PMAP_OPTIONS_REUSABLE; \
} \
result = pmap_enter_options(__pmap, \
#define PMAP_ENTER_CHECK(pmap, page) \
{ \
- if ((page)->error) { \
+ if ((page)->vmp_error) { \
panic("VM page %p should not have an error\n", \
(page)); \
} \
* iff page was modified */
#define PMAP_OPTIONS_PROTECT_IMMEDIATE 0x1000 /* allow protections to be
* be upgraded */
+#define PMAP_OPTIONS_CLEAR_WRITE 0x2000
#if !defined(__LP64__)
/* Inform the pmap layer that there is a JIT entry in this map. */
extern void pmap_set_jit_entitled(pmap_t pmap);
+/*
+ * Tell the pmap layer what range within the nested region the VM intends to
+ * use.
+ */
+extern void pmap_trim(pmap_t grand, pmap_t subord, addr64_t vstart, addr64_t nstart, uint64_t size);
+
+/*
+ * Dump page table contents into the specified buffer. Returns the number of
+ * bytes copied, 0 if insufficient space, (size_t)-1 if unsupported.
+ * This is expected to only be called from kernel debugger context,
+ * so synchronization is not required.
+ */
+
+extern size_t pmap_dump_page_tables(pmap_t pmap, void *bufp, void *buf_end);
+
/*
* Indicates if any special policy is applied to this protection by the pmap
* layer.
* Causes the pmap to return any available pages that it can return cheaply to
* the VM.
*/
-void pmap_release_pages_fast(void);
+uint64_t pmap_release_pages_fast(void);
#define PMAP_QUERY_PAGE_PRESENT 0x01
#define PMAP_QUERY_PAGE_REUSABLE 0x02
kern_return_t pmap_pgtrace_fault(pmap_t pmap, vm_map_offset_t va, arm_saved_state_t *ss);
#endif
+
+extern void pmap_ledger_alloc_init(size_t);
+extern ledger_t pmap_ledger_alloc(void);
+extern void pmap_ledger_free(ledger_t);
+
#endif /* KERNEL_PRIVATE */
#endif /* _VM_PMAP_H_ */