]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/mach/mach_host.defs
xnu-6153.121.1.tar.gz
[apple/xnu.git] / osfmk / mach / mach_host.defs
index 7f544894938049466ee781eb0c89ea361fb120f4..a1b55f5eba2f6da3d2bff8f28e0220a9e61df0b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2009 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  *     control.  
  */
 
  *     control.  
  */
 
-#ifdef MACH_KERNEL
-#include <mach_prof.h>
-#include <advisory_pageout.h>
-#endif /* MACH_KERNEL */
-
 subsystem
 #if    KERNEL_SERVER
          KernelServer
 subsystem
 #if    KERNEL_SERVER
          KernelServer
@@ -106,8 +101,14 @@ routine    host_kernel_version(
 
 /*
  *      Get host page size
 
 /*
  *      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(
 routine host_page_size(
+#else
+routine _host_page_size(
+#endif
                host            : host_t;
        out     out_page_size   : vm_size_t);
 
                host            : host_t;
        out     out_page_size   : vm_size_t);
 
@@ -151,21 +152,17 @@ routine host_get_clock_service(
                clock_id        : clock_id_t;
        out     clock_serv      : clock_serv_t);
 
                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);
 
 routine        kmod_get_info(
                host            : host_t;
        out     modules         : kmod_args_t);
 
-/*
- *     Returns information about the memory allocation zones.
- *      Supported in all kernels..
- */
-routine host_zone_info(
-               host            : host_t;
-       out     names           : zone_name_array_t,
-                                       Dealloc;
-       out     info            : zone_info_array_t,
-                                       Dealloc);
+
+skip; /* was host_zone_info */
 
 /*
  *     Returns information about the global VP table.
 
 /*
  *     Returns information about the global VP table.
@@ -177,28 +174,10 @@ routine host_virtual_physical_table_info(
        out     info            : hash_info_bucket_array_t,
                                        Dealloc);
 
        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
 
 /*
  * JMM - Keep processor_set related items at the end for easy
@@ -235,7 +214,12 @@ routine mach_memory_object_memory_entry_64(
 /*
  *     Return statistics from this host.
  */
 /*
  *     Return statistics from this host.
  */
-routine host_statistics(
+routine
+#ifdef KERNEL_SERVER
+host_statistics_from_user(
+#else
+host_statistics(
+#endif
                host_priv       : host_t;
                flavor          : host_flavor_t;
        out     host_info_out   : host_info_t, CountInOut);
                host_priv       : host_t;
                flavor          : host_flavor_t;
        out     host_info_out   : host_info_t, CountInOut);
@@ -250,3 +234,172 @@ routine host_lockgroup_info(
        out     lockgroup_info  : lockgroup_info_array_t,
                                        Dealloc);
 
        out     lockgroup_info  : lockgroup_info_array_t,
                                        Dealloc);
 
+/*
+ *     Return 64-bit statistics from this host.
+ */
+routine
+#ifdef KERNEL_SERVER
+host_statistics64_from_user(
+#else
+host_statistics64(
+#endif
+               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.
+ */
+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
+ *     <key, previous-voucher> pairs of resource attributes.
+ */
+#if !KERNEL && !LIBSYSCALL_INTERFACE
+routine _kernelrpc_host_create_mach_voucher(
+#else
+routine host_create_mach_voucher(
+#endif
+               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);
+
+
+/*
+ * Update the global ATM diagnostic flag, readable from the commpage
+ */
+routine host_set_atm_diagnostic_flag(
+               host            : host_t;
+       in      diagnostic_flag : uint32_t);
+
+#if !KERNEL && LIBSYSCALL_INTERFACE
+routine host_get_atm_diagnostic_flag(
+               host            : host_t;
+       out     diagnostic_flag : uint32_t);
+#else
+skip;
+#endif
+
+routine mach_memory_info(
+               host            : host_priv_t;
+       out     names           : mach_zone_name_array_t,
+                                       Dealloc;
+       out     info            : mach_zone_info_array_t,
+                                       Dealloc;
+       out     memory_info     : mach_memory_info_array_t,
+                                       Dealloc);
+
+/*
+ * Update the global multiuser flags, readable from the commpage
+ */
+routine host_set_multiuser_config_flags(
+               host_priv               : host_priv_t;
+       in      multiuser_flags : uint32_t);
+
+#if !KERNEL && LIBSYSCALL_INTERFACE
+routine host_get_multiuser_config_flags(
+               host                    : host_t;
+       out     multiuser_flags : uint32_t);
+#else
+skip;
+#endif // !KERNEL && LIBSYSCALL_INTERFACE
+
+#if !KERNEL && LIBSYSCALL_INTERFACE
+routine host_check_multiuser_mode(
+               host                    : host_t;
+       out     multiuser_mode  : uint32_t);
+#else
+skip;
+#endif // !KERNEL && LIBSYSCALL_INTERFACE
+
+/*
+ * Returns information about a specific zone.
+ * The zone name is passed in via the argument name,
+ * info returns the zone info.
+ */
+routine mach_zone_info_for_zone(
+               host            : host_priv_t;
+               name            : mach_zone_name_t;
+       out     info            : mach_zone_info_t);
+
+#ifdef PRIVATE
+/*
+ * Returns information about the largest zone.
+ * name returns the zone name, info returns the zone info.
+ */
+routine mach_zone_info_for_largest_zone(
+               host            : host_priv_t;
+       out     name            : mach_zone_name_t;
+       out     info            : mach_zone_info_t);
+#else
+skip;
+#endif
+
+#ifdef PRIVATE
+/*
+ * Returns names of zones that have zlog enabled.
+ */
+routine mach_zone_get_zlog_zones(
+               host            : host_priv_t;
+       out     names           : mach_zone_name_array_t,
+                                       Dealloc);
+#else
+skip;
+#endif
+
+#ifdef PRIVATE
+/*
+ * Returns BTLog records for a specific zone.
+ * The zone name is passed in via the argument name,
+ * recs returns an array of zone_btrecord_t's.
+ */
+routine mach_zone_get_btlog_records(
+               host            : host_priv_t;
+               name            : mach_zone_name_t;
+       out     recs            : zone_btrecord_array_t,
+                                       Dealloc);
+#else
+skip;
+#endif
+
+/* vim: set ft=c : */