X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/c18c124eaa464aaaa5549e99e5a70fc9cbb50944..527f99514973766e9c0382a4d8550dfb00f54939:/osfmk/mach/vm_statistics.h?ds=sidebyside diff --git a/osfmk/mach/vm_statistics.h b/osfmk/mach/vm_statistics.h index 4f9e7172d..fa0560559 100644 --- a/osfmk/mach/vm_statistics.h +++ b/osfmk/mach/vm_statistics.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2009 Apple Inc. All rights reserved. + * Copyright (c) 2000-2016 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -290,57 +290,50 @@ typedef struct pmap_statistics *pmap_statistics_t; * queue instead of the active queue. In other words, they are not * cached so that they will be stolen first if memory runs low. */ + #define VM_FLAGS_FIXED 0x0000 #define VM_FLAGS_ANYWHERE 0x0001 #define VM_FLAGS_PURGABLE 0x0002 +#define VM_FLAGS_RANDOM_ADDR 0x0008 #define VM_FLAGS_NO_CACHE 0x0010 -#ifdef KERNEL_PRIVATE -#define VM_FLAGS_PERMANENT 0x0100 /* mapping can NEVER be unmapped */ -#define VM_FLAGS_GUARD_AFTER 0x0200 /* guard page after the mapping */ -#define VM_FLAGS_GUARD_BEFORE 0x0400 /* guard page before the mapping */ -#define VM_FLAGS_SUBMAP 0x0800 /* mapping a VM submap */ -#define VM_FLAGS_ALREADY 0x1000 /* OK if same mapping already exists */ -#define VM_FLAGS_BEYOND_MAX 0x2000 /* map beyond the map's max offset */ -#endif /* KERNEL_PRIVATE */ +#define VM_FLAGS_RESILIENT_CODESIGN 0x0020 +#define VM_FLAGS_RESILIENT_MEDIA 0x0040 #define VM_FLAGS_OVERWRITE 0x4000 /* delete any existing mappings first */ -#ifdef KERNEL_PRIVATE -#define VM_FLAGS_NO_PMAP_CHECK 0x8000 /* do not check that pmap is empty */ -#endif /* KERNEL_PRIVATE */ /* * VM_FLAGS_SUPERPAGE_MASK * 3 bits that specify whether large pages should be used instead of * base pages (!=0), as well as the requested page size. */ #define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */ -#ifdef KERNEL_PRIVATE -#define VM_FLAGS_MAP_JIT 0x80000 /* Used to mark an entry as describing a JIT region */ -#endif /* KERNEL_PRIVATE */ #define VM_FLAGS_RETURN_DATA_ADDR 0x100000 /* Return address of target data, rather than base of page */ -#ifdef KERNEL_PRIVATE -#define VM_FLAGS_IOKIT_ACCT 0x200000 /* IOKit accounting */ -#define VM_FLAGS_KEEP_MAP_LOCKED 0x400000 /* Keep the map locked when returning from vm_map_enter() */ -#endif /* KERNEL_PRIVATE */ +#define VM_FLAGS_RETURN_4K_DATA_ADDR 0x800000 /* Return 4K aligned address of target data */ #define VM_FLAGS_ALIAS_MASK 0xFF000000 #define VM_GET_FLAGS_ALIAS(flags, alias) \ (alias) = ((flags) & VM_FLAGS_ALIAS_MASK) >> 24 +#if !XNU_KERNEL_PRIVATE #define VM_SET_FLAGS_ALIAS(flags, alias) \ (flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) | \ (((alias) & ~VM_FLAGS_ALIAS_MASK) << 24)) +#endif /* !XNU_KERNEL_PRIVATE */ /* These are the flags that we accept from user-space */ #define VM_FLAGS_USER_ALLOCATE (VM_FLAGS_FIXED | \ VM_FLAGS_ANYWHERE | \ VM_FLAGS_PURGABLE | \ + VM_FLAGS_RANDOM_ADDR | \ VM_FLAGS_NO_CACHE | \ VM_FLAGS_OVERWRITE | \ VM_FLAGS_SUPERPAGE_MASK | \ VM_FLAGS_ALIAS_MASK) #define VM_FLAGS_USER_MAP (VM_FLAGS_USER_ALLOCATE | \ + VM_FLAGS_RETURN_4K_DATA_ADDR | \ VM_FLAGS_RETURN_DATA_ADDR) #define VM_FLAGS_USER_REMAP (VM_FLAGS_FIXED | \ VM_FLAGS_ANYWHERE | \ + VM_FLAGS_RANDOM_ADDR | \ VM_FLAGS_OVERWRITE| \ - VM_FLAGS_RETURN_DATA_ADDR) + VM_FLAGS_RETURN_DATA_ADDR |\ + VM_FLAGS_RESILIENT_CODESIGN) #define VM_FLAGS_SUPERPAGE_SHIFT 16 #define SUPERPAGE_NONE 0 /* no superpages, if all bits are 0 */ @@ -352,6 +345,47 @@ typedef struct pmap_statistics *pmap_statistics_t; #define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<