Annotation of XNU/osfmk/mach/mach_host.defs, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /*
                     23:  * @OSF_COPYRIGHT@
                     24:  */
                     25: /* 
                     26:  * Mach Operating System
                     27:  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
                     28:  * All Rights Reserved.
                     29:  * 
                     30:  * Permission to use, copy, modify and distribute this software and its
                     31:  * documentation is hereby granted, provided that both the copyright
                     32:  * notice and this permission notice appear in all copies of the
                     33:  * software, derivative works or modified versions, and any portions
                     34:  * thereof, and that both notices appear in supporting documentation.
                     35:  * 
                     36:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     37:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     38:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     39:  * 
                     40:  * Carnegie Mellon requests users of this software to return to
                     41:  * 
                     42:  *  Software Distribution Coordinator  or  [email protected]
                     43:  *  School of Computer Science
                     44:  *  Carnegie Mellon University
                     45:  *  Pittsburgh PA 15213-3890
                     46:  * 
                     47:  * any improvements or extensions that they make and grant Carnegie Mellon
                     48:  * the rights to redistribute these changes.
                     49:  */
                     50: /*
                     51:  */
                     52: 
                     53: /*
                     54:  * File:       mach/mach_host.defs
                     55:  *
                     56:  * Abstract:
                     57:  *     Mach host operations support.  Includes processor allocation and
                     58:  *     control.  
                     59:  */
                     60: 
                     61: #ifdef MACH_KERNEL
                     62: #include <mach_prof.h>
                     63: #include <advisory_pageout.h>
                     64: #endif /* MACH_KERNEL */
                     65: 
                     66: subsystem
                     67: #if    KERNEL_SERVER
                     68:          KernelServer
                     69: #endif /* KERNEL_SERVER */
                     70:                       mach_host 200;
                     71: 
                     72: /*
                     73:  *     Basic types
                     74:  */
                     75: 
                     76: #include <mach/std_types.defs>
                     77: #include <mach/mach_types.defs>
                     78: #include <mach/clock_types.defs>
                     79: #include <mach_debug/mach_debug_types.defs>
                     80: 
                     81: /*
                     82:  * References to host objects are returned by:
                     83:  *     mach_host_self() - trap
                     84:  */
                     85: 
                     86: /*
                     87:  *     Return information about this host.
                     88:  */
                     89: routine host_info(
                     90:                host            : host_t;
                     91:                flavor          : host_flavor_t;
                     92:        out     host_info_out   : host_info_t, CountInOut);
                     93: 
                     94: /*
                     95:  *     Get string describing current kernel version.
                     96:  */
                     97: routine        host_kernel_version(
                     98:                host            : host_t;
                     99:        out     kernel_version  : kernel_version_t);
                    100: 
                    101: /*
                    102:  *      Get host page size
                    103:  */
                    104: routine host_page_size(
                    105:                host            : host_t;
                    106:        out     page_size       : vm_size_t);
                    107: 
                    108: /*
                    109:  *     Allow pagers to create named entries that point to un-mapped
                    110:  *     abstract memory object.  The named entries are generally mappable
                    111:  *     and can be subsetted through the mach_make_memory_entry call
                    112:  */
                    113: routine mach_memory_object_memory_entry(
                    114:                host            :host_t;
                    115:                internal        :boolean_t;
                    116:                size            :vm_size_t;
                    117:                permission      :vm_prot_t;
                    118:                pager           :memory_object_t;
                    119:        out     entry_handle    :mach_port_move_send_t);
                    120: 
                    121: 
                    122: /*
                    123:  *     Get defined processor slots for host
                    124:  */
                    125: routine host_processor_slots(
                    126:                host            : host_t;
                    127:        out     slots           : processor_slot_t);
                    128: 
                    129: 
                    130: /*
                    131:  *     Return host node number.
                    132:  */
                    133: routine host_node_self(
                    134:                 host            : host_t;
                    135:         out     node            : int);
                    136: 
                    137: /*
                    138:  *     Get service port for a processor set.
                    139:  *     Available to all.
                    140:  */
                    141: routine host_get_clock_service(
                    142:                host            : host_t;
                    143:                clock_id        : clock_id_t;
                    144:        out     clock_serv      : clock_serv_t);
                    145: 
                    146: 
                    147: routine        kmod_get_info(
                    148:                host            : host_t;
                    149:        out     modules         : kmod_args_t);
                    150: 
                    151: /*
                    152:  *     Returns information about the memory allocation zones.
                    153:  *      Supported in all kernels..
                    154:  */
                    155: routine host_zone_info(
                    156:                host            : host_t;
                    157:        out     names           : zone_name_array_t,
                    158:                                        Dealloc;
                    159:        out     info            : zone_info_array_t,
                    160:                                        Dealloc);
                    161: 
                    162: /*
                    163:  *     Returns information about the global VP table.
                    164:  *      Only supported in MACH_VM_DEBUG kernels,
                    165:  *      otherwise returns KERN_FAILURE.
                    166:  */
                    167: routine host_virtual_physical_table_info(
                    168:                host            : host_t;
                    169:        out     info            : hash_info_bucket_array_t,
                    170:                                        Dealloc);
                    171: 
                    172: /*
                    173:  *     Returns information about the global reverse hash table.
                    174:  *      This call is only valid on MACH_IPC_DEBUG kernels.
                    175:  *      Otherwise, KERN_FAILURE is returned.
                    176:  */
                    177: routine host_ipc_hash_info(
                    178:                host            : host_t;
                    179:        out     info            : hash_info_bucket_array_t,
                    180:                                        Dealloc);
                    181: 
                    182: /*
                    183:  * JMM - These routines should be on the host_priv port.  We need
                    184:  * to verify the move before putting them there.
                    185:  */
                    186: routine enable_bluebox(
                    187:                host            : host_t;
                    188:        in      TWI_TableStart  : unsigned;
                    189:        in      Desc_TableStart : unsigned);
                    190: 
                    191: routine disable_bluebox(
                    192:                host            : host_t);
                    193: 
                    194: /*
                    195:  * JMM - Keep processor_set related items at the end for easy
                    196:  * removal.
                    197:  */
                    198: /*
                    199:  *     Get default processor set for host.
                    200:  */
                    201: routine processor_set_default(
                    202:                host            : host_t;
                    203:        out     default_set     : processor_set_name_t);
                    204: 
                    205: /*
                    206:  *     Create new processor set.  Returns real port for manipulations,
                    207:  *     and name port for obtaining information.
                    208:  */
                    209: routine processor_set_create(
                    210:                host            : host_t;
                    211:        out     new_set         : processor_set_t;
                    212:        out     new_name        : processor_set_name_t);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.