Source to osfmk/mach/host_priv.defs
/*
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
*
* @APPLE_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 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.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* Matchmaker definitions file for Mach kernel interface.
*/
subsystem
#if KERNEL_USER
KernelUser
#endif /* KERNEL_USER */
#if KERNEL_SERVER
KernelServer
#endif /* KERNEL_SERVER */
host_priv 400;
#ifdef KERNEL_USER
userprefix r_;
#endif /* KERNEL_USER */
#include <mach/std_types.defs>
#include <mach/mach_types.defs>
#include <mach/clock_types.defs>
#include <mach_debug/mach_debug_types.defs>
/*
* Get boot configuration information from kernel.
*/
routine host_get_boot_info(
host_priv : host_priv_t;
out boot_info : kernel_boot_info_t);
/*
* Reboot this host.
* Only available to privileged users.
*/
routine host_reboot(
host_priv : host_priv_t;
options : int);
/*
* Return statistics from this host.
*/
routine host_statistics(
host_priv : host_priv_t;
flavor : host_flavor_t;
out host_info_out : host_info_t, CountInOut);
/*
* Sets the default memory manager, the port to which
* newly-created temporary memory objects are delivered.
* [See (memory_object_default)memory_object_create.]
* Also sets the default cluster size used for pagein/pageout
* to this port.
* The old memory manager port is returned.
*/
routine host_default_memory_manager(
host_priv : host_priv_t;
inout default_manager : memory_object_default_t =
MACH_MSG_TYPE_MAKE_SEND;
cluster_size : vm_size_t);
/*
* Specify that the range of the virtual address space
* of the target task must not cause page faults for
* the indicated accesses.
*
* [ To unwire the pages, specify VM_PROT_NONE. ]
*/
routine vm_wire(
host_priv : host_priv_t;
task : vm_map_t;
address : vm_address_t;
size : vm_size_t;
access : vm_prot_t);
/*
* Specify that the target thread must always be able
* to run and to allocate memory.
*/
routine thread_wire(
host_priv : host_priv_t;
thread : thread_act_t;
wired : boolean_t);
/*
* Allocate zero-filled, wired, contiguous physical memory
* in the address space of the target task, either at the
* specified address, or wherever space can be found (if
* anywhere is TRUE), of the specified size. The address
* at which the allocation actually took place is returned.
* All pages will be entered into the task's pmap immediately,
* with VM_PROT_ALL.
*
* In addition to all the failure modes of its cousin,
* vm_allocate, this call may also fail if insufficient
* contiguous memory exists to satisfy the request.
*
* Memory obtained from this call should be freed the
* normal way, via vm_deallocate.
*
* N.B. This is an EXPERIMENTAL interface!
*/
routine vm_allocate_cpm(
host_priv : host_priv_t;
task : vm_map_t;
inout address : vm_address_t;
size : vm_size_t;
anywhere : boolean_t);
/*
* Get list of processors on this host.
*/
routine host_processors(
host_priv : host_priv_t;
out processor_list : processor_array_t);
/*
* Get control port for a processor set.
* Privileged.
*/
routine host_get_clock_control(
host_priv : host_priv_t;
clock_id : clock_id_t;
out clock_ctrl : clock_ctrl_t);
/*
* kernel module interface
*
* see mach/kmod.h:
*/
routine kmod_create(
host_priv : host_priv_t;
info : vm_address_t;
out module : kmod_t);
routine kmod_destroy(
host_priv : host_priv_t;
module : kmod_t);
routine kmod_control(
host_priv : host_priv_t;
module : kmod_t;
flavor : kmod_control_flavor_t;
inout data : kmod_args_t);
/*
* Get a given special port for a given node.
* Norma special ports are defined in norma_special_ports.h;
* examples include the master device port.
* There are a limited number of slots available for system servers.
*/
routine host_get_special_port(
host_priv : host_priv_t;
node : int;
which : int;
out port : mach_port_t);
/*
* Set a given special port for a given node.
* See norma_get_special_port.
*/
routine host_set_special_port(
host_priv : host_priv_t;
which : int;
port : mach_port_t);
/*
* ETAP: etap_mon_reconfig
*
* The etap_mon_reconfig message allows the single server to change the
* size of the ETAP monitoring buffer.
*
* o New number of monitor buffer entries
*/
routine etap_mon_reconfig(
host_priv : host_priv_t;
nentries : int);
routine etap_new_probe(
host_priv : host_priv_t;
name : vm_address_t;
namlen : vm_size_t;
trace_on : boolean_t;
id : vm_address_t);
/*
* ETAP: etap_get_info
*
* The etap_get_info message provides the single server with
* event trace analysis package configuration information.
*
* o Number of event table entries
* o Number of subsystem table entries
* o Offset into page containing event table
* o Offset into page containing subsystem table
* o Cumulative buffer interval width
* o Monitor buffer size
* o Number of monitor buffer entries
* o Number of monitor buffers (one per cpu)
*/
routine etap_get_info(
host_priv : host_priv_t;
out et_entries : int;
out st_entries : int;
out et_offset : vm_offset_t;
out st_offset : vm_offset_t;
out cb_width : int;
out mb_size : int;
out mb_entries : int;
out mb_cpus : int);
/*
* Loads a symbol table for an external file into the kernel debugger.
* The symbol table data is an array of characters. It is assumed that
* the caller and the kernel debugger agree on its format.
* This call is only supported in MACH_DEBUG and MACH_KDB kernels,
* otherwise KERN_FAILURE is returned.
*/
routine host_load_symbol_table(
host : host_priv_t;
task : task_t;
name : symtab_name_t;
symtab : pointer_t);
/*
* Make the target task swappable or unswappable.
*/
routine task_swappable(
host_priv : host_priv_t;
target_task : task_t;
make_swappable : boolean_t);
/*
* JMM - Keep all processor_set related items at the end for easy
* removal.
*/
/*
* List all processor sets on host.
*/
routine host_processor_sets(
host_priv : host_priv_t;
out processor_sets : processor_set_name_array_t);
/*
* Get control port for a processor set.
*/
routine host_processor_set_priv(
host_priv : host_priv_t;
set_name : processor_set_name_t;
out set : processor_set_t);
/*
* Set the dynamic_pager control port. Other entities
* can request a send right to this port to talk with
* the dynamic_pager utility, setting behavioral parameters
* within the dynamic pager and getting low/high backing store
* resource notifications.
*/
routine set_dp_control_port(
host : host_priv_t;
in control_port : mach_port_t);
/*
* Get the dynamic_pager control port. This port
* allows the holder to talk directly with the dynamic
* pager utility.
*/
routine get_dp_control_port(
host : host_priv_t;
out contorl_port :mach_port_t);