X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..04b8595b18b1b41ac7a206e4b3d51a635f8413d7:/osfmk/mach/mach_host.defs?ds=sidebyside diff --git a/osfmk/mach/mach_host.defs b/osfmk/mach/mach_host.defs index 0877e01cb..63d8402cd 100644 --- a/osfmk/mach/mach_host.defs +++ b/osfmk/mach/mach_host.defs @@ -1,23 +1,29 @@ /* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2009 Apple 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_COPYRIGHT@ @@ -58,11 +64,6 @@ * control. */ -#ifdef MACH_KERNEL -#include -#include -#endif /* MACH_KERNEL */ - subsystem #if KERNEL_SERVER KernelServer @@ -100,10 +101,16 @@ routine host_kernel_version( /* * Get host page size + * (compatibility for running old libraries on new kernels - + * host_page_size() is now a library routine based on constants) */ +#if KERNEL routine host_page_size( +#else +routine _host_page_size( +#endif host : host_t; - out page_size : vm_size_t); + out out_page_size : vm_size_t); /* * Allow pagers to create named entries that point to un-mapped @@ -124,10 +131,10 @@ routine mach_memory_object_memory_entry( * The returned data is an OOL array of processor info. */ routine host_processor_info( - host : host_t; - flavor : processor_flavor_t; - out processor_count : natural_t; - out processor_info : processor_info_array_t); + host : host_t; + flavor : processor_flavor_t; + out out_processor_count : natural_t; + out out_processor_info : processor_info_array_t); /* * Return host IO master access port @@ -145,7 +152,11 @@ routine host_get_clock_service( clock_id : clock_id_t; out clock_serv : clock_serv_t); - +/* + * kernel module interface (obsolete as of SnowLeopard) + * see mach/kmod.h + */ +/* kmod_ MIG calls now return KERN_NOT_SUPPORTED on PPC/i386/x86_64. */ routine kmod_get_info( host : host_t; out modules : kmod_args_t); @@ -153,9 +164,11 @@ routine kmod_get_info( /* * Returns information about the memory allocation zones. * Supported in all kernels.. + * + * DEPRECATED! Use mach_zone_info() instead. */ routine host_zone_info( - host : host_t; + host : host_priv_t; out names : zone_name_array_t, Dealloc; out info : zone_info_array_t, @@ -171,28 +184,10 @@ routine host_virtual_physical_table_info( out info : hash_info_bucket_array_t, Dealloc); -/* - * Returns information about the global reverse hash table. - * This call is only valid on MACH_IPC_DEBUG kernels. - * Otherwise, KERN_FAILURE is returned. - */ -routine host_ipc_hash_info( - host : host_t; - out info : hash_info_bucket_array_t, - Dealloc); - -/* - * JMM - These routines should be on the host_priv port. We need - * to verify the move before putting them there. - */ -routine enable_bluebox( - host : host_t; - in taskID : unsigned; - in TWI_TableStart : unsigned; - in Desc_TableStart : unsigned); -routine disable_bluebox( - host : host_t); +skip; /* was host_ipc_hash_info */ +skip; /* was enable_bluebox */ +skip; /* was disable_bluebox */ /* * JMM - Keep processor_set related items at the end for easy @@ -233,3 +228,76 @@ routine host_statistics( host_priv : host_t; flavor : host_flavor_t; out host_info_out : host_info_t, CountInOut); + +routine host_request_notification( + host : host_t; + notify_type : host_flavor_t; + notify_port : mach_port_make_send_once_t); + +routine host_lockgroup_info( + host : host_t; + out lockgroup_info : lockgroup_info_array_t, + Dealloc); + +/* + * Return 64-bit statistics from this host. + */ +routine host_statistics64( + host_priv : host_t; + flavor : host_flavor_t; + out host_info64_out : host_info64_t, CountInOut); + +/* + * Returns information about the memory allocation zones. + * Data returned is compatible with various caller and kernel + * address space sizes (unlike host_zone_info()). + */ +routine mach_zone_info( + host : host_priv_t; + out names : mach_zone_name_array_t, + Dealloc; + out info : mach_zone_info_array_t, + Dealloc); + +#ifdef PRIVATE +/* + * Forces a zone allocator garbage collections pass. + * Pages with no in-use allocations are returned to + * the VM system for re-use. + */ +routine mach_zone_force_gc( + host : host_t); +#else +skip; +#endif + +/* + * Create a new voucher by running a series of commands against + * pairs of resource attributes. + */ +routine host_create_mach_voucher( + host : host_t; + recipes : mach_voucher_attr_raw_recipe_array_t; + out voucher : ipc_voucher_t); + +/* + * Register a resource manager with the kernel. A new key is selected. + */ +routine host_register_mach_voucher_attr_manager( + host : host_t; + attr_manager : mach_voucher_attr_manager_t; + default_value : mach_voucher_attr_value_handle_t; + out new_key : mach_voucher_attr_key_t; + out new_attr_control: ipc_voucher_attr_control_t); + +/* + * Register a resource manager (with a well-known key value) with the kernel. + */ +routine host_register_well_known_mach_voucher_attr_manager( + host : host_t; + attr_manager : mach_voucher_attr_manager_t; + default_value : mach_voucher_attr_value_handle_t; + key : mach_voucher_attr_key_t; + out new_attr_control: ipc_voucher_attr_control_t); + +/* vim: set ft=c : */