Annotation of XNU/osfmk/mach/host_priv.defs, revision 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,1988 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:  *     Matchmaker definitions file for Mach kernel interface.
        !            55:  */
        !            56: subsystem
        !            57: #if    KERNEL_USER
        !            58:          KernelUser
        !            59: #endif /* KERNEL_USER */
        !            60: #if    KERNEL_SERVER
        !            61:          KernelServer
        !            62: #endif /* KERNEL_SERVER */
        !            63:                       host_priv 400;
        !            64: 
        !            65: #ifdef KERNEL_USER
        !            66: userprefix r_;
        !            67: #endif /* KERNEL_USER */
        !            68: 
        !            69: #include <mach/std_types.defs>
        !            70: #include <mach/mach_types.defs>
        !            71: #include <mach/clock_types.defs>
        !            72: #include <mach_debug/mach_debug_types.defs>
        !            73: 
        !            74: /*
        !            75:  *      Get boot configuration information from kernel.
        !            76:  */
        !            77: routine host_get_boot_info(
        !            78:                host_priv       : host_priv_t;
        !            79:        out     boot_info       : kernel_boot_info_t);
        !            80: 
        !            81: /*
        !            82:  *     Reboot this host.
        !            83:  *     Only available to privileged users.
        !            84:  */
        !            85: routine host_reboot(
        !            86:                host_priv       : host_priv_t;
        !            87:                options         : int);
        !            88: 
        !            89: 
        !            90: /*
        !            91:  *     Return statistics from this host.
        !            92:  */
        !            93: routine host_statistics(
        !            94:                host_priv       : host_priv_t;
        !            95:                flavor          : host_flavor_t;
        !            96:        out     host_info_out   : host_info_t, CountInOut);
        !            97: 
        !            98: /*
        !            99:  *     Sets the default memory manager, the port to which
        !           100:  *     newly-created temporary memory objects are delivered.
        !           101:  *     [See (memory_object_default)memory_object_create.]
        !           102:  *     Also sets the default cluster size used for pagein/pageout
        !           103:  *     to this port.
        !           104:  *     The old memory manager port is returned.
        !           105:  */
        !           106: routine host_default_memory_manager(
        !           107:                host_priv       : host_priv_t;
        !           108:        inout   default_manager : memory_object_default_t = 
        !           109:                                        MACH_MSG_TYPE_MAKE_SEND;
        !           110:                cluster_size    : vm_size_t);
        !           111: 
        !           112: 
        !           113: /*
        !           114:  *     Specify that the range of the virtual address space
        !           115:  *     of the target task must not cause page faults for
        !           116:  *     the indicated accesses.
        !           117:  *
        !           118:  *     [ To unwire the pages, specify VM_PROT_NONE. ]
        !           119:  */
        !           120: routine        vm_wire(
        !           121:                host_priv       : host_priv_t;
        !           122:                task            : vm_map_t;
        !           123:                address         : vm_address_t;
        !           124:                size            : vm_size_t;
        !           125:                access          : vm_prot_t);
        !           126: 
        !           127: /*
        !           128:  *     Specify that the target thread must always be able
        !           129:  *     to run and to allocate memory.
        !           130:  */
        !           131: routine        thread_wire(
        !           132:                host_priv       : host_priv_t;
        !           133:                thread          : thread_act_t;
        !           134:                wired           : boolean_t);
        !           135: 
        !           136: /*
        !           137:  *     Allocate zero-filled, wired, contiguous physical memory
        !           138:  *     in the address space of the target task, either at the
        !           139:  *     specified address, or wherever space can be found (if
        !           140:  *     anywhere is TRUE), of the specified size.  The address
        !           141:  *     at which the allocation actually took place is returned.
        !           142:  *     All pages will be entered into the task's pmap immediately,
        !           143:  *     with VM_PROT_ALL.
        !           144:  *
        !           145:  *     In addition to all the failure modes of its cousin,
        !           146:  *     vm_allocate, this call may also fail if insufficient
        !           147:  *     contiguous memory exists to satisfy the request.
        !           148:  *
        !           149:  *     Memory obtained from this call should be freed the
        !           150:  *     normal way, via vm_deallocate.
        !           151:  *
        !           152:  *     N.B.  This is an EXPERIMENTAL interface!
        !           153:  */
        !           154: routine        vm_allocate_cpm(
        !           155:                host_priv       : host_priv_t;
        !           156:                task            : vm_map_t;
        !           157:        inout   address         : vm_address_t;
        !           158:                size            : vm_size_t;
        !           159:                anywhere        : boolean_t);
        !           160: 
        !           161: /*
        !           162:  *     Get list of processors on this host.
        !           163:  */
        !           164: routine host_processors(
        !           165:                host_priv       : host_priv_t;
        !           166:        out     processor_list  : processor_array_t);
        !           167: 
        !           168: 
        !           169: /*
        !           170:  *     Get control port for a processor set.
        !           171:  *     Privileged.
        !           172:  */
        !           173: routine host_get_clock_control(
        !           174:                host_priv       : host_priv_t;
        !           175:                clock_id        : clock_id_t;
        !           176:        out     clock_ctrl      : clock_ctrl_t);
        !           177: 
        !           178: 
        !           179: /*
        !           180:  *     kernel module interface
        !           181:  * 
        !           182:  *     see mach/kmod.h:
        !           183:  */
        !           184: routine kmod_create(
        !           185:                host_priv       : host_priv_t;
        !           186:                info            : vm_address_t;
        !           187:        out     module          : kmod_t);
        !           188: 
        !           189: routine kmod_destroy(
        !           190:                host_priv       : host_priv_t;
        !           191:                module          : kmod_t);
        !           192: 
        !           193: routine        kmod_control(
        !           194:                host_priv       : host_priv_t;
        !           195:                module          : kmod_t;
        !           196:                flavor          : kmod_control_flavor_t;
        !           197:        inout   data            : kmod_args_t);
        !           198: 
        !           199: /*
        !           200:  *     Get a given special port for a given node.
        !           201:  *     Norma special ports are defined in norma_special_ports.h;
        !           202:  *     examples include the master device port.
        !           203:  *     There are a limited number of slots available for system servers.
        !           204:  */
        !           205: routine host_get_special_port(
        !           206:                 host_priv       : host_priv_t;
        !           207:                 node            : int;
        !           208:                 which           : int;
        !           209:         out     port            : mach_port_t);
        !           210: 
        !           211: /*
        !           212:  *     Set a given special port for a given node.
        !           213:  *     See norma_get_special_port.
        !           214:  */
        !           215: routine host_set_special_port(
        !           216:                 host_priv       : host_priv_t;
        !           217:                 which           : int;
        !           218:                 port            : mach_port_t);
        !           219: 
        !           220: /*
        !           221:  *      ETAP: etap_mon_reconfig
        !           222:  *
        !           223:  *      The etap_mon_reconfig message allows the single server to change the
        !           224:  *     size of the ETAP monitoring buffer.
        !           225:  *
        !           226:  *      o New number of monitor buffer entries
        !           227:  */
        !           228: routine etap_mon_reconfig(
        !           229:                 host_priv      : host_priv_t;
        !           230:                nentries        : int);
        !           231: 
        !           232: routine etap_new_probe(
        !           233:                host_priv       : host_priv_t;
        !           234:                name            : vm_address_t;
        !           235:                namlen          : vm_size_t;
        !           236:                trace_on        : boolean_t;
        !           237:                id              : vm_address_t);
        !           238: 
        !           239: /*
        !           240:  *      ETAP: etap_get_info
        !           241:  *
        !           242:  *      The etap_get_info message provides the single server with
        !           243:  *      event trace analysis package configuration information.
        !           244:  *
        !           245:  *       o  Number of event table entries
        !           246:  *       o  Number of subsystem table entries
        !           247:  *       o  Offset into page containing event table
        !           248:  *       o  Offset into page containing subsystem table
        !           249:  *       o  Cumulative buffer interval width
        !           250:  *       o  Monitor buffer size
        !           251:  *       o  Number of monitor buffer entries
        !           252:  *       o  Number of monitor buffers (one per cpu)
        !           253:  */
        !           254: routine etap_get_info(
        !           255:                 host_priv      : host_priv_t;
        !           256:         out     et_entries     : int;
        !           257:         out     st_entries     : int;
        !           258:         out     et_offset      : vm_offset_t;
        !           259:         out     st_offset      : vm_offset_t;
        !           260:         out     cb_width       : int;
        !           261:         out     mb_size                : int;
        !           262:         out     mb_entries     : int;
        !           263:         out     mb_cpus                : int);
        !           264: 
        !           265: /*
        !           266:  *     Loads a symbol table for an external file into the kernel debugger.
        !           267:  *     The symbol table data is an array of characters.  It is assumed that
        !           268:  *     the caller and the kernel debugger agree on its format.
        !           269:  *      This call is only supported in MACH_DEBUG and MACH_KDB kernels,
        !           270:  *      otherwise KERN_FAILURE is returned.
        !           271:  */
        !           272: routine host_load_symbol_table(
        !           273:                host            : host_priv_t;
        !           274:                task            : task_t;
        !           275:                name            : symtab_name_t;
        !           276:                symtab          : pointer_t);
        !           277: 
        !           278: /*
        !           279:  *     Make the target task swappable or unswappable.
        !           280:  */
        !           281: routine task_swappable(
        !           282:                host_priv       : host_priv_t;
        !           283:                target_task     : task_t;
        !           284:                make_swappable  : boolean_t);
        !           285: 
        !           286: /*
        !           287:  * JMM - Keep all processor_set related items at the end for easy
        !           288:  * removal.
        !           289:  */
        !           290: /*
        !           291:  *     List all processor sets on host.
        !           292:  */
        !           293: routine host_processor_sets(
        !           294:                host_priv       : host_priv_t;
        !           295:        out     processor_sets  : processor_set_name_array_t);
        !           296: 
        !           297: /*
        !           298:  *     Get control port for a processor set.
        !           299:  */
        !           300: routine host_processor_set_priv(
        !           301:                host_priv       : host_priv_t;
        !           302:                set_name        : processor_set_name_t;
        !           303:        out     set             : processor_set_t);
        !           304: /*
        !           305:  *     Set the dynamic_pager control port. Other entities
        !           306:  *     can request a send right to this port to talk with
        !           307:  *     the dynamic_pager utility, setting behavioral parameters
        !           308:  *     within the dynamic pager and getting low/high backing store
        !           309:  *     resource notifications.
        !           310:  */
        !           311: routine set_dp_control_port(    
        !           312:                host            : host_priv_t;
        !           313:        in      control_port    : mach_port_t);
        !           314: 
        !           315: /*
        !           316:  *     Get the dynamic_pager control port.  This port
        !           317:  *     allows the holder to talk directly with the dynamic
        !           318:  *     pager utility.
        !           319:  */
        !           320: routine get_dp_control_port(    
        !           321:                host            : host_priv_t;
        !           322:        out     contorl_port    :mach_port_t);
        !           323: 
        !           324: 

unix.superglobalmegacorp.com

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