X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..bca245acd4c03fd752d1a45f011ad495e60fe53d:/osfmk/mach/vm_map.defs diff --git a/osfmk/mach/vm_map.defs b/osfmk/mach/vm_map.defs index 682d98577..7caa92639 100644 --- a/osfmk/mach/vm_map.defs +++ b/osfmk/mach/vm_map.defs @@ -1,23 +1,29 @@ /* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * - * @APPLE_LICENSE_HEADER_END@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * @OSF_FREE_COPYRIGHT@ @@ -50,22 +56,34 @@ /* */ /* - * File: mach/mach_port.defs - * Author: Rich Draves + * File: mach/vm_map.defs * - * Exported kernel calls. + * Exported (native-sized) kernel VM calls. */ subsystem #if KERNEL_SERVER KernelServer -#endif KERNEL_SERVER +#endif /* KERNEL_SERVER */ vm_map 3800; #include #include #include +#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 @@ -94,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 @@ -119,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 @@ -146,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; @@ -255,13 +290,13 @@ 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; mask : vm_address_t; flags : int; - memory_object : memory_object_t; + object : mem_entry_name_port_t; offset : vm_offset_t; copy : boolean_t; cur_protection : vm_prot_t; @@ -283,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; @@ -318,7 +353,7 @@ routine mach_make_memory_entry( inout size :vm_size_t; offset :vm_offset_t; permission :vm_prot_t; - out object_handle :mach_port_move_send_t; + out object_handle :mem_entry_name_port_move_send_t; parent_entry :mem_entry_name_port_t); /* @@ -347,6 +382,7 @@ routine vm_mapped_pages_info( task : vm_map_t; out pages : page_address_array_t); +#if 0 /* * Allow application level processes to create named entries which * are backed by sub-maps which describe regions of address space. @@ -354,11 +390,13 @@ routine vm_mapped_pages_info( * in turn, can be mapped into target address spaces */ - routine vm_region_object_create( target_task :vm_map_t; in size :vm_size_t; out region_object :mach_port_move_send_t); +#else +skip; /* was vm_region_object_create */ +#endif /* * A recursive form of vm_region which probes submaps withint the @@ -383,7 +421,7 @@ routine vm_region_recurse_64( inout address : vm_address_t; out size : vm_size_t; inout nesting_depth : natural_t; - out info : vm_region_recurse_info_64_t,CountInOut); + out info : vm_region_recurse_info_t,CountInOut); routine mach_vm_region_info_64( task : vm_map_t; @@ -396,7 +434,7 @@ routine vm_region_64( inout address : vm_address_t; out size : vm_size_t; flavor : vm_region_flavor_t; - out info : vm_region_info_64_t, CountInOut; + out info : vm_region_info_t, CountInOut; out object_name : memory_object_name_t = MACH_MSG_TYPE_MOVE_SEND ctype: mach_port_t); @@ -411,16 +449,62 @@ 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; mask : vm_address_t; flags : int; - memory_object : memory_object_t; + object : mem_entry_name_port_t; offset : memory_object_offset_t; copy : boolean_t; cur_protection : vm_prot_t; max_protection : vm_prot_t; inheritance : vm_inherit_t); +#if 0 +/* + * The UPL interfaces are not ready for user-level export. + */ +routine vm_map_get_upl( + target_task : vm_map_t; + address : vm_map_offset_t; + inout size : vm_size_t; + out upl : upl_t; + out page_info : upl_page_info_array_t, CountInOut; + inout flags : integer_t; + force_data_sync : integer_t); + +routine vm_upl_map( + target_task : vm_map_t; + upl : upl_t; + inout address : vm_address_t); + +routine vm_upl_unmap( + target_task : vm_map_t; + upl : upl_t); +#else +skip; /* was vm_map_get_upl */ +skip; /* was vm_upl_map */ +skip; /* was vm_upl_unmap */ +#endif + +/* + * Control behavior and investigate state of a "purgable" object in + * the virtual address space of the target task. A purgable object is + * created via a call to vm_allocate() with VM_FLAGS_PURGABLE + * specified. See the routine implementation for a complete + * definition of the routine. + */ +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 : */