]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/mach/vm_map.defs
xnu-6153.121.1.tar.gz
[apple/xnu.git] / osfmk / mach / vm_map.defs
index e26dfce693630bbade5c50aedcd75c1c3f542759..7caa92639bf8e55eb53620aa1f0ee6082c571bb4 100644 (file)
@@ -71,6 +71,19 @@ subsystem
 #include <mach/mach_types.defs>
 #include <mach_debug/mach_debug_types.defs>
 
+#define CONCAT(a,b) a ## b
+#if !KERNEL && !LIBSYSCALL_INTERFACE
+#define PREFIX(NAME) CONCAT(_kernelrpc_, NAME)
+#else
+#define PREFIX(NAME) NAME
+#endif
+
+#if    KERNEL_SERVER
+#define KERNEL_SERVER_SUFFIX(NAME) CONCAT(NAME, _external)
+#else
+#define KERNEL_SERVER_SUFFIX(NAME) NAME
+#endif
+
 /*
  *      Returns information about the contents of the virtual
  *      address space of the target task at the specified
@@ -99,21 +112,33 @@ routine vm_region(
  *     of the specified size.  The address at which the
  *     allocation actually took place is returned.
  */
-routine vm_allocate(
+
+#if !KERNEL && !LIBSYSCALL_INTERFACE
+skip;
+#else
+routine PREFIX(KERNEL_SERVER_SUFFIX(vm_allocate))(
                target_task     : vm_task_entry_t;
        inout   address         : vm_address_t;
                size            : vm_size_t;
                flags           : int);
 
+#endif
+
 /*
  *     Deallocate the specified range from the virtual
  *     address space of the target task.
  */
-routine vm_deallocate(
+
+#if !KERNEL && !LIBSYSCALL_INTERFACE
+skip;
+#else
+routine PREFIX(vm_deallocate)(
                target_task     : vm_task_entry_t;
                address         : vm_address_t;
                size            : vm_size_t);
 
+#endif
+
 /*
  *     Set the current or maximum protection attribute
  *     for the specified range of the virtual address
@@ -124,12 +149,17 @@ routine vm_deallocate(
  *     Protections are specified as a set of {read, write, execute}
  *     *permissions*.
  */
-routine vm_protect(
+
+#if !KERNEL && !LIBSYSCALL_INTERFACE
+skip;
+#else
+routine PREFIX(vm_protect)(
                target_task     : vm_task_entry_t;
                address         : vm_address_t;
                size            : vm_size_t;
                set_maximum     : boolean_t;
                new_protection  : vm_prot_t);
+#endif
 
 /*
  *     Set the inheritance attribute for the specified range
@@ -151,7 +181,7 @@ routine vm_inherit(
  *     and must be a multiple of pages in extent.  The
  *     protection on the specified range must permit reading.]
  */
-routine vm_read(
+routine PREFIX(vm_read) (
                target_task     : vm_map_t;
                address         : vm_address_t;
                size            : vm_size_t;
@@ -260,7 +290,7 @@ routine vm_behavior_set(
  *     The user-defined memory manager for this object is responsible
  *     for further consistency.]
  */
-routine vm_map(
+routine PREFIX(KERNEL_SERVER_SUFFIX(vm_map)) (
                target_task     : vm_task_entry_t;
        inout   address         : vm_address_t;
                size            : vm_size_t;
@@ -288,12 +318,12 @@ routine vm_machine_attribute(
 /*
  *      Map portion of a task's address space.
  */
-routine vm_remap(
+routine PREFIX(KERNEL_SERVER_SUFFIX(vm_remap)) (
                target_task     : vm_map_t;
        inout   target_address  : vm_address_t;
                size            : vm_size_t;
                mask            : vm_address_t;
-               anywhere        : boolean_t;
+               flags           : int;
                src_task        : vm_map_t;
                src_address     : vm_address_t;
                copy            : boolean_t;
@@ -419,7 +449,7 @@ routine mach_make_memory_entry_64(
 
 
 
-routine vm_map_64(
+routine KERNEL_SERVER_SUFFIX(vm_map_64)(
                target_task     : vm_task_entry_t;
        inout   address         : vm_address_t;
                size            : vm_size_t;
@@ -438,7 +468,7 @@ routine vm_map_64(
  */
 routine vm_map_get_upl(
                target_task     : vm_map_t;
-               address         : vm_address_t;
+               address         : vm_map_offset_t;
        inout   size            : vm_size_t;
        out     upl             : upl_t;
        out     page_info       : upl_page_info_array_t, CountInOut;
@@ -466,10 +496,15 @@ skip; /* was vm_upl_unmap */
  *     specified.  See the routine implementation for a complete
  *     definition of the routine.
  */
-routine vm_purgable_control(
+routine PREFIX(vm_purgable_control) (
                target_task     : vm_map_t;
                address         : vm_address_t;
                control         : vm_purgable_t;
        inout   state           : int);
 
 
+routine vm_map_exec_lockdown(
+               target_task     : vm_map_t);
+
+
+/* vim: set ft=c : */