···11-/*
22- * Copyright (c) 2004-2008, Apple Inc. All rights reserved.
33- *
44- * @APPLE_BSD_LICENSE_HEADER_START@
55- *
66- * Redistribution and use in source and binary forms, with or without
77- * modification, are permitted provided that the following conditions
88- * are met:
99- *
1010- * 1. Redistributions of source code must retain the above copyright
1111- * notice, this list of conditions and the following disclaimer.
1212- * 2. Redistributions in binary form must reproduce the above copyright
1313- * notice, this list of conditions and the following disclaimer in the
1414- * documentation and/or other materials provided with the distribution.
1515- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
1616- * its contributors may be used to endorse or promote products derived
1717- * from this software without specific prior written permission.
1818- *
1919- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
2020- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2121- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2222- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
2323- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2424- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2525- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2626- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2727- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2828- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929- *
3030- * @APPLE_BSD_LICENSE_HEADER_END@
3131-*/
3232-3333-/*
3434- * Interface definition for the audit logging facility.
3535- */
3636-3737-subsystem
3838-#if KERNEL_USER
3939- KernelUser
4040-#endif /* KERNEL_USER */
4141- audit_triggers 123;
4242-4343-#include <mach/std_types.defs>
4444-#include <mach/mach_types.defs>
4545-4646-simpleroutine audit_triggers(
4747- audit_port : mach_port_t;
4848- in flags : int);
4949-
-81
src/kernel/mach/clock.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * File: mach/clock.defs
3333- * Purpose: Kernel clock subsystem definitions. This
3434- * file defines the clock request interface.
3535- */
3636-3737-subsystem
3838-#if KERNEL_SERVER
3939- KernelServer
4040-#endif /* KERNEL_SERVER */
4141- clock 1000;
4242-4343-#include <mach/std_types.defs>
4444-#include <mach/mach_types.defs>
4545-#include <mach/clock_types.defs>
4646-4747-/*
4848- * References to clock objects are returned by:
4949- * host_get_clock_service(host_t,...)
5050- * host_get_clock_control(host_priv_t,...) - Priviledged subclass
5151- */
5252-5353-/*
5454- * Get the clock time.
5555- * Available to all.
5656- */
5757-routine clock_get_time(
5858- clock_serv : clock_serv_t;
5959- out cur_time : mach_timespec_t);
6060-6161-/*
6262- * Get clock attributes.
6363- * Available to all.
6464- */
6565-routine clock_get_attributes(
6666- clock_serv : clock_serv_t;
6767- in flavor : clock_flavor_t;
6868- out clock_attr : clock_attr_t, CountInOut);
6969-7070-/*
7171- * Setup a clock alarm.
7272- * Available to all.
7373- */
7474-routine clock_alarm(
7575- clock_serv : clock_serv_t;
7676- alarm_type : alarm_type_t;
7777- alarm_time : mach_timespec_t;
7878- alarm_port : clock_reply_t =
7979- MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);
8080-8181-/* vim: set ft=c : */
-69
src/kernel/mach/clock_priv.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * File: mach/clock_priv.defs
3333- * Purpose: Kernel clock subsystem definitions. This
3434- * file defines the clock request interface.
3535- */
3636-3737-subsystem
3838-#if KERNEL_SERVER
3939- KernelServer
4040-#endif /* KERNEL_SERVER */
4141- clock_priv 1200;
4242-4343-#include <mach/std_types.defs>
4444-#include <mach/mach_types.defs>
4545-#include <mach/clock_types.defs>
4646-4747-/*
4848- * References to clock_priv objects are returned by:
4949- * host_get_clock_control(host_priv_t,...) - Priviledged subclass
5050- */
5151-5252-/*
5353- * Set the clock time.
5454- * Privileged.
5555- */
5656-routine clock_set_time(
5757- clock_ctrl : clock_ctrl_t;
5858- new_time : mach_timespec_t);
5959-6060-/*
6161- * Set clock attributes.
6262- * Privileged.
6363- */
6464-routine clock_set_attributes(
6565- clock_ctrl : clock_ctrl_t;
6666- in flavor : clock_flavor_t;
6767- in clock_attr : clock_attr_t);
6868-6969-/* vim: set ft=c : */
-56
src/kernel/mach/clock_reply.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * File: clock_reply.defs
3333- * Purpose: Kernel clock subsystem definitions. This
3434- * file defines the clock reply interface.
3535- */
3636-3737-subsystem
3838-#if KERNEL_USER
3939- KernelUser
4040-#endif /* KERNEL_USER */
4141- clock_reply 3125107; /* Matches up with old value */
4242-4343-#include <mach/std_types.defs>
4444-#include <mach/clock_types.defs>
4545-4646-4747-/*
4848- * Reply routine for clock_alarm.
4949- */
5050-simpleroutine clock_alarm_reply(
5151- alarm_port : clock_reply_t;
5252- alarm_code : kern_return_t;
5353- alarm_type : alarm_type_t;
5454- alarm_time : mach_timespec_t);
5555-5656-/* vim: set ft=c : */
-73
src/kernel/mach/clock_types.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * File: clock_types.defs
3333- * Purpose:
3434- * Clock kernel interface type declarations
3535- */
3636-3737-#ifndef _MACH_CLOCK_TYPES_DEFS_
3838-#define _MACH_CLOCK_TYPES_DEFS_
3939-4040-#include <mach/std_types.defs>
4141-4242-type clock_serv_t = mach_port_t
4343- cusertype: clock_serv_t
4444-#if KERNEL_SERVER
4545- intran: clock_serv_t convert_port_to_clock(mach_port_t)
4646- outtran: mach_port_t convert_clock_to_port(clock_serv_t)
4747-#endif /* KERNEL_SERVER */
4848- ;
4949-5050-type clock_ctrl_t = mach_port_t
5151- cusertype: clock_ctrl_t
5252-#if KERNEL_SERVER
5353- intran: clock_ctrl_t convert_port_to_clock_ctrl(mach_port_t)
5454- outtran: mach_port_t convert_clock_ctrl_to_port(clock_ctrl_t)
5555-#endif /* KERNEL_SERVER */
5656- ;
5757-5858-type clock_reply_t = polymorphic|MACH_MSG_TYPE_MAKE_SEND_ONCE;
5959-6060-type clock_flavor_t = int;
6161-type clock_attr_t = array[*:1] of int;
6262-type mach_timespec_t = struct[2] of int;
6363-type time_t = int;
6464-type sleep_type_t = int;
6565-type alarm_type_t = int;
6666-type clock_res_t = int;
6767-type clock_id_t = int;
6868-6969-import <mach/mach_types.h>;
7070-7171-#endif /* _MACH_CLOCK_TYPES_DEFS_ */
7272-7373-/* vim: set ft=c : */
-22
src/kernel/mach/coalition_notification.defs
···11-/*
22- * Copyright (c) 2013, Apple Inc. All rights reserved.
33- */
44-55- /*
66- * Interface definition for the coalition facility.
77- */
88-99-subsystem
1010-#if KERNEL_USER
1111- KernelUser
1212-#endif /* KERNEL_USER */
1313- coalition_notification 5300;
1414-1515-#include <mach/std_types.defs>
1616-#include <mach/mach_types.defs>
1717-1818-/* This is likely to change with 15385886. */
1919-simpleroutine coalition_notification(
2020- RequestPort coalition_port : mach_port_t;
2121- in id : uint64_t;
2222- in flags : uint32_t);
-119
src/kernel/mach/exc.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * Abstract:
6060- * MiG definitions file for Mach exception interface.
6161- */
6262-6363-subsystem
6464-#if KERNEL_USER
6565- KernelUser
6666-#endif
6767- exc 2401;
6868-6969-#include <mach/std_types.defs>
7070-#include <mach/mach_types.defs>
7171-7272-ServerPrefix catch_;
7373-7474-type exception_data_t = array[*:2] of integer_t;
7575-type exception_type_t = int;
7676-7777-routine exception_raise(
7878-#if KERNEL_USER
7979- exception_port : mach_port_move_send_t;
8080- thread : mach_port_move_send_t;
8181- task : mach_port_move_send_t;
8282-#else /* KERNEL_USER */
8383- exception_port : mach_port_t;
8484- thread : mach_port_t;
8585- task : mach_port_t;
8686-#endif /* KERNEL_USER */
8787- exception : exception_type_t;
8888- code : exception_data_t
8989- );
9090-9191-routine exception_raise_state(
9292-#if KERNEL_USER
9393- exception_port : mach_port_move_send_t;
9494-#else /* KERNEL_USER */
9595- exception_port : mach_port_t;
9696-#endif /* KERNEL_USER */
9797- exception : exception_type_t;
9898- code : exception_data_t, const;
9999- inout flavor : int;
100100- old_state : thread_state_t, const;
101101- out new_state : thread_state_t);
102102-103103-routine exception_raise_state_identity(
104104-#if KERNEL_USER
105105- exception_port : mach_port_move_send_t;
106106- thread : mach_port_move_send_t;
107107- task : mach_port_move_send_t;
108108-#else /* KERNEL_USER */
109109- exception_port : mach_port_t;
110110- thread : mach_port_t;
111111- task : mach_port_t;
112112-#endif /* KERNEL_USER */
113113- exception : exception_type_t;
114114- code : exception_data_t;
115115- inout flavor : int;
116116- old_state : thread_state_t;
117117- out new_state : thread_state_t);
118118-119119-/* vim: set ft=c : */
-40
src/kernel/mach/host_notify_reply.defs
···11-/*
22- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-2929-subsystem
3030-#if KERNEL_USER
3131- KernelUser
3232-#endif /* KERN_USER */
3333- host_notify_reply 950;
3434-3535-#include <mach/std_types.defs>
3636-3737-simpleroutine host_calendar_changed(
3838- notify_port : mach_port_move_send_once_t);
3939-4040-/* vim: set ft=c : */
-369
src/kernel/mach/host_priv.defs
···11-/*
22- * Copyright (c) 2000-2004 Apple Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-5959-/*
6060- * Matchmaker definitions file for Mach kernel interface.
6161- */
6262-subsystem
6363-#if KERNEL_USER
6464- KernelUser
6565-#endif /* KERNEL_USER */
6666-#if KERNEL_SERVER
6767- KernelServer
6868-#endif /* KERNEL_SERVER */
6969- host_priv 400;
7070-7171-#ifdef KERNEL_USER
7272-userprefix r_;
7373-#endif /* KERNEL_USER */
7474-7575-#include <mach/std_types.defs>
7676-#include <mach/mach_types.defs>
7777-#include <mach/clock_types.defs>
7878-#include <mach_debug/mach_debug_types.defs>
7979-8080-/*
8181- * Get boot configuration information from kernel.
8282- */
8383-routine host_get_boot_info(
8484- host_priv : host_priv_t;
8585- out boot_info : kernel_boot_info_t);
8686-8787-/*
8888- * Reboot this host.
8989- * Only available to privileged users.
9090- */
9191-routine host_reboot(
9292- host_priv : host_priv_t;
9393- options : int);
9494-9595-9696-/*
9797- * Return privileged statistics from this host.
9898- */
9999-routine host_priv_statistics(
100100- host_priv : host_priv_t;
101101- flavor : host_flavor_t;
102102- out host_info_out : host_info_t, CountInOut);
103103-104104-/*
105105- * Sets the default memory manager, the port to which
106106- * newly-created temporary memory objects are delivered.
107107- * [See (memory_object_default)memory_object_create.]
108108- * Also sets the default cluster size used for pagein/pageout
109109- * to this port.
110110- * The old memory manager port is returned.
111111- */
112112-routine host_default_memory_manager(
113113- host_priv : host_priv_t;
114114- inout default_manager : memory_object_default_t =
115115- MACH_MSG_TYPE_MAKE_SEND;
116116- cluster_size : memory_object_cluster_size_t);
117117-118118-119119-/*
120120- * Specify that the range of the virtual address space
121121- * of the target task must not cause page faults for
122122- * the indicated accesses.
123123- *
124124- * [ To unwire the pages, specify VM_PROT_NONE. ]
125125- */
126126-routine vm_wire(
127127- host_priv : host_priv_t;
128128- task : vm_map_t;
129129- address : vm_address_t;
130130- size : vm_size_t;
131131- desired_access : vm_prot_t);
132132-133133-/*
134134- * Specify that the target thread must always be able
135135- * to run and to allocate memory.
136136- */
137137-routine thread_wire(
138138- host_priv : host_priv_t;
139139- thread : thread_act_t;
140140- wired : boolean_t);
141141-142142-/*
143143- * Allocate zero-filled, wired, contiguous physical memory
144144- * in the address space of the target task, either at the
145145- * specified address, or wherever space can be found (if
146146- * anywhere is TRUE), of the specified size. The address
147147- * at which the allocation actually took place is returned.
148148- * All pages will be entered into the task's pmap immediately,
149149- * with VM_PROT_ALL.
150150- *
151151- * In addition to all the failure modes of its cousin,
152152- * vm_allocate, this call may also fail if insufficient
153153- * contiguous memory exists to satisfy the request.
154154- *
155155- * Memory obtained from this call should be freed the
156156- * normal way, via vm_deallocate.
157157- *
158158- * N.B. This is an EXPERIMENTAL interface!
159159- */
160160-routine vm_allocate_cpm(
161161- host_priv : host_priv_t;
162162- task : vm_map_t;
163163- inout address : vm_address_t;
164164- size : vm_size_t;
165165- flags : int);
166166-167167-/*
168168- * Get list of processors on this host.
169169- */
170170-routine host_processors(
171171- host_priv : host_priv_t;
172172- out out_processor_list : processor_array_t);
173173-174174-175175-/*
176176- * Get control port for a system-wide clock.
177177- * Privileged.
178178- */
179179-routine host_get_clock_control(
180180- host_priv : host_priv_t;
181181- clock_id : clock_id_t;
182182- out clock_ctrl : clock_ctrl_t);
183183-184184-185185-/*
186186- * kernel module interface (obsolete as of SnowLeopard)
187187- * see mach/kmod.h
188188- */
189189-/* kmod_ MIG calls now return KERN_NOT_SUPPORTED on PPC/i386/x86_64. */
190190-routine kmod_create(
191191- host_priv : host_priv_t;
192192- info : vm_address_t;
193193- out module : kmod_t);
194194-195195-routine kmod_destroy(
196196- host_priv : host_priv_t;
197197- module : kmod_t);
198198-199199-routine kmod_control(
200200- host_priv : host_priv_t;
201201- module : kmod_t;
202202- flavor : kmod_control_flavor_t;
203203- inout data : kmod_args_t);
204204-205205-/*
206206- * Get a given special port for a given node.
207207- * Special ports are defined in host_special_ports.h;
208208- * examples include the master device port.
209209- * There are a limited number of slots available for system servers.
210210- */
211211-routine host_get_special_port(
212212- host_priv : host_priv_t;
213213- node : int;
214214- which : int;
215215- out port : mach_port_t);
216216-217217-/*
218218- * Set a given special port for the local node.
219219- * See host_get_special_port.
220220- */
221221-routine host_set_special_port(
222222- host_priv : host_priv_t;
223223- which : int;
224224- port : mach_port_t);
225225-226226-/*
227227- * Set an exception handler for a host on one or more exception types.
228228- * These handlers are invoked for all threads on the host if there are
229229- * no task or thread-specific exception handlers or those handlers returned
230230- * an error.
231231- */
232232-routine host_set_exception_ports(
233233- host_priv : host_priv_t;
234234- exception_mask : exception_mask_t;
235235- new_port : mach_port_t;
236236- behavior : exception_behavior_t;
237237- new_flavor : thread_state_flavor_t);
238238-239239-240240-/*
241241- * Lookup some of the old exception handlers for a host
242242- */
243243-routine host_get_exception_ports(
244244- host_priv : host_priv_t;
245245- exception_mask : exception_mask_t;
246246- out masks : exception_mask_array_t;
247247- out old_handlers : exception_handler_array_t, SameCount;
248248- out old_behaviors : exception_behavior_array_t, SameCount;
249249- out old_flavors : exception_flavor_array_t, SameCount);
250250-251251-252252-/*
253253- * Set an exception handler for a host on one or more exception types.
254254- * At the same time, return the previously defined exception handlers for
255255- * those types.
256256- */
257257-routine host_swap_exception_ports(
258258- host_priv : host_priv_t;
259259- exception_mask : exception_mask_t;
260260- new_port : mach_port_t;
261261- behavior : exception_behavior_t;
262262- new_flavor : thread_state_flavor_t;
263263- out masks : exception_mask_array_t;
264264- out old_handlerss : exception_handler_array_t, SameCount;
265265- out old_behaviors : exception_behavior_array_t, SameCount;
266266- out old_flavors : exception_flavor_array_t, SameCount);
267267-268268-skip; /* old host_load_symbol_table */
269269-270270-/*
271271- * Specify that the range of the virtual address space
272272- * of the target task must not cause page faults for
273273- * the indicated accesses.
274274- *
275275- * [ To unwire the pages, specify VM_PROT_NONE. ]
276276- */
277277-routine mach_vm_wire(
278278- host_priv : host_priv_t;
279279- task : vm_map_t;
280280- address : mach_vm_address_t;
281281- size : mach_vm_size_t;
282282- desired_access : vm_prot_t);
283283-284284-/*
285285- * JMM - Keep all processor_set related items at the end for easy
286286- * removal.
287287- */
288288-/*
289289- * List all processor sets on host.
290290- */
291291-routine host_processor_sets(
292292- host_priv : host_priv_t;
293293- out processor_sets : processor_set_name_array_t);
294294-295295-/*
296296- * Get control port for a processor set.
297297- */
298298-routine host_processor_set_priv(
299299- host_priv : host_priv_t;
300300- set_name : processor_set_name_t;
301301- out set : processor_set_t);
302302-303303-/************************** Warning *************************************/
304304-/* The following routines are going away in a future release */
305305-/* use the appropriate variant of host_set_special_port instead */
306306-/************************************************************************/
307307-308308-/*
309309- * Set the dynamic_pager control port. Other entities
310310- * can request a send right to this port to talk with
311311- * the dynamic_pager utility, setting behavioral parameters
312312- * within the dynamic pager and getting low/high backing store
313313- * resource notifications.
314314- */
315315-routine set_dp_control_port(
316316- host : host_priv_t;
317317- in control_port : mach_port_t);
318318-319319-/*
320320- * Get the dynamic_pager control port. This port
321321- * allows the holder to talk directly with the dynamic
322322- * pager utility.
323323- */
324324-routine get_dp_control_port(
325325- host : host_priv_t;
326326- out contorl_port :mach_port_t);
327327-328328-/*
329329- * Set the UserNotification daemon access port for this host.
330330- * If this value is already set, the kernel will discard its
331331- * reference to the previously registered port.
332332- */
333333-routine host_set_UNDServer(
334334- host : host_priv_t;
335335- in server : UNDServerRef);
336336-337337-/*
338338- * Get the UserNotification daemon access port for this host.
339339- * This can then be used to communicate with that daemon, which
340340- * in turn communicates with the User through whatever means
341341- * available (pop-up-menus for GUI systems, text for non-GUI, etc..).
342342- *
343343- * Access to this port is restricted to privileged clients because
344344- * it is a special purpose port intended for kernel clients. User
345345- * level clients should go directly to the CFUserNotifcation services.
346346- */
347347-routine host_get_UNDServer(
348348- host : host_priv_t;
349349- out server : UNDServerRef);
350350-351351-/*
352352- * Perform an operation with a kernel extension, on the kext loading system,
353353- * or request information about loaded kexts or the state of the kext loading
354354- * system.
355355- * Active operations (load, unload, disable/enable) require host_priv/root access.
356356- * Info retrieval does not.
357357- *
358358- * WARNING: THIS ROUTINE IS PRIVATE TO THE KEXT-MANAGEMENT STACK AND IS
359359- * SUBJECT TO CHANGE AT ANY TIME.
360360- */
361361-routine kext_request(
362362- host_priv : host_priv_t;
363363- in user_log_flags : uint32_t;
364364- in request_data : pointer_t;
365365- out response_data : pointer_t;
366366- out log_data : pointer_t;
367367- out op_result : kern_return_t);
368368-369369-/* vim: set ft=c : */
-101
src/kernel/mach/host_security.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-5959-/*
6060- * File: mach/host_security.defs
6161- *
6262- * Abstract:
6363- * Mach host security operations support.
6464- */
6565-subsystem
6666-#if KERNEL_SERVER
6767- KernelServer
6868-#endif /* KERNEL_SERVER */
6969- host_security 600;
7070-7171-/*
7272- * Basic types
7373- */
7474-#include <mach/std_types.defs>
7575-#include <mach/mach_types.defs>
7676-7777-7878-/*
7979- * Create a new task with an explicit security token
8080- */
8181-routine host_security_create_task_token(
8282- host_security : host_security_t;
8383- parent_task : task_t;
8484- sec_token : security_token_t;
8585- audit_token : audit_token_t;
8686- host : host_t;
8787- ledgers : ledger_array_t;
8888- inherit_memory : boolean_t;
8989- out child_task : task_t);
9090-9191-/*
9292- * Change a task's security token
9393- */
9494-routine host_security_set_task_token(
9595- host_security : host_security_t;
9696- target_task : task_t;
9797- sec_token : security_token_t;
9898- audit_token : audit_token_t;
9999- host : host_t);
100100-101101-/* vim: set ft=c : */
-48
src/kernel/mach/ledger.defs
···11-/*
22- * Copyright (c) 2010 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-3232-subsystem
3333-#if KERNEL_USER
3434- KernelUser
3535-#endif /* KERNEL_USER */
3636-#if KERNEL_SERVER
3737- KernelServer
3838-#endif /* KERNEL_SERVER */
3939- ledger 5000;
4040-4141-#ifdef KERNEL_USER
4242-userprefix r_;
4343-#endif /* KERNEL_USER */
4444-4545-#include <mach/std_types.defs>
4646-#include <mach/mach_types.defs>
4747-4848-/* vim: set ft=c : */
-83
src/kernel/mach/lock_set.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- *
3131- */
3232-/*
3333- * File: mach/lock_set.defs
3434- * Author: Joseph CaraDonna
3535- *
3636- * Exported kernel calls
3737- *
3838- */
3939-4040-subsystem
4141-#if KERNEL_SERVER
4242- KernelServer
4343-#endif /* KERNEL_SERVER */
4444- lock_set 617000;
4545-4646-#include <mach/std_types.defs>
4747-#include <mach/mach_types.defs>
4848-4949-/*
5050- * OBSOLETE interfaces
5151- * a lock_set_t is created and destroyed through the task object.
5252- * lock_set_create(task,&lock_set_t,...);
5353- * lock_set_destroy(task,lock_set_t);
5454- */
5555-5656-/*
5757- * OBSOLETE interfaces
5858- */
5959-routine lock_acquire(
6060- lock_set : lock_set_t;
6161- lock_id : int);
6262-6363-routine lock_release(
6464- lock_set : lock_set_t;
6565- lock_id : int);
6666-6767-routine lock_try(
6868- lock_set : lock_set_t;
6969- lock_id : int);
7070-7171-routine lock_make_stable(
7272- lock_set : lock_set_t;
7373- lock_id : int);
7474-7575-routine lock_handoff(
7676- lock_set : lock_set_t;
7777- lock_id : int);
7878-7979-routine lock_handoff_accept(
8080- lock_set : lock_set_t;
8181- lock_id : int);
8282-8383-/* vim: set ft=c : */
-119
src/kernel/mach/mach_exc.defs
···11-/*
22- * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * Abstract:
6060- * MiG definitions file for Mach exception interface.
6161- */
6262-6363-subsystem
6464-#if KERNEL_USER
6565- KernelUser
6666-#endif
6767- mach_exc 2405;
6868-6969-#include <mach/std_types.defs>
7070-#include <mach/mach_types.defs>
7171-7272-ServerPrefix catch_;
7373-7474-type mach_exception_data_t = array[*:2] of int64_t;
7575-type exception_type_t = int;
7676-7777-routine mach_exception_raise(
7878-#if KERNEL_USER
7979- exception_port : mach_port_move_send_t;
8080- thread : mach_port_move_send_t;
8181- task : mach_port_move_send_t;
8282-#else /* KERNEL_USER */
8383- exception_port : mach_port_t;
8484- thread : mach_port_t;
8585- task : mach_port_t;
8686-#endif /* KERNEL_USER */
8787- exception : exception_type_t;
8888- code : mach_exception_data_t
8989- );
9090-9191-routine mach_exception_raise_state(
9292-#if KERNEL_USER
9393- exception_port : mach_port_move_send_t;
9494-#else /* KERNEL_USER */
9595- exception_port : mach_port_t;
9696-#endif /* KERNEL_USER */
9797- exception : exception_type_t;
9898- code : mach_exception_data_t, const;
9999- inout flavor : int;
100100- old_state : thread_state_t, const;
101101- out new_state : thread_state_t);
102102-103103-routine mach_exception_raise_state_identity(
104104-#if KERNEL_USER
105105- exception_port : mach_port_move_send_t;
106106- thread : mach_port_move_send_t;
107107- task : mach_port_move_send_t;
108108-#else /* KERNEL_USER */
109109- exception_port : mach_port_t;
110110- thread : mach_port_t;
111111- task : mach_port_t;
112112-#endif /* KERNEL_USER */
113113- exception : exception_type_t;
114114- code : mach_exception_data_t;
115115- inout flavor : int;
116116- old_state : thread_state_t;
117117- out new_state : thread_state_t);
118118-119119-/* vim: set ft=c : */
-303
src/kernel/mach/mach_host.defs
···11-/*
22- * Copyright (c) 2000-2009 Apple Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-5959-/*
6060- * File: mach/mach_host.defs
6161- *
6262- * Abstract:
6363- * Mach host operations support. Includes processor allocation and
6464- * control.
6565- */
6666-6767-subsystem
6868-#if KERNEL_SERVER
6969- KernelServer
7070-#endif /* KERNEL_SERVER */
7171- mach_host 200;
7272-7373-/*
7474- * Basic types
7575- */
7676-7777-#include <mach/std_types.defs>
7878-#include <mach/mach_types.defs>
7979-#include <mach/clock_types.defs>
8080-#include <mach_debug/mach_debug_types.defs>
8181-8282-/*
8383- * References to host objects are returned by:
8484- * mach_host_self() - trap
8585- */
8686-8787-/*
8888- * Return information about this host.
8989- */
9090-routine host_info(
9191- host : host_t;
9292- flavor : host_flavor_t;
9393- out host_info_out : host_info_t, CountInOut);
9494-9595-/*
9696- * Get string describing current kernel version.
9797- */
9898-routine host_kernel_version(
9999- host : host_t;
100100- out kernel_version : kernel_version_t);
101101-102102-/*
103103- * Get host page size
104104- * (compatibility for running old libraries on new kernels -
105105- * host_page_size() is now a library routine based on constants)
106106- */
107107-#if KERNEL
108108-routine host_page_size(
109109-#else
110110-routine _host_page_size(
111111-#endif
112112- host : host_t;
113113- out out_page_size : vm_size_t);
114114-115115-/*
116116- * Allow pagers to create named entries that point to un-mapped
117117- * abstract memory object. The named entries are generally mappable
118118- * and can be subsetted through the mach_make_memory_entry call
119119- */
120120-routine mach_memory_object_memory_entry(
121121- host :host_t;
122122- internal :boolean_t;
123123- size :vm_size_t;
124124- permission :vm_prot_t;
125125- pager :memory_object_t;
126126- out entry_handle :mach_port_move_send_t);
127127-128128-129129-/*
130130- * Get processor info for all the processors on this host.
131131- * The returned data is an OOL array of processor info.
132132- */
133133-routine host_processor_info(
134134- host : host_t;
135135- flavor : processor_flavor_t;
136136- out out_processor_count : natural_t;
137137- out out_processor_info : processor_info_array_t);
138138-139139-/*
140140- * Return host IO master access port
141141- */
142142-routine host_get_io_master(
143143- host : host_t;
144144- out io_master : io_master_t);
145145-146146-/*
147147- * Get service port for a processor set.
148148- * Available to all.
149149- */
150150-routine host_get_clock_service(
151151- host : host_t;
152152- clock_id : clock_id_t;
153153- out clock_serv : clock_serv_t);
154154-155155-/*
156156- * kernel module interface (obsolete as of SnowLeopard)
157157- * see mach/kmod.h
158158- */
159159-/* kmod_ MIG calls now return KERN_NOT_SUPPORTED on PPC/i386/x86_64. */
160160-routine kmod_get_info(
161161- host : host_t;
162162- out modules : kmod_args_t);
163163-164164-/*
165165- * Returns information about the memory allocation zones.
166166- * Supported in all kernels..
167167- *
168168- * DEPRECATED! Use mach_zone_info() instead.
169169- */
170170-routine host_zone_info(
171171- host : host_priv_t;
172172- out names : zone_name_array_t,
173173- Dealloc;
174174- out info : zone_info_array_t,
175175- Dealloc);
176176-177177-/*
178178- * Returns information about the global VP table.
179179- * Only supported in MACH_VM_DEBUG kernels,
180180- * otherwise returns KERN_FAILURE.
181181- */
182182-routine host_virtual_physical_table_info(
183183- host : host_t;
184184- out info : hash_info_bucket_array_t,
185185- Dealloc);
186186-187187-188188-skip; /* was host_ipc_hash_info */
189189-skip; /* was enable_bluebox */
190190-skip; /* was disable_bluebox */
191191-192192-/*
193193- * JMM - Keep processor_set related items at the end for easy
194194- * removal.
195195- */
196196-/*
197197- * Get default processor set for host.
198198- */
199199-routine processor_set_default(
200200- host : host_t;
201201- out default_set : processor_set_name_t);
202202-203203-/*
204204- * Create new processor set. Returns real port for manipulations,
205205- * and name port for obtaining information.
206206- */
207207-routine processor_set_create(
208208- host : host_t;
209209- out new_set : processor_set_t;
210210- out new_name : processor_set_name_t);
211211-212212-/*
213213- * Temporary interfaces for conversion to 64 bit data path
214214- */
215215-216216-routine mach_memory_object_memory_entry_64(
217217- host :host_t;
218218- internal :boolean_t;
219219- size :memory_object_size_t;
220220- permission :vm_prot_t;
221221- pager :memory_object_t;
222222- out entry_handle :mach_port_move_send_t);
223223-224224-/*
225225- * Return statistics from this host.
226226- */
227227-routine host_statistics(
228228- host_priv : host_t;
229229- flavor : host_flavor_t;
230230- out host_info_out : host_info_t, CountInOut);
231231-232232-routine host_request_notification(
233233- host : host_t;
234234- notify_type : host_flavor_t;
235235- notify_port : mach_port_make_send_once_t);
236236-237237-routine host_lockgroup_info(
238238- host : host_t;
239239- out lockgroup_info : lockgroup_info_array_t,
240240- Dealloc);
241241-242242-/*
243243- * Return 64-bit statistics from this host.
244244- */
245245-routine host_statistics64(
246246- host_priv : host_t;
247247- flavor : host_flavor_t;
248248- out host_info64_out : host_info64_t, CountInOut);
249249-250250-/*
251251- * Returns information about the memory allocation zones.
252252- * Data returned is compatible with various caller and kernel
253253- * address space sizes (unlike host_zone_info()).
254254- */
255255-routine mach_zone_info(
256256- host : host_priv_t;
257257- out names : mach_zone_name_array_t,
258258- Dealloc;
259259- out info : mach_zone_info_array_t,
260260- Dealloc);
261261-262262-#ifdef PRIVATE
263263-/*
264264- * Forces a zone allocator garbage collections pass.
265265- * Pages with no in-use allocations are returned to
266266- * the VM system for re-use.
267267- */
268268-routine mach_zone_force_gc(
269269- host : host_t);
270270-#else
271271-skip;
272272-#endif
273273-274274-/*
275275- * Create a new voucher by running a series of commands against
276276- * <key, previous-voucher> pairs of resource attributes.
277277- */
278278-routine host_create_mach_voucher(
279279- host : host_t;
280280- recipes : mach_voucher_attr_raw_recipe_array_t;
281281- out voucher : ipc_voucher_t);
282282-283283-/*
284284- * Register a resource manager with the kernel. A new key is selected.
285285- */
286286-routine host_register_mach_voucher_attr_manager(
287287- host : host_t;
288288- attr_manager : mach_voucher_attr_manager_t;
289289- default_value : mach_voucher_attr_value_handle_t;
290290- out new_key : mach_voucher_attr_key_t;
291291- out new_attr_control: ipc_voucher_attr_control_t);
292292-293293-/*
294294- * Register a resource manager (with a well-known key value) with the kernel.
295295- */
296296-routine host_register_well_known_mach_voucher_attr_manager(
297297- host : host_t;
298298- attr_manager : mach_voucher_attr_manager_t;
299299- default_value : mach_voucher_attr_value_handle_t;
300300- key : mach_voucher_attr_key_t;
301301- out new_attr_control: ipc_voucher_attr_control_t);
302302-303303-/* vim: set ft=c : */
-38
src/kernel/mach/mach_notify.defs
···11-/*
22- * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * The mach/notify.h file is hand-crafted.
3030- * It contains additional data that cannot be generated by MIG at this time.
3131- * But its existence keeps us from having MIG generate the client-side
3232- * routines to send Mach notifications. This file exists simply to give
3333- * those routines a new home (mach/mach_notify.h and mach_notify_user.c)
3434- * until the real notify.h becomes "MIG-safe."
3535- */
3636-#include <mach/notify.defs>
3737-3838-/* vim: set ft=c : */
-614
src/kernel/mach/mach_port.defs
···11-/*
22- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_FREE_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/mach_port.defs
6060- * Author: Rich Draves
6161- *
6262- * Exported kernel calls.
6363- */
6464-6565-subsystem
6666-#if KERNEL_SERVER
6767- KernelServer
6868-#endif /* KERNEL_SERVER */
6969- mach_port 3200;
7070-7171-#if !KERNEL && !LIBSYSCALL_INTERFACE
7272- UserPrefix _kernelrpc_;
7373-#endif
7474-7575-#include <mach/std_types.defs>
7676-#include <mach/mach_types.defs>
7777-#include <mach_debug/mach_debug_types.defs>
7878-7979-/*
8080- * Returns the set of port and port set names
8181- * to which the target task has access, along with
8282- * the type (set or port) for each name.
8383- */
8484-8585-routine mach_port_names(
8686- task : ipc_space_t;
8787- out names : mach_port_name_array_t;
8888- out types : mach_port_type_array_t);
8989-9090-/*
9191- * Returns the type (set or port) for the port name
9292- * within the target task. Also indicates whether
9393- * there is a dead-name request for the name.
9494- */
9595-9696-routine mach_port_type(
9797- task : ipc_space_t;
9898- name : mach_port_name_t;
9999- out ptype : mach_port_type_t);
100100-101101-/*
102102- * Changes the name by which a port (or port set) is known to
103103- * the target task. The new name can't be in use. The
104104- * old name becomes available for recycling.
105105- *
106106- * This interface is OBSOLETE and will always
107107- * return KERN_NOT_SUPPORTED.
108108- */
109109-110110-routine mach_port_rename(
111111- task : ipc_space_t;
112112- old_name : mach_port_name_t;
113113- new_name : mach_port_name_t);
114114-115115-/*
116116- * Allocates the specified kind of object, with the given name.
117117- * The right must be one of
118118- * MACH_PORT_RIGHT_RECEIVE
119119- * MACH_PORT_RIGHT_PORT_SET
120120- * MACH_PORT_RIGHT_DEAD_NAME
121121- * New port sets are empty. New ports don't have any
122122- * send/send-once rights or queued messages. The make-send
123123- * count is zero and their queue limit is MACH_PORT_QLIMIT_DEFAULT.
124124- * New sets, ports, and dead names have one user reference.
125125- */
126126-127127-routine mach_port_allocate_name(
128128- task : ipc_space_t;
129129- right : mach_port_right_t;
130130- name : mach_port_name_t);
131131-132132-/*
133133- * Allocates the specified kind of object.
134134- * The right must be one of
135135- * MACH_PORT_RIGHT_RECEIVE
136136- * MACH_PORT_RIGHT_PORT_SET
137137- * MACH_PORT_RIGHT_DEAD_NAME
138138- * Like port_allocate_name, but the kernel picks a name.
139139- * It can use any name not associated with a right.
140140- */
141141-142142-routine mach_port_allocate(
143143- task : ipc_space_t;
144144- right : mach_port_right_t;
145145- out name : mach_port_name_t);
146146-147147-/*
148148- * Destroys all rights associated with the name and makes it
149149- * available for recycling immediately. The name can be a
150150- * port (possibly with multiple user refs), a port set, or
151151- * a dead name (again, with multiple user refs).
152152- */
153153-154154-routine mach_port_destroy(
155155- task : ipc_space_t;
156156- name : mach_port_name_t);
157157-158158-/*
159159- * Releases one send/send-once/dead-name user ref.
160160- * Just like mach_port_mod_refs -1, but deduces the
161161- * correct type of right. This allows a user task
162162- * to release a ref for a port without worrying
163163- * about whether the port has died or not.
164164- */
165165-166166-routine mach_port_deallocate(
167167- task : ipc_space_t;
168168- name : mach_port_name_t);
169169-170170-/*
171171- * A port set always has one user ref.
172172- * A send-once right always has one user ref.
173173- * A dead name always has one or more user refs.
174174- * A send right always has one or more user refs.
175175- * A receive right always has one user ref.
176176- * The right must be one of
177177- * MACH_PORT_RIGHT_RECEIVE
178178- * MACH_PORT_RIGHT_PORT_SET
179179- * MACH_PORT_RIGHT_DEAD_NAME
180180- * MACH_PORT_RIGHT_SEND
181181- * MACH_PORT_RIGHT_SEND_ONCE
182182- */
183183-184184-routine mach_port_get_refs(
185185- task : ipc_space_t;
186186- name : mach_port_name_t;
187187- right : mach_port_right_t;
188188- out refs : mach_port_urefs_t);
189189-190190-/*
191191- * The delta is a signed change to the task's
192192- * user ref count for the right. Only dead names
193193- * and send rights can have a positive delta.
194194- * The resulting user ref count can't be negative.
195195- * If it is zero, the right is deallocated.
196196- * If the name isn't a composite right, it becomes
197197- * available for recycling. The right must be one of
198198- * MACH_PORT_RIGHT_RECEIVE
199199- * MACH_PORT_RIGHT_PORT_SET
200200- * MACH_PORT_RIGHT_DEAD_NAME
201201- * MACH_PORT_RIGHT_SEND
202202- * MACH_PORT_RIGHT_SEND_ONCE
203203- */
204204-205205-routine mach_port_mod_refs(
206206- task : ipc_space_t;
207207- name : mach_port_name_t;
208208- right : mach_port_right_t;
209209- delta : mach_port_delta_t);
210210-211211-/*
212212- * Peek at the message queue for the specified receive
213213- * right and return info about the message with the
214214- * sequence number matching the input. If zero is
215215- * specified as the seqno, the first message in the
216216- * queue will be peeked.
217217- *
218218- * Only the following trailer types are currently supported:
219219- * MACH_RCV_TRAILER_TYPE(MACH_MSG_TRAILER_FORMAT_0)
220220- *
221221- * or'ed with one of these element types:
222222- * MACH_RCV_TRAILER_ELEMENTS(MACH_RCV_TRAILER_NULL)
223223- * MACH_RCV_TRAILER_ELEMENTS(MACH_RCV_TRAILER_SEQNO)
224224- * MACH_RCV_TRAILER_ELEMENTS(MACH_RCV_TRAILER_SENDER)
225225- * MACH_RCV_TRAILER_ELEMENTS(MACH_RCV_TRAILER_AUDIT)
226226- */
227227-routine mach_port_peek(
228228- task : ipc_space_t;
229229- name : mach_port_name_t;
230230- trailer_type : mach_msg_trailer_type_t;
231231- inout request_seqnop : mach_port_seqno_t;
232232- out msg_sizep : mach_msg_size_t;
233233- out msg_idp : mach_msg_id_t;
234234- out trailer_infop : mach_msg_trailer_info_t, CountInOut);
235235-236236-/*
237237- * Only valid for receive rights.
238238- * Sets the make-send count for the port.
239239- */
240240-routine mach_port_set_mscount(
241241- task : ipc_space_t;
242242- name : mach_port_name_t;
243243- mscount : mach_port_mscount_t);
244244-245245-/*
246246- * Only valid for port sets. Returns a list of
247247- * the members.
248248- */
249249-250250-routine mach_port_get_set_status(
251251- task : ipc_space_t;
252252- name : mach_port_name_t;
253253- out members : mach_port_name_array_t);
254254-255255-/*
256256- * Puts the member port (the task must have receive rights)
257257- * into the after port set. If the port is already a member
258258- * of any set(s), it is atomically removed from those sets as
259259- * part of this operation. (If after is MACH_PORT_NULL, the
260260- * port is still removed from all current sets).
261261- */
262262-263263-routine mach_port_move_member(
264264- task : ipc_space_t;
265265- member : mach_port_name_t;
266266- after : mach_port_name_t);
267267-268268-/*
269269- * Requests a notification from the kernel. The request
270270- * must supply the send-once right which is used for
271271- * the notification. If a send-once right was previously
272272- * registered, it is returned. The msgid must be one of:
273273- * MACH_NOTIFY_PORT_DESTROYED (receive rights)
274274- * MACH_NOTIFY_DEAD_NAME (send/receive/send-once rights)
275275- * MACH_NOTIFY_SEND_POSSIBLE (send/receive/send-once rights)
276276- * MACH_NOTIFY_NO_SENDERS (receive rights)
277277- *
278278- * The sync value specifies whether a notification should
279279- * get sent immediately, if appropriate. The exact meaning
280280- * depends on the notification:
281281- * MACH_NOTIFY_PORT_DESTROYED: must be zero.
282282- * MACH_NOTIFY_DEAD_NAME: if non-zero, then name can be dead,
283283- * and the notification gets sent immediately.
284284- * If zero, then name can't be dead.
285285- * MACH_NOTIFY_SEND_POSSIBLE: if non-zero, will generate a send-
286286- * possible notification as soon as it is possible to send
287287- * to the port. If zero, will generate a send-possible
288288- * notification only after a subsequent failed send
289289- * (with MACH_SEND_NOTIFY option to mach_msg call). Can
290290- * generate a dead-name notification if name is already dead
291291- * or becomes dead before a send-possible notification fires.
292292- * MACH_NOTIFY_NO_SENDERS: the notification gets sent
293293- * immediately if the current mscount is greater
294294- * than or equal to the sync value and there are no
295295- * extant send rights.
296296- *
297297- * If the name is deleted before a successfully registered notification
298298- * is delivered, it is replaced with a port-deleted notification.
299299- */
300300-301301-routine mach_port_request_notification(
302302- task : ipc_space_t;
303303- name : mach_port_name_t;
304304- msgid : mach_msg_id_t;
305305- sync : mach_port_mscount_t;
306306- notify : mach_port_send_once_t;
307307- out previous : mach_port_move_send_once_t);
308308-309309-/*
310310- * Inserts the specified rights into the target task,
311311- * using the specified name. If inserting send/receive
312312- * rights and the task already has send/receive rights
313313- * for the port, then the names must agree. In any case,
314314- * the task gains a user ref for the port.
315315- */
316316-317317-routine mach_port_insert_right(
318318- task : ipc_space_t;
319319- name : mach_port_name_t;
320320- poly : mach_port_poly_t);
321321-322322-/*
323323- * Returns the specified right for the named port
324324- * in the target task, extracting that right from
325325- * the target task. The target task loses a user
326326- * ref and the name may be available for recycling.
327327- * msgt_name must be one of
328328- * MACH_MSG_TYPE_MOVE_RECEIVE
329329- * MACH_MSG_TYPE_COPY_SEND
330330- * MACH_MSG_TYPE_MAKE_SEND
331331- * MACH_MSG_TYPE_MOVE_SEND
332332- * MACH_MSG_TYPE_MAKE_SEND_ONCE
333333- * MACH_MSG_TYPE_MOVE_SEND_ONCE
334334- */
335335-336336-routine mach_port_extract_right(
337337- task : ipc_space_t;
338338- name : mach_port_name_t;
339339- msgt_name : mach_msg_type_name_t;
340340- out poly : mach_port_poly_t);
341341-342342-/*
343343- * Only valid for receive rights.
344344- * Sets the sequence number for the port.
345345- */
346346-347347-routine mach_port_set_seqno(
348348- task : ipc_space_t;
349349- name : mach_port_name_t;
350350- seqno : mach_port_seqno_t);
351351-352352-/*
353353- * Returns information about a port.
354354- */
355355-356356-routine mach_port_get_attributes(
357357- task : ipc_space_t;
358358- name : mach_port_name_t;
359359- flavor : mach_port_flavor_t;
360360- out port_info_out : mach_port_info_t, CountInOut);
361361-362362-/*
363363- * Set attributes of a port
364364- */
365365-366366-routine mach_port_set_attributes(
367367- task : ipc_space_t;
368368- name : mach_port_name_t;
369369- flavor : mach_port_flavor_t;
370370- port_info : mach_port_info_t);
371371-372372-373373-/*
374374- * Allocates the specified kind of object, qos version.
375375- * The right must be
376376- * MACH_PORT_RIGHT_RECEIVE
377377- * Like port_allocate_name, but the kernel picks a name.
378378- * It can use any name not associated with a right.
379379- */
380380-381381-routine mach_port_allocate_qos(
382382- task : ipc_space_t;
383383- right : mach_port_right_t;
384384- inout qos : mach_port_qos_t;
385385- out name : mach_port_name_t);
386386-387387-388388-/*
389389- * Generic interface to allocation various kinds of ports.
390390- * Should never be called directly by users (at least not
391391- * unless they are exceedingly masochistic).
392392- */
393393-394394-routine mach_port_allocate_full(
395395- task : ipc_space_t;
396396- right : mach_port_right_t;
397397- proto : mach_port_t;
398398- inout qos : mach_port_qos_t;
399399- inout name : mach_port_name_t);
400400-401401-402402-/*
403403- * Pre-expand task port name space.
404404- */
405405-routine task_set_port_space(
406406- task : ipc_space_t;
407407- table_entries : int);
408408-409409-410410-/*
411411- * Returns the exact number of extant send rights
412412- * for the given receive right.
413413- * This call is only valid on MACH_IPC_DEBUG kernels.
414414- * Otherwise, KERN_FAILURE is returned.
415415- */
416416-routine mach_port_get_srights(
417417- task : ipc_space_t;
418418- name : mach_port_name_t;
419419- out srights : mach_port_rights_t);
420420-421421-422422-/*
423423- * Returns information about an IPC space.
424424- * This call is only valid on MACH_IPC_DEBUG kernels.
425425- * Otherwise, KERN_FAILURE is returned.
426426- */
427427-routine mach_port_space_info(
428428- task : ipc_space_t;
429429- out space_info : ipc_info_space_t;
430430- out table_info : ipc_info_name_array_t;
431431- out tree_info : ipc_info_tree_name_array_t);
432432-433433-/*
434434- * Returns information about the dead-name requests
435435- * registered with the named receive right.
436436- * This call is only valid on MACH_IPC_DEBUG kernels.
437437- * Otherwise, KERN_FAILURE is returned.
438438- */
439439-routine mach_port_dnrequest_info(
440440- task : ipc_space_t;
441441- name : mach_port_name_t;
442442- out dnr_total : unsigned; /* total size of table */
443443- out dnr_used : unsigned); /* amount used */
444444-445445-/*
446446- * Return the type and address of the kernel object
447447- * that the given send/receive right represents.
448448- * This call is only valid on MACH_IPC_DEBUG kernels.
449449- * Otherwise, KERN_FAILURE is returned.
450450- *
451451- * This interface is DEPRECATED in favor of the new
452452- * mach_port_kernel_object64() call (see below).
453453- */
454454-routine mach_port_kernel_object(
455455- task : ipc_space_t;
456456- name : mach_port_name_t;
457457- out object_type : unsigned;
458458- out object_addr : unsigned);
459459-460460-461461-/*
462462- * Inserts the specified rights into the portset identified
463463- * by the <task, pset> pair. The results of passing in the
464464- * Poly argument via the supplied disposition must yield a
465465- * receive right.
466466- *
467467- * If the <task,pset> pair does not represent a valid portset
468468- * KERN_INVALID_RIGHT is returned.
469469- *
470470- * If the passed in name argument does not represent a receive
471471- * right, KERN_INVALID_CAPABILITY will be returned.
472472- *
473473- * If the port represented by the receive right is already in
474474- * the portset, KERN_ALREADY_IN_SET is returned.
475475- */
476476-routine mach_port_insert_member(
477477- task : ipc_space_t;
478478- name : mach_port_name_t;
479479- pset : mach_port_name_t);
480480-481481-/*
482482- * Extracts the specified right from the named portset
483483- * in the target task.
484484- * the target task. The target task loses a user
485485- * ref and the name may be available for recycling.
486486- * msgt_name must be one of
487487- * MACH_MSG_TYPE_MOVE_RECEIVE
488488- * MACH_MSG_TYPE_COPY_SEND
489489- * MACH_MSG_TYPE_MAKE_SEND
490490- * MACH_MSG_TYPE_MOVE_SEND
491491- * MACH_MSG_TYPE_MAKE_SEND_ONCE
492492- * MACH_MSG_TYPE_MOVE_SEND_ONCE
493493- */
494494-495495-routine mach_port_extract_member(
496496- task : ipc_space_t;
497497- name : mach_port_name_t;
498498- pset : mach_port_name_t);
499499-500500-/*
501501- * Only valid for receive rights.
502502- * Gets the context pointer for the port.
503503- */
504504-505505-routine mach_port_get_context(
506506- task : ipc_space_t;
507507- name : mach_port_name_t;
508508-#ifdef LIBSYSCALL_INTERFACE
509509- out context : mach_port_context_t
510510-#else
511511- out context : mach_vm_address_t
512512-#endif
513513- );
514514-515515-/*
516516- * Only valid for receive rights.
517517- * Sets the context pointer for the port.
518518- */
519519-520520-routine mach_port_set_context(
521521- task : ipc_space_t;
522522- name : mach_port_name_t;
523523-#ifdef LIBSYSCALL_INTERFACE
524524- context : mach_port_context_t
525525-#else
526526- context : mach_vm_address_t
527527-#endif
528528- );
529529-530530-/*
531531- * Return the type and address of the kernel object
532532- * that the given send/receive right represents.
533533- * This call is only valid on MACH_IPC_DEBUG kernels.
534534- * Otherwise, KERN_FAILURE is returned.
535535- */
536536-routine mach_port_kobject(
537537- task : ipc_space_t;
538538- name : mach_port_name_t;
539539- out object_type : natural_t;
540540- out object_addr : mach_vm_address_t);
541541-542542-543543-/*
544544- * Constructs a right based on the options passed
545545- * in. Also allows guarding the port as one of the
546546- * options if the requested right is a receive
547547- * right.
548548- */
549549-routine mach_port_construct(
550550- task : ipc_space_t;
551551- options : mach_port_options_ptr_t;
552552-#ifdef LIBSYSCALL_INTERFACE
553553- context : mach_port_context_t;
554554-#else
555555- context : uint64_t;
556556-#endif
557557- out name : mach_port_name_t);
558558-559559-/*
560560- * Destroys a mach port using the guard provided
561561- * for guarded ports. Also reduces the user ref
562562- * count for send rights as specified by srdelta.
563563- */
564564-routine mach_port_destruct(
565565- task : ipc_space_t;
566566- name : mach_port_name_t;
567567- srdelta : mach_port_delta_t;
568568-#ifdef LIBSYSCALL_INTERFACE
569569- guard : mach_port_context_t
570570-#else
571571- guard : uint64_t
572572-#endif
573573- );
574574-575575-/*
576576- * Guard an already existing port. Allows guarding
577577- * receive rights only. Uses the context field in the
578578- * port structure to store the guard.
579579- */
580580-routine mach_port_guard(
581581- task : ipc_space_t;
582582- name : mach_port_name_t;
583583-#ifdef LIBSYSCALL_INTERFACE
584584- guard : mach_port_context_t;
585585-#else
586586- guard : uint64_t;
587587-#endif
588588- strict : boolean_t);
589589-590590-/*
591591- * Unguard a port guarded previously. For unguarded ports
592592- * or incorrect guards passed in it raises an exception
593593- * indicating guarding misbehavior.
594594- */
595595-routine mach_port_unguard(
596596- task : ipc_space_t;
597597- name : mach_port_name_t;
598598-#ifdef LIBSYSCALL_INTERFACE
599599- guard : mach_port_context_t
600600-#else
601601- guard : uint64_t
602602-#endif
603603- );
604604-605605-/*
606606- * Returns basic information about an IPC space.
607607- * This call is only valid on MACH_IPC_DEBUG kernels.
608608- * Otherwise, KERN_FAILURE is returned.
609609- */
610610-routine mach_port_space_basic_info(
611611- task : ipc_space_t;
612612- out basic_info : ipc_info_space_basic_t);
613613-614614-/* vim: set ft=c : */
-598
src/kernel/mach/mach_types.defs
···11-/*
22- * Copyright (c) 2000-2010 Apple Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- * NOTICE: This file was modified by McAfee Research in 2004 to introduce
5858- * support for mandatory and extensible security protections. This notice
5959- * is included in support of clause 2.2 (b) of the Apple Public License,
6060- * Version 2.0.
6161- */
6262-/*
6363- */
6464-/*
6565- * Mach kernel interface type declarations
6666- */
6767-6868-#ifndef _MACH_MACH_TYPES_DEFS_
6969-#define _MACH_MACH_TYPES_DEFS_
7070-7171-7272-#include <mach/std_types.defs>
7373-7474-type memory_object_offset_t = uint64_t;
7575-type memory_object_size_t = uint64_t;
7676-type memory_object_cluster_size_t = uint32_t;
7777-type memory_object_fault_info_t = array[16] of integer_t;
7878-7979-#ifdef KERNEL_PRIVATE
8080-8181-/* Universal Page Lists - restricted to (in-kernel) pagers for now */
8282-type upl_size_t = uint32_t;
8383-type upl_offset_t = uint32_t;
8484-type upl_page_info_t = struct[2] of integer_t;
8585-type upl_page_info_array_t = array[*:256] of upl_page_info_t;
8686-8787-type upl_t = mach_port_t
8888- intran: upl_t convert_port_to_upl(mach_port_t)
8989- outtran: mach_port_t convert_upl_to_port(upl_t)
9090- destructor: upl_deallocate(upl_t)
9191- ;
9292-9393-#endif /* KERNEL_PRIVATE */
9494-9595-type mach_port_status_t = struct[10] of integer_t; /* obsolete */
9696-type mach_port_info_ext_t = struct[17] of integer_t;
9797-9898- /* mach_port_info_t: can hold either a
9999- * mach_port_status_t (9 ints) or a
100100- * mach_port_limits_t (1 int) or a
101101- * mach_port_info_ext_t (17 ints). If new flavors of
102102- * mach_port_{get,set}_attributes are added, the size of
103103- * this array may have to be increased. (See mach/port.h)
104104- */
105105-type mach_port_flavor_t = int;
106106-type mach_port_info_t = array[*:17] of integer_t;
107107-108108- /*
109109- * mach_msg_max_trailer_t: can hold
110110- * mach_msg_trailer_type_t (1 int)
111111- * mach_msg_trailer_size_t (1 int)
112112- * mach_port_seqno_t (1 int)
113113- * security_token_t (2 ints)
114114- * audit_token_t (8 ints)
115115- * mach_port_context_t (2 ints)
116116- * msgh_ad (1 int)
117117- * msg_labels_t (1 int)
118118- */
119119-type mach_msg_trailer_type_t = int;
120120-type mach_msg_trailer_info_t = array[*:68] of char;
121121-122122-type task_t = mach_port_t
123123-#if KERNEL_SERVER
124124- intran: task_t convert_port_to_task(mach_port_t)
125125- outtran: mach_port_t convert_task_to_port(task_t)
126126- destructor: task_deallocate(task_t)
127127-#endif /* KERNEL_SERVER */
128128- ;
129129-130130-type task_name_t = mach_port_t
131131-#if KERNEL_SERVER
132132- intran: task_name_t convert_port_to_task_name(mach_port_t)
133133- outtran: mach_port_t convert_task_name_to_port(task_name_t)
134134- destructor: task_name_deallocate(task_name_t)
135135-#endif /* KERNEL_SERVER */
136136- ;
137137-138138-type thread_t = mach_port_t
139139-#if KERNEL_SERVER
140140- intran: thread_t convert_port_to_thread(mach_port_t)
141141- outtran: mach_port_t convert_thread_to_port(thread_t)
142142- destructor: thread_deallocate(thread_t)
143143-#endif /* KERNEL_SERVER */
144144- ;
145145-146146-type thread_act_t = mach_port_t
147147-#if KERNEL_SERVER
148148- intran: thread_act_t convert_port_to_thread(mach_port_t)
149149- outtran: mach_port_t convert_thread_to_port(thread_act_t)
150150- destructor: thread_deallocate(thread_act_t)
151151-#endif /* KERNEL_SERVER */
152152- ;
153153-154154-type thread_act_consume_ref_t = mach_port_move_send_t
155155- cusertype: thread_act_t
156156-#if KERNEL_SERVER
157157- intran: thread_act_t convert_port_to_thread(mach_port_t)
158158- destructor: thread_deallocate(thread_act_t)
159159-#endif /* KERNEL_SERVER */
160160- ;
161161-162162- /* thread_state_t: This inline array can hold
163163- * a machine-dependent amount of data, defined in
164164- * mach/machine/???? (currently THREAD_STATE_MAX,
165165- * in mach/thread_state.h)
166166- */
167167-#include <mach/machine/thread_state.h>
168168-type thread_state_flavor_t = int;
169169-type thread_state_t = array[*:THREAD_STATE_MAX] of natural_t;
170170-171171-type task_array_t = ^array[] of task_t;
172172-type thread_array_t = ^array[] of thread_t;
173173-type thread_act_array_t = ^array[] of thread_act_t;
174174-type act_params_t = array[6] of int;
175175-176176-type vm_map_t = mach_port_t
177177-#if KERNEL_SERVER
178178- intran: vm_map_t convert_port_to_map(mach_port_t)
179179- destructor: vm_map_deallocate(vm_map_t)
180180-#endif /* KERNEL_SERVER */
181181- ;
182182-183183-type vm_task_entry_t = mach_port_t
184184- cusertype: vm_map_t
185185-#if KERNEL_SERVER
186186- intran: vm_map_t convert_port_entry_to_map(mach_port_t)
187187- destructor: vm_map_deallocate(vm_map_t)
188188-#endif /* KERNEL_SERVER */
189189- ;
190190-191191-type ipc_space_t = mach_port_t
192192-#if KERNEL_SERVER
193193- intran: ipc_space_t convert_port_to_space(mach_port_t)
194194- destructor: space_deallocate(ipc_space_t)
195195-#endif /* KERNEL_SERVER */
196196- ;
197197-198198-type vm_prot_t = int;
199199-type vm_inherit_t = int;
200200-type vm_purgable_t = int;
201201-type xxx_vm_statistics_data_t = struct[13] of integer_t;
202202-type vm_behavior_t = int;
203203-type vm_statistics_data_t = struct[15] of integer_t;
204204-type vm_machine_attribute_t = int;
205205-type vm_machine_attribute_val_t = int;
206206-type vm_sync_t = int;
207207-208208- /* thread_info_t: this inline array can hold any of:
209209- * thread_basic_info_t (10 ints)
210210- * policy_timeshare_info_t (5 ints)
211211- * policy_fifo_info_t (4 ints)
212212- * policy_rr_info_t (5 ints)
213213- * if other thread_info flavors are added, this
214214- * definition may need to be changed. (See
215215- * mach/thread_info.h and mach/policy.h) */
216216-type thread_flavor_t = int;
217217-type thread_info_t = array[*:12] of integer_t;
218218-219219-type thread_policy_flavor_t = natural_t;
220220-type thread_policy_t = array[*:16] of integer_t;
221221-222222- /* task_info_t: this inline array can hold any of:
223223- * task_basic_info_32_t (8 ints)
224224- * task_basic_info_64_t (10 ints)
225225- * task_events_info_t (8 ints)
226226- * task_thread_times_info_t (4 ints)
227227- * policy_timeshare_info_t (5 ints)
228228- * policy_fifo_info_t (4 ints)
229229- * policy_rr_info_t (5 ints)
230230- * task security token (2 ints)
231231- * task audit token (8 ints)
232232- * dyld info (2 64-bit ints and 1 int)
233233- * task_extmod_info_t (8 64-bit ints)
234234- * task_basic_info_64_2_t
235235- * mach_task_basic_info_t (12 ints)
236236- * task_power_info_t (18 ints)
237237- * If other task_info flavors are added, this
238238- * definition may need to be changed. (See
239239- * mach/task_info.h and mach/policy.h) */
240240-type task_flavor_t = int;
241241-type task_info_t = array[*:52] of integer_t;
242242-243243-type task_purgable_info_t = struct[68] of integer_t;
244244-245245-type task_policy_flavor_t = natural_t;
246246-type task_policy_t = array[*:16] of integer_t;
247247-248248-type mem_entry_name_port_t = mach_port_t
249249-#if KERNEL_SERVER
250250- intran: mem_entry_name_port_t null_conversion(mach_port_t)
251251- outtran: mach_port_t null_conversion(mem_entry_name_port_t)
252252-#endif /* KERNEL_SERVER */
253253- ;
254254-255255-type mem_entry_name_port_move_send_t = mach_port_move_send_t
256256- cusertype: mem_entry_name_port_t
257257-#if KERNEL_SERVER
258258- intran: mem_entry_name_port_t null_conversion(mach_port_t)
259259- outtran: mach_port_t null_conversion(mem_entry_name_port_t)
260260-#endif /* KERNEL_SERVER */
261261- ;
262262-263263-type memory_object_default_t = mach_port_t
264264-#if KERNEL_PRIVATE
265265- intran: memory_object_default_t null_conversion(mach_port_t)
266266- outtran: mach_port_t null_conversion(memory_object_default_t)
267267-#endif /* KERNEL_PRIVATE */
268268- ;
269269-270270-type memory_object_t = mach_port_t
271271-#if KERNEL_PRIVATE
272272- intran: memory_object_t convert_port_to_memory_object(mach_port_t)
273273- outtran: mach_port_t convert_memory_object_to_port(memory_object_t)
274274-#endif /* KERNEL_PRIVATE */
275275- ;
276276-277277-278278-type memory_object_control_t = mach_port_t
279279-#if KERNEL_PRIVATE
280280- intran: memory_object_control_t convert_port_to_mo_control(mach_port_t)
281281- outtran: mach_port_t convert_mo_control_to_port(memory_object_control_t)
282282- destructor: memory_object_control_deallocate(memory_object_control_t)
283283-#endif /* KERNEL_PRIVATE */
284284- ;
285285-286286-type memory_object_name_t = mach_port_t
287287- ctype: mach_port_t
288288- ;
289289-290290-291291-type memory_object_copy_strategy_t = int;
292292-type memory_object_return_t = int;
293293-294294-type machine_info_data_t = struct[5] of integer_t;
295295-type machine_slot_data_t = struct[8] of integer_t;
296296-297297-type host_t = mach_port_t
298298-#if KERNEL_SERVER
299299- intran: host_t convert_port_to_host(mach_port_t)
300300- outtran: mach_port_t convert_host_to_port(host_t)
301301-#endif /* KERNEL_SERVER */
302302- ;
303303-304304-type host_priv_t = mach_port_t
305305-#if KERNEL_SERVER
306306- intran: host_priv_t convert_port_to_host_priv(mach_port_t)
307307-#endif /* KERNEL_SERVER */
308308- ;
309309-310310-type host_security_t = mach_port_t
311311-#if KERNEL_SERVER
312312- intran: host_security_t convert_port_to_host_security(mach_port_t)
313313-#endif /* KERNEL_SERVER */
314314- ;
315315-316316- /*
317317- * host_info_t: variable-sized inline array that can contain:
318318- *
319319- * host_basic_info_old_t (5 ints)
320320- * host_basic_info_t (12 ints)
321321- * host_sched_info_t (2 ints)
322322- * kernel_resource_sizes_t (5 ints)
323323- * host_load_info_t (6 ints)
324324- * vm_statistics32_t (15 ints)
325325- * host_purgable_info_t (68 ints)
326326- * host_expired_task_info uses a task_power_info (18 ints)
327327- *
328328- * If other host_info flavors are added, this definition may
329329- * need to be changed. (See mach/{host_info,vm_statistics}.h)
330330- */
331331-type host_flavor_t = int;
332332-type host_info_t = array[*:68] of integer_t;
333333- /*
334334- * host_info64_t: variable-sized inline array that can contain:
335335- *
336336- * vm_statistics_t (6 ints and 9 longs)
337337- * vm_extmod_statistics_t (6 64-bit ints)
338338- */
339339-type host_info64_t = array[*:256] of integer_t;
340340-341341-type processor_t = mach_port_t
342342-#if KERNEL_SERVER
343343- intran: processor_t convert_port_to_processor(mach_port_t)
344344- outtran: mach_port_t convert_processor_to_port(processor_t)
345345-#endif /* KERNEL_SERVER */
346346- ;
347347-348348-type processor_array_t = ^array[] of processor_t;
349349-350350- /* processor_info_t: variable-sized inline array that can
351351- * contain:
352352- * processor_basic_info_t: (5 ints)
353353- * processor_cpu_load_info_t:(4 ints)
354354- * processor_machine_info_t :(12 ints)
355355- * If other processor_info flavors are added, this definition
356356- * may need to be changed. (See mach/processor_info.h) */
357357-type processor_flavor_t = int;
358358-type processor_info_t = array[*:12] of integer_t;
359359-type processor_info_array_t = ^array[] of integer_t;
360360-361361-type processor_set_t = mach_port_t
362362-#if KERNEL_SERVER
363363- intran: processor_set_t convert_port_to_pset(mach_port_t)
364364- outtran: mach_port_t convert_pset_to_port(processor_set_t)
365365- destructor: pset_deallocate(processor_set_t)
366366-#endif /* KERNEL_SERVER */
367367- ;
368368-369369-type processor_set_array_t = ^array[] of processor_set_t;
370370-371371-type processor_set_name_t = mach_port_t
372372-#if KERNEL_SERVER
373373- intran: processor_set_name_t convert_port_to_pset_name(mach_port_t)
374374- outtran: mach_port_t convert_pset_name_to_port(processor_set_name_t)
375375- destructor: pset_deallocate(processor_set_name_t)
376376-#endif /* KERNEL_SERVER */
377377- ;
378378-379379-type processor_set_name_array_t = ^array[] of processor_set_name_t;
380380-381381- /* processor_set_info_t: variable-size inline array
382382- * that can hold:
383383- * processor_set_basic_info (5 ints)
384384- * processor_set_load_info (4 ints)
385385- * policy_timeshare_base_t (1 int)
386386- * policy_fifo_base_t (1 int)
387387- * policy_rr_base_t (1 int)
388388- * policy_timeshare_base_t (1 int)
389389- * policy_fifo_base_t (1 int)
390390- * policy_rr_base_t (1 int)
391391- * policy_t (1 int)
392392- * If other flavors are added, this definition may
393393- * need to be changed. (see mach/processor.h) */
394394-type processor_set_flavor_t = int;
395395-type processor_set_info_t = array[*:5] of integer_t;
396396-397397-type bootstrap_t = mach_port_t;
398398-399399-type kernel_version_t = c_string[*:512];
400400-type kernel_boot_info_t = c_string[*:4096];
401401-402402-type time_value_t = struct[2] of integer_t;
403403-404404-type mach_port_qos_t = struct[2] of integer_t;
405405-406406-type mach_port_options_t = struct[3] of uint64_t;
407407-type mach_port_options_ptr_t = ^ mach_port_options_t;
408408-409409-type emulation_vector_t = ^array[] of vm_offset_t;
410410-411411-type inline_existence_map_t = array[*:512] of char;
412412-413413-type policy_t = int;
414414- /* policy_info_t: variable-size inline array. Can hold:
415415- * policy_timeshare_info_t (5 ints)
416416- * policy_fifo_info_t (4 ints)
417417- * policy_rr_info_t (5 ints) */
418418-type policy_base_t = array[*:5] of integer_t;
419419-type policy_info_t = array[*:2] of integer_t;
420420-type policy_limit_t = array[*:1] of integer_t;
421421-422422-type ledger_t = mach_port_t
423423-#if KERNEL_SERVER
424424- intran: ledger_t convert_port_to_ledger(mach_port_t)
425425- outtran: mach_port_t convert_ledger_to_port(ledger_t)
426426-#endif /* KERNEL_SERVER */
427427- ;
428428-429429-type ledger_array_t = ^array[] of ledger_t;
430430-type ledger_item_t = integer_t;
431431- /* DEPRECATED */
432432-433433-type ledger_amount_t = int64_t;
434434-435435-type security_token_t = struct[2] of uint32_t;
436436-type audit_token_t = struct[8] of uint32_t;
437437-438438-type msg_labels_t = mach_port_t;
439439-440440- /* memory_object_info_t: variable-size inline array:
441441- * memory_object_attr_info_t (5 ints)
442442- * XXX actually it's 6 ints temporarily (object_ready!)
443443- * memory_object_behave_info_t (4 ints)
444444- * memory_object_perf_info_t (2 ints)
445445- * old_memory_object_attr_info_t (3 ints)
446446- * If other flavors are added, this definition may
447447- * need to be changed. (see mach/memory_object.h) */
448448-type memory_object_flavor_t = int;
449449-type memory_object_info_t = array[*:6] of int;
450450-451451- /* vm_region_info_t: variable-size inline array that can hold:
452452- * vm_region_basic_info_t (8 ints)
453453- * If other flavors are added, this definition may
454454- * need to be changed. (see mach/vm_region.h) */
455455-type vm_region_flavor_t = int;
456456-type vm_region_info_t = array[*:10] of int;
457457-type vm_region_recurse_info_t = array[*:19] of int;
458458-459459-type vm_page_info_flavor_t = int;
460460-type vm_page_info_t = array[*:32] of int;
461461-462462-type mach_vm_read_entry_t = array[512] of mach_vm_offset_t;
463463-type vm_read_entry_t = array[512] of vm_offset_t;
464464-#if VM32_SUPPORT
465465-type vm32_read_entry_t = array[512] of vm32_offset_t;
466466-#endif
467467-468468-type exception_mask_t = int;
469469-type exception_behavior_t = int;
470470-471471-type exception_handler_t = mach_port_t;
472472-473473-type exception_handler_array_t =
474474- array[*:32] of exception_handler_t;
475475-476476-type exception_behavior_array_t =
477477- array[*:32] of exception_behavior_t;
478478-479479-type exception_flavor_array_t =
480480- array[*:32] of thread_state_flavor_t;
481481-482482-type exception_mask_array_t =
483483- array[*:32] of exception_mask_t;
484484-485485-type semaphore_t = mach_port_t
486486-#if KERNEL_SERVER
487487- intran: semaphore_t convert_port_to_semaphore(mach_port_t)
488488- outtran: mach_port_t convert_semaphore_to_port(semaphore_t)
489489- destructor: semaphore_dereference(semaphore_t)
490490-#endif /* KERNEL_SERVER */
491491- ;
492492-493493-type semaphore_consume_ref_t = mach_port_move_send_t
494494- cusertype: semaphore_t
495495-#if KERNEL_SERVER
496496- intran: semaphore_t convert_port_to_semaphore(mach_port_t)
497497- outtran: mach_port_t convert_semaphore_to_port(semaphore_t)
498498- destructor: semaphore_dereference(semaphore_t)
499499-#endif /* KERNEL_SERVER */
500500- ;
501501-502502-type lock_set_t = mach_port_t
503503-#if KERNEL_SERVER
504504- intran: lock_set_t convert_port_to_lock_set(mach_port_t)
505505- outtran: mach_port_t convert_lock_set_to_port(lock_set_t)
506506- destructor: lock_set_dereference(lock_set_t)
507507-#endif /* KERNEL_SERVER */
508508- ;
509509-510510-type task_suspension_token_t = mach_port_move_send_once_t
511511-#if KERNEL_SERVER
512512- intran: task_suspension_token_t convert_port_to_task_suspension_token(mach_port_t)
513513- outtran: mach_port_t convert_task_suspension_token_to_port(task_suspension_token_t)
514514-#endif /* KERNEL_SERVER */
515515- ;
516516-517517-518518-/* public voucher types */
519519-520520-/* Mach voucher object */
521521-type mach_voucher_t = mach_port_t;
522522-type mach_voucher_name_t = mach_port_name_t;
523523-524524-type mach_voucher_attr_manager_t = mach_port_t;
525525-type mach_voucher_attr_control_t = mach_port_t;
526526-527527-/* IPC voucher internal object */
528528-type ipc_voucher_t = mach_port_t
529529-#if KERNEL_SERVER
530530- intran: ipc_voucher_t convert_port_to_voucher(mach_port_t)
531531- outtran: mach_port_t convert_voucher_to_port(ipc_voucher_t)
532532- destructor: ipc_voucher_release(ipc_voucher_t)
533533-#endif /* KERNEL_SERVER */
534534- ;
535535-536536-/* IPC voucher attribute control internal object */
537537-type ipc_voucher_attr_control_t = mach_port_t
538538-#if KERNEL_SERVER
539539- intran: ipc_voucher_attr_control_t convert_port_to_voucher_attr_control(mach_port_t)
540540- outtran: mach_port_t convert_voucher_attr_control_to_port(ipc_voucher_attr_control_t)
541541- destructor: ipc_voucher_attr_control_release(ipc_voucher_attr_control_t)
542542-#endif /* KERNEL_SERVER */
543543- ;
544544-545545-type mach_voucher_attr_key_t = uint32_t;
546546-547547-type mach_voucher_attr_command_t = uint32_t;
548548-type mach_voucher_attr_recipe_command_t = uint32_t;
549549-550550-type mach_voucher_attr_content_size_t = uint32_t;
551551-type mach_voucher_attr_content_t = array[*:4096] of uint8_t;
552552-type mach_voucher_attr_content_array_t = array[*:5120] of uint8_t;
553553-554554-type mach_voucher_attr_raw_recipe_size_t = uint32_t;
555555-type mach_voucher_attr_raw_recipe_t = array[*:4096] of uint8_t;
556556-type mach_voucher_attr_raw_recipe_array_t = array[*:5120] of uint8_t;
557557-558558-type mach_voucher_selector_t = uint32_t;
559559-560560-type mach_voucher_attr_value_handle_t = uint64_t;
561561-type mach_voucher_attr_value_handle_array_t = array[*:4] of mach_voucher_attr_value_handle_t;
562562-type mach_voucher_attr_value_reference_t = uint32_t;
563563-564564-/* kernel module loader */
565565-type kmod_t = int;
566566-type kmod_control_flavor_t = int;
567567-568568-type kmod_args_t = ^array[] of MACH_MSG_TYPE_BYTE
569569- ctype: kmod_args_t;
570570-571571-type io_master_t = mach_port_t;
572572-type UNDServerRef = mach_port_t;
573573-574574-#if KERNEL_SERVER
575575-#ifdef MACH_KERNEL_PRIVATE
576576-simport <ipc/ipc_voucher.h>; /* for voucher conversions */
577577-simport <kern/ipc_kobject.h>; /* for null conversion */
578578-simport <kern/ipc_tt.h>; /* for task/thread conversion */
579579-simport <kern/ipc_host.h>; /* for host/processor/pset conversions */
580580-simport <kern/ipc_sync.h>; /* for lock_set and semaphore conversions */
581581-simport <kern/ledger.h>; /* for ledger conversions */
582582-simport <kern/processor.h>; /* for processor conversions */
583583-simport <kern/sync_lock.h>; /* for lock-set conversions */
584584-simport <kern/sync_sema.h>; /* for semaphore conversions */
585585-simport <vm/memory_object.h>; /* for memory object type conversions */
586586-simport <vm/vm_map.h>; /* for vm_map conversions */
587587-#endif /* MACH_KERNEL_PRIVATE */
588588-589589-simport <kern/ipc_mig.h>; /* pick up kernel-specific MIG things */
590590-591591-#endif /* KERNEL_SERVER */
592592-593593-import <mach/mig.h>;
594594-import <mach/mach_types.h>;
595595-596596-#endif /* _MACH_MACH_TYPES_DEFS_ */
597597-598598-/* vim: set ft=c : */
-528
src/kernel/mach/mach_vm.defs
···11-/*
22- * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_FREE_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/mach_vm.defs
6060- *
6161- * Exported kernel VM calls (for any task on the platform).
6262- */
6363-6464-subsystem
6565-#if KERNEL_SERVER
6666- KernelServer
6767-#endif /* KERNEL_SERVER */
6868-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
6969- mach_vm
7070-#else
7171- vm_map_lp64_local
7272-#endif
7373- 4800;
7474-7575-#include <mach/std_types.defs>
7676-#include <mach/mach_types.defs>
7777-#include <mach_debug/mach_debug_types.defs>
7878-7979-#if !KERNEL && !LIBSYSCALL_INTERFACE
8080-#define PREFIX(NAME) _kernelrpc_ ## NAME
8181-#else
8282-#define PREFIX(NAME) NAME
8383-#endif
8484-8585-/*
8686- * Allocate zero-filled memory in the address space
8787- * of the target task, either at the specified address,
8888- * or wherever space can be found (controlled by flags),
8989- * of the specified size. The address at which the
9090- * allocation actually took place is returned.
9191- */
9292-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
9393-routine PREFIX(mach_vm_allocate) (
9494- target : vm_task_entry_t;
9595- inout address : mach_vm_address_t;
9696- size : mach_vm_size_t;
9797- flags : int);
9898-9999-#else
100100-101101-#if !KERNEL && !LIBSYSCALL_INTERFACE
102102-skip;
103103-#else
104104-routine PREFIX(vm_allocate) (
105105- target : vm_task_entry_t;
106106- inout address : mach_vm_address_t;
107107- size : mach_vm_size_t;
108108- flags : int);
109109-110110-#endif
111111-112112-#endif
113113-114114-115115-/*
116116- * Deallocate the specified range from the virtual
117117- * address space of the target virtual memory map.
118118- */
119119-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
120120-routine PREFIX(mach_vm_deallocate) (
121121- target : vm_task_entry_t;
122122- address : mach_vm_address_t;
123123- size : mach_vm_size_t);
124124-125125-#else
126126-127127-#if !KERNEL && !LIBSYSCALL_INTERFACE
128128-skip;
129129-#else
130130-routine PREFIX(vm_deallocate) (
131131- target : vm_task_entry_t;
132132- address : mach_vm_address_t;
133133- size : mach_vm_size_t);
134134-#endif
135135-136136-#endif
137137-138138-/*
139139- * Set the current or maximum protection attribute
140140- * for the specified range of the virtual address
141141- * space of the target virtual memory map. The current
142142- * protection limits the memory access rights of threads
143143- * within the map; the maximum protection limits the accesses
144144- * that may be given in the current protection.
145145- * Protections are specified as a set of {read, write, execute}
146146- * *permissions*.
147147- */
148148-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
149149-routine PREFIX(mach_vm_protect) (
150150- target_task : vm_task_entry_t;
151151- address : mach_vm_address_t;
152152- size : mach_vm_size_t;
153153- set_maximum : boolean_t;
154154- new_protection : vm_prot_t);
155155-156156-157157-#else
158158-159159-#if !KERNEL && !LIBSYSCALL_INTERFACE
160160-skip;
161161-#else
162162-163163-routine PREFIX(vm_protect) (
164164- target_task : vm_task_entry_t;
165165- address : mach_vm_address_t;
166166- size : mach_vm_size_t;
167167- set_maximum : boolean_t;
168168- new_protection : vm_prot_t);
169169-170170-#endif
171171-172172-#endif
173173-174174-/*
175175- * Set the inheritance attribute for the specified range
176176- * of the virtual address space of the target address space.
177177- * The inheritance value is one of {none, copy, share}, and
178178- * specifies how the child address space should acquire
179179- * this memory at the time of a task_create call.
180180- */
181181-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
182182-routine mach_vm_inherit(
183183-#else
184184-routine vm_inherit(
185185-#endif
186186- target_task : vm_task_entry_t;
187187- address : mach_vm_address_t;
188188- size : mach_vm_size_t;
189189- new_inheritance : vm_inherit_t);
190190-191191-/*
192192- * Returns the contents of the specified range of the
193193- * virtual address space of the target task. [The
194194- * range must be aligned on a virtual page boundary,
195195- * and must be a multiple of pages in extent. The
196196- * protection on the specified range must permit reading.]
197197- */
198198-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
199199-routine PREFIX(mach_vm_read) (
200200-#else
201201-routine PREFIX(vm_read) (
202202-#endif
203203- target_task : vm_map_t;
204204- address : mach_vm_address_t;
205205- size : mach_vm_size_t;
206206- out data : pointer_t);
207207-208208-/*
209209- * List corrollary to vm_read, returns mapped contents of specified
210210- * ranges within target address space.
211211- */
212212-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
213213-routine mach_vm_read_list(
214214-#else
215215-routine vm_read_list(
216216-#endif
217217- target_task : vm_map_t;
218218- inout data_list : mach_vm_read_entry_t;
219219- count : natural_t);
220220-221221-/*
222222- * Writes the contents of the specified range of the
223223- * virtual address space of the target task. [The
224224- * range must be aligned on a virtual page boundary,
225225- * and must be a multiple of pages in extent. The
226226- * protection on the specified range must permit writing.]
227227- */
228228-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
229229-routine mach_vm_write(
230230-#else
231231-routine vm_write(
232232-#endif
233233- target_task : vm_map_t;
234234- address : mach_vm_address_t;
235235- data : pointer_t);
236236-237237-/*
238238- * Copy the contents of the source range of the virtual
239239- * address space of the target task to the destination
240240- * range in that same address space. [Both of the
241241- * ranges must be aligned on a virtual page boundary,
242242- * and must be multiples of pages in extent. The
243243- * protection on the source range must permit reading,
244244- * and the protection on the destination range must
245245- * permit writing.]
246246- */
247247-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
248248-routine mach_vm_copy(
249249-#else
250250-routine vm_copy(
251251-#endif
252252- target_task : vm_map_t;
253253- source_address : mach_vm_address_t;
254254- size : mach_vm_size_t;
255255- dest_address : mach_vm_address_t);
256256-257257-/*
258258- * Returns the contents of the specified range of the
259259- * virtual address space of the target task. [There
260260- * are no alignment restrictions, and the results will
261261- * overwrite the area pointed to by data - which must
262262- * already exist. The protection on the specified range
263263- * must permit reading.]
264264- */
265265-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
266266-routine mach_vm_read_overwrite(
267267-#else
268268-routine vm_read_overwrite(
269269-#endif
270270- target_task : vm_map_t;
271271- address : mach_vm_address_t;
272272- size : mach_vm_size_t;
273273- data : mach_vm_address_t;
274274- out outsize : mach_vm_size_t);
275275-276276-277277-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
278278-routine mach_vm_msync(
279279-#else
280280-routine vm_msync(
281281-#endif
282282- target_task : vm_map_t;
283283- address : mach_vm_address_t;
284284- size : mach_vm_size_t;
285285- sync_flags : vm_sync_t );
286286-287287-/*
288288- * Set the paging behavior attribute for the specified range
289289- * of the virtual address space of the target task.
290290- * The behavior value is one of {default, random, forward
291291- * sequential, reverse sequential} and indicates the expected
292292- * page reference pattern for the specified range.
293293- */
294294-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
295295-routine mach_vm_behavior_set(
296296-#else
297297-routine vm_behavior_set(
298298-#endif
299299- target_task : vm_map_t;
300300- address : mach_vm_address_t;
301301- size : mach_vm_size_t;
302302- new_behavior : vm_behavior_t);
303303-304304-305305-/*
306306- * Map a user-supplie memory object into the virtual address
307307- * space of the target task. If desired (anywhere is TRUE),
308308- * the kernel will find a suitable address range of the
309309- * specified size; else, the specific address will be allocated.
310310- *
311311- * The beginning address of the range will be aligned on a virtual
312312- * page boundary, be at or beyond the address specified, and
313313- * meet the mask requirements (bits turned on in the mask must not
314314- * be turned on in the result); the size of the range, in bytes,
315315- * will be rounded up to an integral number of virtual pages.
316316- *
317317- * The memory in the resulting range will be associated with the
318318- * specified memory object, with the beginning of the memory range
319319- * referring to the specified offset into the memory object.
320320- *
321321- * The mapping will take the current and maximum protections and
322322- * the inheritance attributes specified; see the vm_protect and
323323- * vm_inherit calls for a description of these attributes.
324324- *
325325- * If desired (copy is TRUE), the memory range will be filled
326326- * with a copy of the data from the memory object; this copy will
327327- * be private to this mapping in this target task. Otherwise,
328328- * the memory in this mapping will be shared with other mappings
329329- * of the same memory object at the same offset (in this task or
330330- * in other tasks). [The Mach kernel only enforces shared memory
331331- * consistency among mappings on one host with similar page alignments.
332332- * The user-defined memory manager for this object is responsible
333333- * for further consistency.]
334334- */
335335-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
336336-routine PREFIX(mach_vm_map) (
337337-#else
338338-#if defined(__arm__) && !LIBSYSCALL_INTERFACE
339339-routine _vm_map_arm(
340340-#else
341341-routine PREFIX(vm_map) (
342342-#endif
343343-#endif
344344- target_task : vm_task_entry_t;
345345- inout address : mach_vm_address_t;
346346- size : mach_vm_size_t;
347347- mask : mach_vm_offset_t;
348348- flags : int;
349349- object : mem_entry_name_port_t;
350350- offset : memory_object_offset_t;
351351- copy : boolean_t;
352352- cur_protection : vm_prot_t;
353353- max_protection : vm_prot_t;
354354- inheritance : vm_inherit_t);
355355-356356-/*
357357- * Set/Get special properties of memory associated
358358- * to some virtual address range, such as cachability,
359359- * migrability, replicability. Machine-dependent.
360360- */
361361-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
362362-routine mach_vm_machine_attribute(
363363-#else
364364-routine vm_machine_attribute(
365365-#endif
366366- target_task : vm_map_t;
367367- address : mach_vm_address_t;
368368- size : mach_vm_size_t;
369369- attribute : vm_machine_attribute_t;
370370- inout value : vm_machine_attribute_val_t);
371371-372372-/*
373373- * Map portion of a task's address space.
374374- */
375375-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
376376-routine PREFIX(mach_vm_remap) (
377377-#else
378378-routine PREFIX(vm_remap) (
379379-#endif
380380- target_task : vm_map_t;
381381- inout target_address : mach_vm_address_t;
382382- size : mach_vm_size_t;
383383- mask : mach_vm_offset_t;
384384- flags : int;
385385- src_task : vm_map_t;
386386- src_address : mach_vm_address_t;
387387- copy : boolean_t;
388388- out cur_protection : vm_prot_t;
389389- out max_protection : vm_prot_t;
390390- inheritance : vm_inherit_t);
391391-392392-/*
393393- * Give the caller information on the given location in a virtual
394394- * address space. If a page is mapped return ref and dirty info.
395395- */
396396-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
397397-routine mach_vm_page_query(
398398-#else
399399-routine vm_map_page_query(
400400-#endif
401401- target_map :vm_map_t;
402402- offset :mach_vm_offset_t;
403403- out disposition :integer_t;
404404- out ref_count :integer_t);
405405-406406-407407-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
408408-routine mach_vm_region_recurse(
409409-#else
410410-routine vm_region_recurse_64(
411411-#endif
412412- target_task : vm_map_t;
413413- inout address : mach_vm_address_t;
414414- out size : mach_vm_size_t;
415415- inout nesting_depth : natural_t;
416416- out info : vm_region_recurse_info_t,CountInOut);
417417-418418-/*
419419- * Returns information about the contents of the virtual
420420- * address space of the target task at the specified
421421- * address. The returned protection, inheritance, sharing
422422- * and memory object values apply to the entire range described
423423- * by the address range returned; the memory object offset
424424- * corresponds to the beginning of the address range.
425425- * [If the specified address is not allocated, the next
426426- * highest address range is described. If no addresses beyond
427427- * the one specified are allocated, the call returns KERN_NO_SPACE.]
428428- */
429429-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
430430-routine mach_vm_region(
431431-#else
432432-routine vm_region_64(
433433-#endif
434434- target_task : vm_map_t;
435435- inout address : mach_vm_address_t;
436436- out size : mach_vm_size_t;
437437- flavor : vm_region_flavor_t;
438438- out info : vm_region_info_t, CountInOut;
439439- out object_name : memory_object_name_t =
440440- MACH_MSG_TYPE_MOVE_SEND
441441- ctype: mach_port_t);
442442-443443-/*
444444- * Allow application level processes to create named entries which
445445- * correspond to mapped portions of their address space. These named
446446- * entries can then be manipulated, shared with other processes in
447447- * other address spaces and ultimately mapped in ohter address spaces
448448- *
449449- * THIS INTERFACE IS STILL EVOLVING.
450450- */
451451-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
452452-#if !defined(__LP64__) || KERNEL_SERVER || XNU_KERNEL_PRIVATE || LIBSYSCALL_INTERFACE
453453-routine _mach_make_memory_entry(
454454-#else
455455-routine mach_make_memory_entry(
456456-#endif
457457-#else
458458-routine mach_make_memory_entry_64(
459459-#endif
460460- target_task :vm_map_t;
461461- inout size :memory_object_size_t;
462462- offset :memory_object_offset_t;
463463- permission :vm_prot_t;
464464- out object_handle :mem_entry_name_port_move_send_t;
465465- parent_handle :mem_entry_name_port_t);
466466-467467-/*
468468- * Control behavior and investigate state of a "purgable" object in
469469- * the virtual address space of the target task. A purgable object is
470470- * created via a call to mach_vm_allocate() with VM_FLAGS_PURGABLE
471471- * specified. See the routine implementation for a complete
472472- * definition of the routine.
473473- */
474474-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
475475-routine mach_vm_purgable_control(
476476-#else
477477-routine vm_purgable_control(
478478-#endif
479479- target_task : vm_map_t;
480480- address : mach_vm_address_t;
481481- control : vm_purgable_t;
482482- inout state : int);
483483-484484-485485-#if !defined(_MACH_VM_PUBLISH_AS_LOCAL_)
486486-routine mach_vm_page_info(
487487- target_task : vm_map_t;
488488- address : mach_vm_address_t;
489489- flavor : vm_page_info_flavor_t;
490490- out info : vm_page_info_t, CountInOut);
491491-#else
492492-skip;
493493-#endif
494494-495495-/****************************** Legacy section ***************************/
496496-/* The following definitions are exist to provide compatibility with */
497497-/* the legacy APIs. They are no different. We just need to produce */
498498-/* the user-level stub interface for them. */
499499-/****************************** Legacy section ***************************/
500500-501501-502502-/*
503503- * These interfaces just aren't supported in the new (wide) model:
504504- *
505505- * mach_vm_region_info() -
506506- * vm_map_pages_info() -
507507- * no user-level replacement for these MACH_DEBUG interfaces
508508- * vm_map_get_upl() -
509509- * no user-level replacement at the moment
510510- * vm_region_info() -
511511- * use mach_vm_region_info() or vm_region_info_64()
512512- * vm_region_recurse() -
513513- * use mach_vm_region_recurse() or vm_region_recurse_64()
514514- */
515515-516516-/*
517517- * The following legacy interfaces are provides as macro wrappers to the new
518518- * interfaces. You should strive to use the new ones instead:
519519- *
520520- * vm_map() -
521521- * use mach_vm_map() or vm_map_64()
522522- * vm_region() -
523523- * use mach_vm_region() or vm_region_64()
524524- * mach_make_memory_entry() -
525525- * use mach_vm_make_memory_entry() or mach_make_memory_entry_64()
526526- */
527527-528528-/* vim: set ft=c : */
-69
src/kernel/mach/mach_voucher.defs
···11-/*
22- * Copyright (c) 2013 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-2929-subsystem
3030-#if KERNEL_SERVER
3131- KernelServer
3232-#endif /* KERNEL_SERVER */
3333- mach_voucher 5400;
3434-3535-#include <mach/std_types.defs>
3636-#include <mach/mach_types.defs>
3737-3838-/* extract just the content data for a <voucher, key> pair */
3939-routine mach_voucher_extract_attr_content(
4040- voucher : ipc_voucher_t;
4141- key : mach_voucher_attr_key_t;
4242- out content : mach_voucher_attr_content_t, CountInOut);
4343-4444-/* extract a recipe to reconstitue a <voucher, key> pair item in a future voucher */
4545-routine mach_voucher_extract_attr_recipe(
4646- voucher : ipc_voucher_t;
4747- key : mach_voucher_attr_key_t;
4848- out recipe : mach_voucher_attr_raw_recipe_t, CountInOut);
4949-5050-/* extract a recipe array to reconstitue all the key values in a future voucher */
5151-routine mach_voucher_extract_all_attr_recipes(
5252- voucher : ipc_voucher_t;
5353- out recipes : mach_voucher_attr_raw_recipe_array_t, CountInOut);
5454-5555-/* execute a command against a given voucher attribute */
5656-routine mach_voucher_attr_command(
5757- voucher : ipc_voucher_t;
5858- key : mach_voucher_attr_key_t;
5959- command : mach_voucher_attr_command_t;
6060- in_content : mach_voucher_attr_content_t;
6161- out out_content : mach_voucher_attr_content_t, CountInOut);
6262-6363-/* extract a recipe array to reconstitue all the key values in a future voucher */
6464-routine mach_voucher_debug_info(
6565- task : ipc_space_t;
6666- voucher_name: mach_port_name_t;
6767- out recipes : mach_voucher_attr_raw_recipe_array_t, CountInOut);
6868-6969-/* vim: set ft=c : */
-48
src/kernel/mach/mach_voucher_attr_control.defs
···11-/*
22- * Copyright (c) 2013 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-2929-subsystem
3030-#if KERNEL_SERVER
3131- KernelServer
3232-#endif /* KERNEL_SERVER */
3333- mach_voucher_attr_control 5600;
3434-3535-#include <mach/std_types.defs>
3636-#include <mach/mach_types.defs>
3737-3838-/* Extract the given voucher-control's value-handle from the supplied voucher */
3939-routine mach_voucher_attr_control_get_values(
4040- control : ipc_voucher_attr_control_t;
4141- voucher : ipc_voucher_t;
4242- out value_handles : mach_voucher_attr_value_handle_array_t, CountInOut);
4343-4444-/* Create a new voucher with the control's privilege (to directly assign value-handles) */
4545-routine mach_voucher_attr_control_create_mach_voucher(
4646- control : ipc_voucher_attr_control_t;
4747- recipes : mach_voucher_attr_raw_recipe_array_t;
4848- out voucher : ipc_voucher_t);
-206
src/kernel/mach/memory_object.defs
···11-/*
22- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/memory_object.defs
6060- *
6161- * Abstract:
6262- * Basic Mach external memory management interface declaration.
6363- */
6464-6565-subsystem
6666-#if KERNEL_USER
6767- KernelUser
6868-#endif /* KERNEL_USER */
6969-#if KERNEL_SERVER
7070- KernelServer
7171-#endif /* KERNEL_SERVER */
7272- memory_object 2200;
7373-7474-#include <mach/std_types.defs>
7575-#include <mach/mach_types.defs>
7676-7777-#if KERNEL_SERVER
7878-serverprefix dp_;
7979-#endif
8080-8181-/*
8282- * Initialize the specified memory object, providing
8383- * a memory object control reference on which to make
8484- * cache control calls.
8585- * [To allow the mapping of this object to be used, the
8686- * memory manager must call memory_object_set_attributes,
8787- * specifying the "ready" parameter as TRUE. To reject
8888- * all mappings of this object, the memory manager may
8989- * use memory_object_destroy.]
9090- */
9191-routine memory_object_init(
9292- memory_object : memory_object_t;
9393- memory_control : memory_object_control_t;
9494- memory_object_page_size : memory_object_cluster_size_t);
9595-9696-9797-/*
9898- * Indicates that the specified memory object is no longer
9999- * mapped (or cached -- see memory_object_set_attributes),
100100- * and that further mappings will cause another memory_object_init
101101- * call to be made.
102102- *
103103- * [The kernel will release its reference on the memory object
104104- * after this call returns. The memory object control associated
105105- * with the memory object is no longer usable - the pager should
106106- * drop the control reference granted to it by memory_object_init.]
107107- */
108108-routine memory_object_terminate(
109109- memory_object : memory_object_t);
110110-111111-/*
112112- * Request data from this memory object. At least
113113- * the specified data should be returned with at
114114- * least the specified access permitted.
115115- *
116116- * [Response should be upl commit over the specified range.]
117117- */
118118-routine memory_object_data_request(
119119- memory_object : memory_object_t;
120120- offset : memory_object_offset_t;
121121- length : memory_object_cluster_size_t;
122122- desired_access : vm_prot_t;
123123- fault_info : memory_object_fault_info_t);
124124-125125-/*
126126- * Return data to manager. This call is used in place of data_write
127127- * for objects initialized by object_ready instead of set_attributes.
128128- * This call indicates whether the returned data is dirty and whether
129129- * the kernel kept a copy. Precious data remains precious if the
130130- * kernel keeps a copy. The indication that the kernel kept a copy
131131- * is only a hint if the data is not precious; the cleaned copy may
132132- * be discarded without further notifying the manager.
133133- *
134134- * [response should be a upl_commit over the range specified]
135135- */
136136-routine memory_object_data_return(
137137- memory_object : memory_object_t;
138138- offset : memory_object_offset_t;
139139- size : memory_object_cluster_size_t;
140140- out resid_offset : memory_object_offset_t;
141141- out io_error : int;
142142- dirty : boolean_t;
143143- kernel_copy : boolean_t;
144144- upl_flags : int);
145145-146146-/*
147147- * Provide initial data contents for this region of
148148- * the memory object. If data has already been written
149149- * to the object, this value must be discarded; otherwise,
150150- * this call acts identically to memory_object_data_return.
151151- *
152152- * [response should be UPL commit over the specified range.]
153153- */
154154-routine memory_object_data_initialize(
155155- memory_object : memory_object_t;
156156- offset : memory_object_offset_t;
157157- size : memory_object_cluster_size_t);
158158-159159-/*
160160- * Request that the specified portion of this
161161- * memory object be unlocked to allow the specified
162162- * forms of access; the kernel already has the data.
163163- *
164164- * [Response should be memory_object_lock_request when
165165- * the operation is fully complete.]
166166- */
167167-routine memory_object_data_unlock(
168168- memory_object : memory_object_t;
169169- offset : memory_object_offset_t;
170170- size : memory_object_size_t;
171171- desired_access : vm_prot_t);
172172-173173-174174-/*
175175- * Request that the specified portion of this
176176- * memory object be synchronized with its backing
177177- * store according to the supplied flags.
178178- *
179179- * [Response should be memory_object_synchronize_completed when
180180- * the operation is fully complete.]
181181- */
182182-routine memory_object_synchronize(
183183- memory_object : memory_object_t;
184184- offset : memory_object_offset_t;
185185- size : memory_object_size_t;
186186- sync_flags : vm_sync_t );
187187-188188-/*
189189- * Notify the pager that the specified memory object
190190- * has no other (mapped) references besides the named
191191- * reference held by the pager itself.
192192- *
193193- * [Response should be a release of the named reference when
194194- * the pager deems that appropriate.]
195195- */
196196-routine memory_object_map(
197197- memory_object : memory_object_t;
198198- prot : vm_prot_t);
199199-routine memory_object_last_unmap(
200200- memory_object : memory_object_t);
201201-202202-routine memory_object_data_reclaim(
203203- memory_object : memory_object_t;
204204- reclaim_backing_store : boolean_t);
205205-206206-/* vim: set ft=c : */
-195
src/kernel/mach/memory_object_control.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/memory_object_control.defs
6060- *
6161- * Abstract:
6262- * Basic Mach external memory management interface declaration.
6363- */
6464-6565-subsystem
6666-#if KERNEL_USER
6767- KernelUser
6868-#endif /* KERNEL_USER */
6969-#if KERNEL_SERVER
7070- KernelServer
7171-#endif /* KERNEL_SERVER */
7272- memory_object_control 2000;
7373-7474-#include <mach/std_types.defs>
7575-#include <mach/mach_types.defs>
7676-7777-/*
7878- * Retrieves the attributes currently associated with
7979- * a memory object.
8080- */
8181-routine memory_object_get_attributes(
8282- memory_control : memory_object_control_t;
8383- flavor : memory_object_flavor_t;
8484- out attributes : memory_object_info_t, CountInOut);
8585-8686-8787-routine memory_object_change_attributes(
8888- memory_control : memory_object_control_t;
8989- flavor : memory_object_flavor_t;
9090- attributes : memory_object_info_t
9191- );
9292-9393-routine memory_object_synchronize_completed (
9494- memory_control : memory_object_control_t;
9595- offset : memory_object_offset_t;
9696- length : memory_object_size_t);
9797-9898-/*
9999- * Control use of the data associated with the given
100100- * memory object. For each page in the given range,
101101- * perform the following operations, in order:
102102- * 1) restrict access to the page (disallow
103103- * forms specified by "prot");
104104- * 2) write back modifications (if "should_return"
105105- * is RETURN_DIRTY and the page is dirty, or
106106- * "should_return" is RETURN_ALL and the page
107107- * is either dirty or precious); and,
108108- * 3) flush the cached copy (if "should_flush"
109109- * is asserted).
110110- * The set of pages is defined by a starting offset
111111- * ("offset") and size ("size"). Only pages with the
112112- * same page alignment as the starting offset are
113113- * considered.
114114- */
115115-routine memory_object_lock_request(
116116- memory_control : memory_object_control_t;
117117- offset : memory_object_offset_t;
118118- size : memory_object_size_t;
119119- out resid_offset : memory_object_offset_t;
120120- out io_errno : integer_t;
121121- should_return : memory_object_return_t;
122122- flags : integer_t;
123123- lock_value : vm_prot_t
124124- );
125125-126126-127127-/*
128128- */
129129-routine memory_object_destroy(
130130- memory_control : memory_object_control_t;
131131- reason : kern_return_t);
132132-133133-/*
134134- * The pager gets memory_object_data_request and memory_object_data_return
135135- * calls to inform it that data within the memory object needs to be
136136- * manipulated. Those requests simply identify the range in the memory
137137- * object that needs servicing, but not the data itself. The pager
138138- * turns around and requests one (or several) Universal Page Lists (UPLs)
139139- * from the VM cache object associated with the memory object via one
140140- * of the following calls. These UPLs are then committed (or aborted)
141141- * in whole (or in ranges) as the processing completes.
142142- */
143143-144144-routine memory_object_upl_request(
145145- memory_control : memory_object_control_t;
146146- in offset : memory_object_offset_t;
147147- in size : upl_size_t;
148148- out upl : upl_t;
149149- out page_list : upl_page_info_array_t, CountInOut;
150150- in cntrl_flags : integer_t);
151151-152152-routine memory_object_super_upl_request(
153153- memory_control : memory_object_control_t;
154154- in offset : memory_object_offset_t;
155155- in size : upl_size_t;
156156- in super_size : upl_size_t;
157157- out upl : upl_t;
158158- out page_list : upl_page_info_array_t, CountInOut;
159159- in cntrl_flags : integer_t);
160160-161161-162162-routine memory_object_cluster_size(
163163- control : memory_object_control_t;
164164- out start : memory_object_offset_t;
165165- out length : vm_size_t;
166166- out io_streaming : uint32_t;
167167- in fault_info : memory_object_fault_info_t);
168168-169169-/*
170170- * This functions allows a single page to be manipulated with less overhead
171171- * than creating a UPL.
172172- */
173173-routine memory_object_page_op(
174174- memory_control : memory_object_control_t;
175175- in offset : memory_object_offset_t;
176176- in ops : integer_t;
177177- out phys_entry : uint32_t;
178178- out flags : integer_t);
179179-180180-routine memory_object_recover_named(
181181- memory_control : memory_object_control_t;
182182- in wait_on_terminating : boolean_t);
183183-184184-routine memory_object_release_name(
185185- memory_control : memory_object_control_t;
186186- flags : integer_t);
187187-188188-routine memory_object_range_op(
189189- memory_control : memory_object_control_t;
190190- in offset_beg : memory_object_offset_t;
191191- in offset_end : memory_object_offset_t;
192192- in ops : integer_t;
193193- out range : integer_t);
194194-195195-/* vim: set ft=c : */
-94
src/kernel/mach/memory_object_default.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/memory_object_default.defs
6060- *
6161- * Abstract:
6262- * Mach external memory management interface declaration; subset
6363- * that is applicable to managers of kernel-created memory objects.
6464- */
6565-6666-subsystem
6767-#if KERNEL_USER
6868- KernelUser
6969-#endif /* KERNEL_USER */
7070-#if KERNEL_SERVER
7171- KernelServer
7272-#endif /* KERNEL_SERVER */
7373- memory_object_default 2250;
7474-7575-#include <mach/std_types.defs>
7676-#include <mach/mach_types.defs>
7777-7878-#if KERNEL_SERVER
7979-serverprefix default_pager_;
8080-#endif
8181-8282-/*
8383- * Pass on responsibility for the new kernel-created memory
8484- * object. The port on which this request is that port
8585- * (possibly a memory object itself) registered as the "default
8686- * pager". Other arguments are as described for memory_object_init.
8787- * [No reply required.]
8888- */
8989-routine memory_object_create(
9090- default_memory_manager : memory_object_default_t;
9191- new_memory_object_size : vm_size_t;
9292- out new_memory_object : memory_object_t);
9393-9494-/* vim: set ft=c : */
-134
src/kernel/mach/notify.defs
···11-/*
22- * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-5959-subsystem
6060-#if KERNEL_USER
6161- KernelUser
6262-#endif
6363- notify 64;
6464-6565-#include <mach/std_types.defs>
6666-6767-#if SEQNOS
6868-serverprefix do_seqnos_;
6969-serverdemux seqnos_notify_server;
7070-#else /* !SEQNOS */
7171-serverprefix do_;
7272-serverdemux notify_server;
7373-#endif /* SEQNOS */
7474-7575-/* MACH_NOTIFY_FIRST: 0100 */
7676-skip;
7777-7878-/* MACH_NOTIFY_PORT_DELETED: 0101 */
7979-simpleroutine mach_notify_port_deleted(
8080- notify : mach_port_move_send_once_t;
8181-#if SEQNOS
8282- msgseqno seqno : mach_port_seqno_t;
8383-#endif /* SEQNOS */
8484- name : mach_port_name_t);
8585-8686-#if (KERNEL_USER | MACH_NOTIFY_SEND_POSSIBLE_EXPECTED)
8787-/* MACH_NOTIFY_SEND_POSSIBLE: 0102 */
8888-simpleroutine mach_notify_send_possible(
8989- notify : mach_port_move_send_once_t;
9090-#if SEQNOS
9191- msgseqno seqno : mach_port_seqno_t;
9292-#endif /* SEQNOS */
9393- name : mach_port_name_t);
9494-#else
9595-skip;
9696-#endif
9797-9898-skip; /* was NOTIFY_OWNERSHIP_RIGHTS: 0103 */
9999-100100-skip; /* was NOTIFY_RECEIVE_RIGHTS: 0104 */
101101-102102-/* MACH_NOTIFY_PORT_DESTROYED: 0105 */
103103-simpleroutine mach_notify_port_destroyed(
104104- notify : mach_port_move_send_once_t;
105105-#if SEQNOS
106106- msgseqno seqno : mach_port_seqno_t;
107107-#endif /* SEQNOS */
108108- rights : mach_port_move_receive_t);
109109-110110-/* MACH_NOTIFY_NO_SENDERS: 0106 */
111111-simpleroutine mach_notify_no_senders(
112112- notify : mach_port_move_send_once_t;
113113-#if SEQNOS
114114- msgseqno seqno : mach_port_seqno_t;
115115-#endif /* SEQNOS */
116116- mscount : mach_port_mscount_t);
117117-118118-/* MACH_NOTIFY_SEND_ONCE: 0107 */
119119-simpleroutine mach_notify_send_once(
120120- notify : mach_port_move_send_once_t
121121-#if SEQNOS
122122-; msgseqno seqno : mach_port_seqno_t
123123-#endif /* SEQNOS */
124124- );
125125-126126-/* MACH_NOTIFY_DEAD_NAME: 0110 */
127127-simpleroutine mach_notify_dead_name(
128128- notify : mach_port_move_send_once_t;
129129-#if SEQNOS
130130- msgseqno seqno : mach_port_seqno_t;
131131-#endif /* SEQNOS */
132132- name : mach_port_name_t);
133133-134134-/* vim: set ft=c : */
-128
src/kernel/mach/processor.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_FREE_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/mach_port.defs
6060- * Author: Rich Draves
6161- *
6262- * Exported kernel calls.
6363- */
6464-6565-subsystem
6666-#if KERNEL_SERVER
6767- KernelServer
6868-#endif /* KERNEL_SERVER */
6969- processor 3000;
7070-7171-#include <mach/std_types.defs>
7272-#include <mach/mach_types.defs>
7373-7474-/*
7575- * References to processor objects are returned by:
7676- * host_processors(host_priv_t,...);
7777- */
7878-/*
7979- * Start processor.
8080- */
8181-routine processor_start(
8282- processor : processor_t);
8383-8484-/*
8585- * Exit processor -- may not be restartable.
8686- */
8787-8888-routine processor_exit(
8989- processor : processor_t);
9090-9191-/*
9292- * Return information about this processor.
9393- */
9494-routine processor_info(
9595- processor : processor_t;
9696- flavor : processor_flavor_t;
9797- out host : host_t;
9898- out processor_info_out: processor_info_t, CountInOut);
9999-100100-101101-/*
102102- * Do something machine-dependent to processor.
103103- */
104104-routine processor_control(
105105- processor : processor_t;
106106- processor_cmd : processor_info_t);
107107-108108-/*
109109- * JMM - Keep processor_set related stuff at the end because
110110- * they likely will be removed.
111111- */
112112-113113-/*
114114- * Assign processor to processor set.
115115- */
116116-routine processor_assign(
117117- processor : processor_t;
118118- new_set : processor_set_t;
119119- wait : boolean_t);
120120-121121-/*
122122- * Get current assignment for processor.
123123- */
124124-routine processor_get_assignment(
125125- processor : processor_t;
126126- out assigned_set : processor_set_name_t);
127127-128128-/* vim: set ft=c : */
-161
src/kernel/mach/processor_set.defs
···11-/*
22- * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_FREE_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/mach_port.defs
6060- * Author: Rich Draves
6161- *
6262- * Exported kernel calls.
6363- */
6464-6565-subsystem
6666-#if KERNEL_SERVER
6767- KernelServer
6868-#endif /* KERNEL_SERVER */
6969- processor_set 4000;
7070-7171-#include <mach/std_types.defs>
7272-#include <mach/mach_types.defs>
7373-7474-/*
7575- * Return scheduling statistics for a processor set.
7676- */
7777-routine processor_set_statistics(
7878- pset : processor_set_name_t;
7979- flavor : processor_set_flavor_t;
8080- out info_out : processor_set_info_t, CountInOut);
8181-8282-8383-/*
8484- * Destroy processor set.
8585- */
8686-routine processor_set_destroy(
8787- set : processor_set_t);
8888-8989-9090-/*
9191- * Set max priority for processor_set.
9292- */
9393-routine processor_set_max_priority(
9494- processor_set : processor_set_t;
9595- max_priority : int;
9696- change_threads : boolean_t);
9797-9898-/*
9999- * Enable policy for processor set
100100- */
101101-routine processor_set_policy_enable(
102102- processor_set : processor_set_t;
103103- policy : int);
104104-105105-/*
106106- * Disable policy for processor set
107107- */
108108-routine processor_set_policy_disable(
109109- processor_set : processor_set_t;
110110- policy : int;
111111- change_threads : boolean_t);
112112-113113-/*
114114- * List all tasks in processor set.
115115- */
116116-routine processor_set_tasks(
117117- processor_set : processor_set_t;
118118- out task_list : task_array_t);
119119-120120-/*
121121- * List all threads in processor set.
122122- */
123123-routine processor_set_threads(
124124- processor_set : processor_set_t;
125125- out thread_list : thread_act_array_t);
126126-127127-/*
128128- * Controls the scheduling attributes governing the processor set.
129129- * Allows control of enabled policies, and per-policy base and limit
130130- * priorities.
131131- */
132132-routine processor_set_policy_control(
133133- pset : processor_set_t;
134134- flavor : processor_set_flavor_t;
135135- policy_info : processor_set_info_t;
136136- change : boolean_t);
137137-138138-139139-/*
140140- * Debug Info
141141- * This call is only valid on MACH_DEBUG kernels.
142142- * Otherwise, KERN_FAILURE is returned.
143143- */
144144-routine processor_set_stack_usage(
145145- pset : processor_set_t;
146146- out ltotal : unsigned;
147147- out space : vm_size_t;
148148- out resident : vm_size_t;
149149- out maxusage : vm_size_t;
150150- out maxstack : vm_offset_t);
151151-152152-/*
153153- * Get information about processor set.
154154- */
155155-routine processor_set_info(
156156- set_name : processor_set_name_t;
157157- flavor : int;
158158- out host : host_t;
159159- out info_out : processor_set_info_t, CountInOut);
160160-161161-/* vim: set ft=c : */
-135
src/kernel/mach/prof.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * HISTORY
3333- *
3434- * Revision 1.1.1.1 1998/09/22 21:05:30 wsanchez
3535- * Import of Mac OS X kernel (~semeria)
3636- *
3737- * Revision 1.1.1.1 1998/03/07 02:25:46 wsanchez
3838- * Import of OSF Mach kernel (~mburg)
3939- *
4040- * Revision 1.2.12.3 1996/01/09 19:22:20 devrcs
4141- * Change notices: msgoption options from int to mach_msg_options_t.
4242- * [1995/12/01 19:49:49 jfraser]
4343- *
4444- * Merged '64-bit safe' changes from DEC alpha port.
4545- * [1995/11/21 18:09:30 jfraser]
4646- *
4747- * Revision 1.2.12.2 1995/01/06 19:51:41 devrcs
4848- * mk6 CR668 - 1.3b26 merge
4949- * * Revision 1.2.2.4 1994/03/24 21:23:54 hidden
5050- * added send_notices to support DCI profile/event tracing
5151- * * End1.3merge
5252- * [1994/11/02 18:32:19 dwm]
5353- *
5454- * Revision 1.2.12.1 1994/09/23 02:41:58 ezf
5555- * change marker to not FREE
5656- * [1994/09/22 21:42:31 ezf]
5757- *
5858- * Revision 1.2.2.2 1993/06/09 02:43:11 gm
5959- * Added to OSF/1 R1.3 from NMK15.0.
6060- * [1993/06/02 21:18:01 jeffc]
6161- *
6262- * Revision 1.2 1993/04/19 16:38:55 devrcs
6363- * [0014] Change subsystem number as current shared with exc.defs reply messages.
6464- * [1992/12/23 13:11:20 david]
6565- *
6666- * Revision 1.1 1992/09/30 02:23:01 robert
6767- * Initial revision
6868- *
6969- * $EndLog$
7070- */
7171-/* CMU_HIST */
7272-/*
7373- * Revision 2.1.2.1 92/09/15 17:25:42 jeffreyh
7474- * Created
7575- * [92/07/17 bernadat]
7676- *
7777- */
7878-/* CMU_ENDHIST */
7979-/*
8080- * Mach Operating System
8181- * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
8282- * All Rights Reserved.
8383- *
8484- * Permission to use, copy, modify and distribute this software and its
8585- * documentation is hereby granted, provided that both the copyright
8686- * notice and this permission notice appear in all copies of the
8787- * software, derivative works or modified versions, and any portions
8888- * thereof, and that both notices appear in supporting documentation.
8989- *
9090- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
9191- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
9292- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
9393- *
9494- * Carnegie Mellon requests users of this software to return to
9595- *
9696- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
9797- * School of Computer Science
9898- * Carnegie Mellon University
9999- * Pittsburgh PA 15213-3890
100100- *
101101- * any improvements or extensions that they make and grant Carnegie Mellon
102102- * the rights to redistribute these changes.
103103- */
104104-/*
105105- */
106106-/*
107107- * Abstract:
108108- * MiG definitions file for Mach Profiling interface.
109109- * receive_samples();
110110- */
111111-112112-subsystem
113113-#if KERNEL_USER
114114- KernelUser
115115-#endif KERNEL_USER
116116- prof 2450; /* exc.defs from 2400 - 2449 */
117117-118118-#include <mach/std_types.defs>
119119-#include <mach/mach_types.defs>
120120-121121-ServerPrefix receive_;
122122-UserPrefix send_;
123123-124124-type sample_array_t = array[*:1024] of unsigned;
125125-126126-simpleroutine samples(
127127- reply_port : mach_port_t;
128128- samples : sample_array_t);
129129-130130-simpleroutine notices(
131131- reply_port : mach_port_t;
132132- samples : sample_array_t;
133133- msgoption options : mach_msg_options_t);
134134-135135-/* vim: set ft=c : */
-83
src/kernel/mach/semaphore.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- *
3131- */
3232-/*
3333- * File: mach/semaphore.defs
3434- * Author: Joseph CaraDonna
3535- *
3636- * Exported kernel calls
3737- *
3838- */
3939-4040-subsystem
4141-#if KERNEL_SERVER
4242- KernelServer
4343-#endif /* KERNEL_SERVER */
4444- semaphore 617200;
4545-4646-#include <mach/std_types.defs>
4747-#include <mach/mach_types.defs>
4848-#include <mach/clock_types.defs>
4949-5050-/*
5151- * a semaphore_t is created and destroyed through the task object.
5252- * semaphore_create(task_t,&semaphore_t,...);
5353- * semaphore_destroy(task_t,semaphore_t);
5454- */
5555-5656-routine semaphore_signal(
5757- semaphore : semaphore_t);
5858-5959-routine semaphore_signal_all(
6060- semaphore : semaphore_t);
6161-6262-routine semaphore_wait(
6363- semaphore : semaphore_t);
6464-6565-6666-routine semaphore_signal_thread(
6767- semaphore : semaphore_t;
6868- thread : thread_act_t);
6969-7070-routine semaphore_timedwait(
7171- semaphore : semaphore_t;
7272- wait_time : mach_timespec_t);
7373-7474-routine semaphore_wait_signal(
7575- wait_semaphore : semaphore_t;
7676- signal_semaphore: semaphore_t);
7777-7878-routine semaphore_timedwait_signal(
7979- wait_semaphore : semaphore_t;
8080- signal_semaphore: semaphore_t;
8181- wait_time : mach_timespec_t);
8282-8383-/* vim: set ft=c : */
-150
src/kernel/mach/std_types.defs
···11-/*
22- * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * Mach kernel standard interface type declarations
6060- */
6161-6262-#ifndef _MACH_STD_TYPES_DEFS_
6363-#define _MACH_STD_TYPES_DEFS_
6464-6565-/* from ISO/IEC 988:1999 spec */
6666-/* 7.18.1.1 Exact-width integer types */
6767-6868-type int8_t = MACH_MSG_TYPE_INTEGER_8;
6969-type uint8_t = MACH_MSG_TYPE_INTEGER_8;
7070-type int16_t = MACH_MSG_TYPE_INTEGER_16;
7171-type uint16_t = MACH_MSG_TYPE_INTEGER_16;
7272-type int32_t = MACH_MSG_TYPE_INTEGER_32;
7373-type uint32_t = MACH_MSG_TYPE_INTEGER_32;
7474-type int64_t = MACH_MSG_TYPE_INTEGER_64;
7575-type uint64_t = MACH_MSG_TYPE_INTEGER_64;
7676-7777-/*
7878- * Legacy fixed-length Mach types which should
7979- * be replaced with the Standard types from above.
8080- */
8181-type int32 = int32_t;
8282-type unsigned32 = uint32_t;
8383-type int64 = int64_t;
8484-type unsigned64 = uint64_t;
8585-8686-/*
8787- * Other fixed length Mach types.
8888- */
8989-type char = MACH_MSG_TYPE_CHAR;
9090-type boolean_t = MACH_MSG_TYPE_BOOLEAN;
9191-9292-#include <mach/machine/machine_types.defs>
9393-9494-type kern_return_t = int;
9595-9696-type pointer_t = ^array[] of MACH_MSG_TYPE_BYTE
9797- ctype: vm_offset_t;
9898-9999-100100-type mach_port_t = MACH_MSG_TYPE_COPY_SEND;
101101-type mach_port_array_t = array[] of mach_port_t;
102102-103103-type mach_port_name_t = MACH_MSG_TYPE_PORT_NAME;
104104-type mach_port_name_array_t = array[] of mach_port_name_t;
105105-106106-type mach_port_right_t = natural_t;
107107-108108-type mach_port_type_t = natural_t;
109109-type mach_port_type_array_t = array[] of mach_port_type_t;
110110-111111-type mach_port_urefs_t = natural_t;
112112-type mach_port_delta_t = integer_t;
113113-type mach_port_seqno_t = natural_t;
114114-type mach_port_mscount_t = unsigned;
115115-type mach_port_msgcount_t = unsigned;
116116-type mach_port_rights_t = unsigned;
117117-type mach_msg_id_t = integer_t;
118118-type mach_msg_size_t = natural_t;
119119-type mach_msg_type_name_t = unsigned;
120120-type mach_msg_options_t = integer_t;
121121-122122-type mach_port_move_receive_t = MACH_MSG_TYPE_MOVE_RECEIVE
123123- ctype: mach_port_t;
124124-type mach_port_copy_send_t = MACH_MSG_TYPE_COPY_SEND
125125- ctype: mach_port_t;
126126-type mach_port_make_send_t = MACH_MSG_TYPE_MAKE_SEND
127127- ctype: mach_port_t;
128128-type mach_port_move_send_t = MACH_MSG_TYPE_MOVE_SEND
129129- ctype: mach_port_t;
130130-type mach_port_make_send_once_t = MACH_MSG_TYPE_MAKE_SEND_ONCE
131131- ctype: mach_port_t;
132132-type mach_port_move_send_once_t = MACH_MSG_TYPE_MOVE_SEND_ONCE
133133- ctype: mach_port_t;
134134-135135-type mach_port_receive_t = MACH_MSG_TYPE_PORT_RECEIVE
136136- ctype: mach_port_t;
137137-type mach_port_send_t = MACH_MSG_TYPE_PORT_SEND
138138- ctype: mach_port_t;
139139-type mach_port_send_once_t = MACH_MSG_TYPE_PORT_SEND_ONCE
140140- ctype: mach_port_t;
141141-142142-type mach_port_poly_t = polymorphic
143143- ctype: mach_port_t;
144144-145145-import <mach/std_types.h>;
146146-import <mach/mig.h>;
147147-148148-#endif /* _MACH_STD_TYPES_DEFS_ */
149149-150150-/* vim: set ft=c : */
-145
src/kernel/mach/sync.defs
···11-/*
22- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- *
3131- */
3232-/*
3333- * File: mach/sync.defs
3434- * Author: Joseph CaraDonna
3535- *
3636- * Exported kernel calls
3737- *
3838- */
3939-4040-subsystem
4141-#if KERNEL_SERVER
4242- KernelServer
4343-#endif /* KERNEL_SERVER */
4444- sync 617000;
4545-4646-#include <mach/std_types.defs>
4747-#include <mach/mach_types.defs>
4848-#include <mach/clock_types.defs>
4949-5050-#if KERNEL_SERVER
5151-import <kern/sync_lock.h>;
5252-import <kern/sync_sema.h>;
5353-import <kern/ipc_sync.h>;
5454-#endif /* KERNEL_SERVER */
5555-5656-5757-type semaphore_t = mach_port_t
5858- ctype: mach_port_t
5959-#if KERNEL_SERVER
6060- intran: semaphore_t convert_port_to_semaphore(mach_port_t)
6161- outtran: mach_port_t convert_semaphore_to_port(semaphore_t)
6262- destructor: semaphore_dereference(semaphore_t)
6363-#endif /* KERNEL_SERVER */
6464- ;
6565-6666-type semaphore_consume_ref_t = mach_port_move_send_t
6767- ctype: mach_port_t
6868-#if KERNEL_SERVER
6969- intran: semaphore_t convert_port_to_semaphore(mach_port_t)
7070- destructor: semaphore_dereference(semaphore_t)
7171-#endif /* KERNEL_SERVER */
7272- ;
7373-7474-type lock_set_t = mach_port_t
7575- ctype: mach_port_t
7676-#if KERNEL_SERVER
7777- intran: lock_set_t convert_port_to_lock_set(mach_port_t)
7878- outtran: mach_port_t convert_lock_set_to_port(lock_set_t)
7979- destructor: lock_set_dereference(lock_set_t)
8080-#endif /* KERNEL_SERVER */
8181- ;
8282-8383-8484-routine semaphore_create(
8585- task : task_t;
8686- out semaphore : semaphore_t;
8787- policy : int;
8888- value : int);
8989-9090-routine semaphore_destroy(
9191- task : task_t;
9292- semaphore : semaphore_consume_ref_t);
9393-9494-routine semaphore_signal(
9595- semaphore : semaphore_t);
9696-9797-routine semaphore_signal_all(
9898- semaphore : semaphore_t);
9999-100100-routine semaphore_wait(
101101- semaphore : semaphore_t);
102102-103103-routine lock_set_create(
104104- task : task_t;
105105- out new_lock_set : lock_set_t;
106106- n_ulocks : int;
107107- policy : int);
108108-109109-routine lock_set_destroy(
110110- task : task_t;
111111- lock_set : lock_set_t);
112112-113113-routine lock_acquire(
114114- lock_set : lock_set_t;
115115- lock_id : int);
116116-117117-routine lock_release(
118118- lock_set : lock_set_t;
119119- lock_id : int);
120120-121121-routine lock_try(
122122- lock_set : lock_set_t;
123123- lock_id : int);
124124-125125-routine lock_make_stable(
126126- lock_set : lock_set_t;
127127- lock_id : int);
128128-129129-routine lock_handoff(
130130- lock_set : lock_set_t;
131131- lock_id : int);
132132-133133-routine lock_handoff_accept(
134134- lock_set : lock_set_t;
135135- lock_id : int);
136136-137137-routine semaphore_signal_thread(
138138- semaphore : semaphore_t;
139139- thread : thread_act_t);
140140-141141-routine semaphore_timedwait(
142142- semaphore : semaphore_t;
143143- wait_time : mach_timespec_t);
144144-145145-/* vim: set ft=c : */
-454
src/kernel/mach/task.defs
···11-/*
22- * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_FREE_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/mach_port.defs
6060- * Author: Rich Draves
6161- *
6262- * Exported kernel calls.
6363- */
6464-6565-subsystem
6666-#if KERNEL_SERVER
6767- KernelServer
6868-#endif /* KERNEL_SERVER */
6969- task 3400;
7070-7171-#include <mach/std_types.defs>
7272-#include <mach/mach_types.defs>
7373-#include <mach_debug/mach_debug_types.defs>
7474-7575-/*
7676- * Create a new task with an empty set of IPC rights,
7777- * and having an address space constructed from the
7878- * target task (or empty, if inherit_memory is FALSE).
7979- */
8080-routine task_create(
8181- target_task : task_t;
8282- ledgers : ledger_array_t;
8383- inherit_memory : boolean_t;
8484- out child_task : task_t);
8585-8686-/*
8787- * Destroy the target task, causing all of its threads
8888- * to be destroyed, all of its IPC rights to be deallocated,
8989- * and all of its address space to be deallocated.
9090- */
9191-routine task_terminate(
9292- target_task : task_t);
9393-9494-/*
9595- * Returns the set of threads belonging to the target task.
9696- */
9797-routine task_threads(
9898- target_task : task_t;
9999- out act_list : thread_act_array_t);
100100-101101-/*
102102- * Stash a handful of ports for the target task; child
103103- * tasks inherit this stash at task_create time.
104104- */
105105-routine mach_ports_register(
106106- target_task : task_t;
107107- init_port_set : mach_port_array_t =
108108- ^array[] of mach_port_t);
109109-110110-/*
111111- * Retrieve the stashed ports for the target task.
112112- */
113113-routine mach_ports_lookup(
114114- target_task : task_t;
115115- out init_port_set : mach_port_array_t =
116116- ^array[] of mach_port_t);
117117-118118-/*
119119- * Returns information about the target task.
120120- */
121121-routine task_info(
122122- target_task : task_name_t;
123123- flavor : task_flavor_t;
124124- out task_info_out : task_info_t, CountInOut);
125125-126126-/*
127127- * Set task information.
128128- */
129129-routine task_set_info(
130130- target_task : task_t;
131131- flavor : task_flavor_t;
132132- task_info_in : task_info_t);
133133-134134-/*
135135- * Increment the suspend count for the target task.
136136- * No threads within a task may run when the suspend
137137- * count for that task is non-zero.
138138- */
139139-routine task_suspend(
140140- target_task : task_t);
141141-142142-143143-/*
144144- * Decrement the suspend count for the target task,
145145- * if the count is currently non-zero. If the resulting
146146- * suspend count is zero, then threads within the task
147147- * that also have non-zero suspend counts may execute.
148148- */
149149-routine task_resume(
150150- target_task : task_t);
151151-152152-/*
153153- * Returns the current value of the selected special port
154154- * associated with the target task.
155155- */
156156-routine task_get_special_port(
157157- task : task_t;
158158- which_port : int;
159159- out special_port : mach_port_t);
160160-161161-/*
162162- * Set one of the special ports associated with the
163163- * target task.
164164- */
165165-routine task_set_special_port(
166166- task : task_t;
167167- which_port : int;
168168- special_port : mach_port_t);
169169-170170-/*
171171- * Create a new thread within the target task, returning
172172- * the port representing the first thr_act in that new thread. The
173173- * initial execution state of the thread is undefined.
174174- */
175175-routine
176176-#ifdef KERNEL_SERVER
177177-thread_create_from_user(
178178-#else
179179-thread_create(
180180-#endif
181181- parent_task : task_t;
182182- out child_act : thread_act_t);
183183-184184-/*
185185- * Create a new thread within the target task, returning
186186- * the port representing that new thread. The new thread
187187- * is not suspended; its initial execution state is given
188188- * by flavor and new_state. Returns the port representing
189189- * the new thread.
190190- */
191191-routine
192192-#ifdef KERNEL_SERVER
193193-thread_create_running_from_user(
194194-#else
195195-thread_create_running(
196196-#endif
197197- parent_task : task_t;
198198- flavor : thread_state_flavor_t;
199199- new_state : thread_state_t;
200200- out child_act : thread_act_t);
201201-202202-/*
203203- * Set an exception handler for a task on one or more exception types.
204204- * These handlers are invoked for all threads in the task if there are
205205- * no thread-specific exception handlers or those handlers returned an
206206- * error.
207207- */
208208-routine task_set_exception_ports(
209209- task : task_t;
210210- exception_mask : exception_mask_t;
211211- new_port : mach_port_t;
212212- behavior : exception_behavior_t;
213213- new_flavor : thread_state_flavor_t);
214214-215215-216216-/*
217217- * Lookup some of the old exception handlers for a task
218218- */
219219-routine task_get_exception_ports(
220220- task : task_t;
221221- exception_mask : exception_mask_t;
222222- out masks : exception_mask_array_t;
223223- out old_handlers : exception_handler_array_t, SameCount;
224224- out old_behaviors : exception_behavior_array_t, SameCount;
225225- out old_flavors : exception_flavor_array_t, SameCount);
226226-227227-228228-/*
229229- * Set an exception handler for a thread on one or more exception types.
230230- * At the same time, return the previously defined exception handlers for
231231- * those types.
232232- */
233233-routine task_swap_exception_ports(
234234- task : task_t;
235235- exception_mask : exception_mask_t;
236236- new_port : mach_port_t;
237237- behavior : exception_behavior_t;
238238- new_flavor : thread_state_flavor_t;
239239- out masks : exception_mask_array_t;
240240- out old_handlerss : exception_handler_array_t, SameCount;
241241- out old_behaviors : exception_behavior_array_t, SameCount;
242242- out old_flavors : exception_flavor_array_t, SameCount);
243243-244244-/*
245245- * OBSOLETE interface.
246246- */
247247-routine lock_set_create(
248248- task : task_t;
249249- out new_lock_set : lock_set_t;
250250- n_ulocks : int;
251251- policy : int);
252252-253253-/*
254254- * OBSOLETE interface.
255255- */
256256-routine lock_set_destroy(
257257- task : task_t;
258258- lock_set : lock_set_t);
259259-260260-/*
261261- * Create and destroy semaphore synchronizers on a
262262- * per-task basis (i.e. the task owns them).
263263- */
264264-265265-routine semaphore_create(
266266- task : task_t;
267267- out semaphore : semaphore_t;
268268- policy : int;
269269- value : int);
270270-271271-routine semaphore_destroy(
272272- task : task_t;
273273- semaphore : semaphore_consume_ref_t);
274274-275275-/*
276276- * Set/get policy information for a task.
277277- * (Approved Mac OS X microkernel interface)
278278- */
279279-280280-routine task_policy_set(
281281- task : task_t;
282282- flavor : task_policy_flavor_t;
283283- policy_info : task_policy_t);
284284-285285-routine task_policy_get(
286286- task : task_t;
287287- flavor : task_policy_flavor_t;
288288-out policy_info : task_policy_t, CountInOut;
289289-inout get_default : boolean_t);
290290-291291-/*
292292- * Removed from the kernel.
293293- */
294294-#if KERNEL_SERVER
295295-skip;
296296-#else
297297-routine task_sample(
298298- task : task_t;
299299- reply : mach_port_make_send_t);
300300-#endif
301301-302302-/*
303303- * JMM - Everything from here down is likely to go away soon
304304- */
305305-/*
306306- * OBSOLETE interface.
307307- */
308308-routine task_policy(
309309- task : task_t;
310310- policy : policy_t;
311311- base : policy_base_t;
312312- set_limit : boolean_t;
313313- change : boolean_t);
314314-315315-316316-/*
317317- * Establish a user-level handler for the specified
318318- * system call.
319319- */
320320-routine task_set_emulation(
321321- target_port : task_t;
322322- routine_entry_pt: vm_address_t;
323323- routine_number : int);
324324-325325-/*
326326- * Get user-level handler entry points for all
327327- * emulated system calls.
328328- */
329329-routine task_get_emulation_vector(
330330- task : task_t;
331331- out vector_start : int;
332332- out emulation_vector: emulation_vector_t);
333333-334334-/*
335335- * Establish user-level handlers for the specified
336336- * system calls. Non-emulated system calls are specified
337337- * with emulation_vector[i] == EML_ROUTINE_NULL.
338338- */
339339-routine task_set_emulation_vector(
340340- task : task_t;
341341- vector_start : int;
342342- emulation_vector: emulation_vector_t);
343343-344344-345345-/*
346346- * Establish restart pc for interrupted atomic sequences.
347347- */
348348-routine task_set_ras_pc(
349349- target_task : task_t;
350350- basepc : vm_address_t;
351351- boundspc : vm_address_t);
352352-353353-354354-/*
355355- * Return zone info as seen/used by this task.
356356- */
357357-routine task_zone_info(
358358- target_task : task_t;
359359- out names : mach_zone_name_array_t,
360360- Dealloc;
361361- out info : task_zone_info_array_t,
362362- Dealloc);
363363-364364-365365-/*
366366- * JMM - Want to eliminate processor_set so keep them at the end.
367367- */
368368-369369-/*
370370- * Assign task to processor set.
371371- */
372372-routine task_assign(
373373- task : task_t;
374374- new_set : processor_set_t;
375375- assign_threads : boolean_t);
376376-377377-/*
378378- * Assign task to default set.
379379- */
380380-routine task_assign_default(
381381- task : task_t;
382382- assign_threads : boolean_t);
383383-384384-/*
385385- * Get current assignment for task.
386386- */
387387-routine task_get_assignment(
388388- task : task_t;
389389- out assigned_set : processor_set_name_t);
390390-391391-/*
392392- * OBSOLETE interface.
393393- */
394394-routine task_set_policy(
395395- task : task_t;
396396- pset : processor_set_t;
397397- policy : policy_t;
398398- base : policy_base_t;
399399- limit : policy_limit_t;
400400- change : boolean_t);
401401-402402-/*
403403- * Read the selected state which is to be installed on new
404404- * threads in the task as they are created.
405405- */
406406-routine task_get_state(
407407- task : task_t;
408408- flavor : thread_state_flavor_t;
409409- out old_state : thread_state_t, CountInOut);
410410-411411-/*
412412- * Set the selected state information to be installed on
413413- * all subsequently created threads in the task.
414414- */
415415-routine task_set_state(
416416- task : task_t;
417417- flavor : thread_state_flavor_t;
418418- new_state : thread_state_t);
419419-420420-/*
421421- * Change the task's physical footprint limit (in MB).
422422- */
423423-routine task_set_phys_footprint_limit(
424424- task : task_t;
425425- new_limit : int;
426426- out old_limit : int);
427427-428428-routine task_suspend2(
429429- target_task : task_t;
430430- out suspend_token : task_suspension_token_t);
431431-432432-routine task_resume2(
433433- suspend_token : task_suspension_token_t);
434434-435435-routine task_purgable_info(
436436- task : task_t;
437437- out stats : task_purgable_info_t);
438438-439439-routine task_get_mach_voucher(
440440- task : task_t;
441441- which : mach_voucher_selector_t;
442442- out voucher : ipc_voucher_t);
443443-444444-routine task_set_mach_voucher(
445445- task : task_t;
446446- voucher : ipc_voucher_t);
447447-448448-routine task_swap_mach_voucher(
449449- task : task_t;
450450- new_voucher : ipc_voucher_t;
451451- inout old_voucher : ipc_voucher_t);
452452-453453-/* vim: set ft=c : */
454454-
-59
src/kernel/mach/task_access.defs
···11-/*
22- * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-3232-subsystem
3333-#if KERNEL_USER
3434- KernelUser
3535-#endif /* KERN_USER */
3636- task_access 27000;
3737-3838-#include <mach/std_types.defs>
3939-#include <mach/mach_types.defs>
4040-4141-/*
4242- * Verify task_for_pid access for the given pid
4343- * Access granted by return value (success/failure)
4444- */
4545-routine check_task_access(
4646- task_access_port : mach_port_t;
4747- calling_pid : int32_t;
4848- calling_gid : uint32_t;
4949- target_pid : int32_t;
5050- ServerAuditToken caller_cred : audit_token_t);
5151-5252-/*
5353- * Search for a code signature for unsigned executables
5454- */
5555-routine find_code_signature(
5656- task_access_port : mach_port_t;
5757- new_pid : int32_t);
5858-5959-/* vim: set ft=c : */
-20
src/kernel/mach/telemetry_notification.defs
···11-/*
22- * Copyright (c) 2012, Apple Inc. All rights reserved.
33- */
44-55- /*
66- * Interface definition for the telemetry facility.
77- */
88-99-subsystem
1010-#if KERNEL_USER
1111- KernelUser
1212-#endif /* KERNEL_USER */
1313- telemetry_notification 5100;
1414-1515-#include <mach/std_types.defs>
1616-#include <mach/mach_types.defs>
1717-1818-simpleroutine telemetry_notification(
1919- RequestPort telemetry_port : mach_port_t;
2020- in flags : uint32_t);
-353
src/kernel/mach/thread_act.defs
···11-/*
22- * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_FREE_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/mach_port.defs
6060- * Author: Rich Draves
6161- *
6262- * Exported kernel calls.
6363- */
6464-6565-subsystem
6666-#if KERNEL_SERVER
6767- KernelServer
6868-#endif /* KERNEL_SERVER */
6969- thread_act 3600;
7070-7171-#include <mach/std_types.defs>
7272-#include <mach/mach_types.defs>
7373-7474-#if !KERNEL && !LIBSYSCALL_INTERFACE
7575-#define PREFIX(NAME) _kernelrpc_ ## NAME
7676-#else
7777-#define PREFIX(NAME) NAME
7878-#endif
7979-8080-/*
8181- * Destroy the target thread.
8282- *
8383- * JMM - For legacy reasons this consumes a reference to the
8484- * target thread. This will have to change in the future because
8585- * we want the interfaces to be able to be defined in more standard
8686- * IDLs and transports, and most of them do not support the notion
8787- * of reference ownership transfers (just sharing).
8888- */
8989-routine thread_terminate(
9090- target_act : thread_act_consume_ref_t);
9191-9292-9393-/*
9494- * Return the selected state information for the target
9595- * thr_act. If the thr_act is currently executing, the results
9696- * may be stale. [Flavor THREAD_STATE_FLAVOR_LIST provides a
9797- * list of valid flavors for the target thread.]
9898- */
9999-routine act_get_state(
100100- target_act : thread_act_t;
101101- flavor : int;
102102- out old_state : thread_state_t, CountInOut);
103103-104104-/*
105105- * Set the selected state information for the target thread.
106106- * If the thread is currently executing, the state change
107107- * may be ill-defined.
108108- */
109109-routine
110110-#ifdef KERNEL_SERVER
111111-act_set_state_from_user(
112112-#else
113113-act_set_state(
114114-#endif
115115- target_act : thread_act_t;
116116- flavor : int;
117117- new_state : thread_state_t);
118118-119119-/*
120120- * Backward compatible old-style thread routines.
121121- * These have different semantics than the new activation versions.
122122- *
123123- * Return the selected state information for the target
124124- * thread. If the thread is currently executing, the results
125125- * may be stale. [Flavor THREAD_STATE_FLAVOR_LIST provides a
126126- * list of valid flavors for the target thr_act.]
127127- */
128128-routine thread_get_state(
129129- target_act : thread_act_t;
130130- flavor : thread_state_flavor_t;
131131- out old_state : thread_state_t, CountInOut);
132132-133133-/*
134134- * Set the selected state information for the target thread.
135135- * If the thread is currently executing, the state change
136136- * may be ill-defined.
137137- */
138138-routine
139139-#ifdef KERNEL_SERVER
140140-thread_set_state_from_user(
141141-#else
142142-thread_set_state(
143143-#endif
144144- target_act : thread_act_t;
145145- flavor : thread_state_flavor_t;
146146- new_state : thread_state_t);
147147-148148-/*
149149- * Increment the suspend count for the target thread.
150150- * Once this call has completed, the thread will not
151151- * execute any further user or meta- instructions.
152152- * Once suspended, a thread may not execute again until
153153- * its suspend count is zero, and the suspend count
154154- * for its task is also zero.
155155- */
156156-routine thread_suspend(
157157- target_act : thread_act_t);
158158-159159-/*
160160- * Decrement the suspend count for the target thread,
161161- * if that count is not already zero.
162162- */
163163-routine thread_resume(
164164- target_act : thread_act_t);
165165-166166-/*
167167- * Cause any user or meta- instructions currently being
168168- * executed by the target thread to be aborted. [Meta-
169169- * instructions consist of the basic traps for IPC
170170- * (e.g., msg_send, msg_receive) and self-identification
171171- * (e.g., task_self, thread_self, thread_reply). Calls
172172- * described by MiG interfaces are not meta-instructions
173173- * themselves.]
174174- */
175175-routine thread_abort(
176176- target_act : thread_act_t);
177177-178178-/*
179179- * Cause any user or meta- instructions currently being
180180- * executed by the target thread to be aborted so that
181181- * they are transparently restartable. This call fails
182182- * if the abort would result in a non-restartable condition.
183183- * Retry is the caller's responsibility. [Meta-
184184- * instructions consist of the basic traps for IPC
185185- * (e.g., msg_send, msg_receive) and self-identification
186186- * (e.g., task_self, thread_self, thread_reply). Calls
187187- * described by MiG interfaces are not meta-instructions
188188- * themselves.]
189189- */
190190-routine thread_abort_safely(
191191- target_act : thread_act_t);
192192-193193-194194-routine thread_depress_abort(
195195- thread : thread_act_t);
196196-197197-198198-/*
199199- * Returns the current value of the selected special port
200200- * associated with the target thread.
201201- */
202202-routine thread_get_special_port(
203203- thr_act : thread_act_t;
204204- which_port : int;
205205- out special_port : mach_port_t);
206206-207207-/*
208208- * Set one of the special ports associated with the
209209- * target thread.
210210- */
211211-routine thread_set_special_port(
212212- thr_act : thread_act_t;
213213- which_port : int;
214214- special_port : mach_port_t);
215215-216216-/*
217217- * Returns information about the target thread.
218218- */
219219-routine thread_info(
220220- target_act : thread_act_t;
221221- flavor : thread_flavor_t;
222222- out thread_info_out : thread_info_t, CountInOut);
223223-224224-/*
225225- * Set an exception handler for a thread on one or more exception types
226226- */
227227-routine thread_set_exception_ports(
228228- thread : thread_act_t;
229229- exception_mask : exception_mask_t;
230230- new_port : mach_port_t;
231231- behavior : exception_behavior_t;
232232- new_flavor : thread_state_flavor_t);
233233-234234-/*
235235- * Lookup some of the old exception handlers for a thread
236236- */
237237-routine thread_get_exception_ports(
238238- thread : thread_act_t;
239239- exception_mask : exception_mask_t;
240240- out masks : exception_mask_array_t;
241241- out old_handlers : exception_handler_array_t, SameCount;
242242- out old_behaviors : exception_behavior_array_t, SameCount;
243243- out old_flavors : exception_flavor_array_t, SameCount);
244244-245245-/*
246246- * Set an exception handler for a thread on one or more exception types.
247247- * At the same time, return the previously defined exception handlers for
248248- * those types.
249249- */
250250-routine thread_swap_exception_ports(
251251- thread : thread_act_t;
252252- exception_mask : exception_mask_t;
253253- new_port : mach_port_t;
254254- behavior : exception_behavior_t;
255255- new_flavor : thread_state_flavor_t;
256256- out masks : exception_mask_array_t;
257257- out old_handlers : exception_handler_array_t, SameCount;
258258- out old_behaviors : exception_behavior_array_t, SameCount;
259259- out old_flavors : exception_flavor_array_t, SameCount);
260260-261261-/*
262262- * OBSOLETE interface.
263263- */
264264-routine PREFIX(thread_policy)(
265265- thr_act : thread_act_t;
266266- policy : policy_t;
267267- base : policy_base_t;
268268- set_limit : boolean_t);
269269-270270-/*
271271- * Set/get policy information for a thread.
272272- * (Approved Mac OS X microkernel interface)
273273- */
274274-275275-routine PREFIX(thread_policy_set)(
276276- thread : thread_act_t;
277277- flavor : thread_policy_flavor_t;
278278- policy_info : thread_policy_t);
279279-280280-routine thread_policy_get(
281281- thread : thread_act_t;
282282- flavor : thread_policy_flavor_t;
283283-out policy_info : thread_policy_t, CountInOut;
284284-inout get_default : boolean_t);
285285-286286-/*
287287- * Removed from the kernel.
288288- */
289289-#if KERNEL_SERVER
290290-skip;
291291-#else
292292-routine thread_sample(
293293- thread : thread_act_t;
294294- reply : mach_port_make_send_t);
295295-#endif
296296-297297-/*
298298- * ETAP has been removed from the kernel.
299299- */
300300-#if KERNEL_SERVER
301301-skip;
302302-#else
303303-routine etap_trace_thread(
304304- target_act : thread_act_t;
305305- trace_status : boolean_t);
306306-#endif
307307-308308-/*
309309- * Assign thread to processor set.
310310- */
311311-routine thread_assign(
312312- thread : thread_act_t;
313313- new_set : processor_set_t);
314314-315315-/*
316316- * Assign thread to default set.
317317- */
318318-routine thread_assign_default(
319319- thread : thread_act_t);
320320-321321-/*
322322- * Get current assignment for thread.
323323- */
324324-routine thread_get_assignment(
325325- thread : thread_act_t;
326326- out assigned_set : processor_set_name_t);
327327-328328-329329-/*
330330- * OBSOLETE interface.
331331- */
332332-routine PREFIX(thread_set_policy)(
333333- thr_act : thread_act_t;
334334- pset : processor_set_t;
335335- policy : policy_t;
336336- base : policy_base_t;
337337- limit : policy_limit_t);
338338-339339-routine thread_get_mach_voucher(
340340- thr_act : thread_act_t;
341341- which : mach_voucher_selector_t;
342342- out voucher : ipc_voucher_t);
343343-344344-routine thread_set_mach_voucher(
345345- thr_act : thread_act_t;
346346- voucher : ipc_voucher_t);
347347-348348-routine thread_swap_mach_voucher(
349349- thr_act : thread_act_t;
350350- new_voucher : ipc_voucher_t;
351351- inout old_voucher : ipc_voucher_t);
352352-353353-/* vim: set ft=c : */
-100
src/kernel/mach/upl.defs
···11-/*
22- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/upl.defs
6060- *
6161- * Abstract:
6262- * Basic Mach external memory management interface declaration.
6363- */
6464-6565-subsystem
6666-#if KERNEL_USER
6767- KernelUser
6868-#endif /* KERNEL_USER */
6969-#if KERNEL_SERVER
7070- KernelServer
7171-#endif /* KERNEL_SERVER */
7272- upl 2050;
7373-7474-#include <mach/std_types.defs>
7575-#include <mach/mach_types.defs>
7676-7777-routine upl_abort(
7878- upl_object : upl_t;
7979- in abort_cond : integer_t);
8080-8181-routine upl_abort_range(
8282- upl_object : upl_t;
8383- offset : upl_offset_t;
8484- size : upl_size_t;
8585- in abort_cond : integer_t;
8686- out empty : boolean_t);
8787-8888-routine upl_commit(
8989- upl_object : upl_t;
9090- in page_list : upl_page_info_array_t);
9191-9292-routine upl_commit_range(
9393- upl_object : upl_t;
9494- offset : upl_offset_t;
9595- size : upl_size_t;
9696- in cntrl_flags : integer_t;
9797- in page_list : upl_page_info_array_t;
9898- out empty : boolean_t);
9999-100100-/* vim: set ft=c : */
-284
src/kernel/mach/vm32_map.defs
···11-/*
22- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_FREE_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/vm_map.defs
6060- *
6161- * Exported kernel VM calls for 32-bit client tasks.
6262- */
6363-6464-subsystem
6565-#if KERNEL_SERVER
6666- KernelServer
6767-#endif /* KERNEL_SERVER */
6868- map 3800;
6969-7070-serverprefix vm32_;
7171-7272-#include <mach/std_types.defs>
7373-#include <mach/mach_types.defs>
7474-#include <mach_debug/mach_debug_types.defs>
7575-7676-#if VM32_SUPPORT
7777-7878-/* See vm_map.defs for more information */
7979-8080-routine region(
8181- target_task : vm_map_t;
8282- inout address : vm32_address_t;
8383- out size : vm32_size_t;
8484- flavor : vm_region_flavor_t;
8585- out info : vm_region_info_t, CountInOut;
8686- out object_name : memory_object_name_t =
8787- MACH_MSG_TYPE_MOVE_SEND
8888- ctype: mach_port_t);
8989-9090-routine allocate(
9191- target_task : vm_task_entry_t;
9292- inout address : vm32_address_t;
9393- size : vm32_size_t;
9494- flags : int);
9595-9696-routine deallocate(
9797- target_task : vm_task_entry_t;
9898- address : vm32_address_t;
9999- size : vm32_size_t);
100100-101101-routine protect(
102102- target_task : vm_task_entry_t;
103103- address : vm32_address_t;
104104- size : vm32_size_t;
105105- set_maximum : boolean_t;
106106- new_protection : vm_prot_t);
107107-108108-routine inherit(
109109- target_task : vm_task_entry_t;
110110- address : vm32_address_t;
111111- size : vm32_size_t;
112112- new_inheritance : vm_inherit_t);
113113-114114-routine read(
115115- target_task : vm_map_t;
116116- address : vm32_address_t;
117117- size : vm32_size_t;
118118- out data : pointer_t);
119119-120120-routine read_list(
121121- target_task : vm_map_t;
122122- inout data_list : vm32_read_entry_t;
123123- count : natural_t);
124124-125125-routine write(
126126- target_task : vm_map_t;
127127- address : vm32_address_t;
128128- data : pointer_t);
129129-130130-routine copy(
131131- target_task : vm_map_t;
132132- source_address : vm32_address_t;
133133- size : vm32_size_t;
134134- dest_address : vm32_address_t);
135135-136136-routine read_overwrite(
137137- target_task : vm_map_t;
138138- address : vm32_address_t;
139139- size : vm32_size_t;
140140- data : vm32_address_t;
141141- out outsize : vm32_size_t);
142142-143143-144144-routine msync(
145145- target_task : vm_map_t;
146146- address : vm32_address_t;
147147- size : vm32_size_t;
148148- sync_flags : vm_sync_t );
149149-150150-routine behavior_set(
151151- target_task : vm_map_t;
152152- address : vm32_address_t;
153153- size : vm32_size_t;
154154- new_behavior : vm_behavior_t);
155155-156156-routine map(
157157- target_task : vm_task_entry_t;
158158- inout address : vm32_address_t;
159159- size : vm32_size_t;
160160- mask : vm32_address_t;
161161- flags : int;
162162- object : mem_entry_name_port_t;
163163- offset : vm32_offset_t;
164164- copy : boolean_t;
165165- cur_protection : vm_prot_t;
166166- max_protection : vm_prot_t;
167167- inheritance : vm_inherit_t);
168168-169169-routine machine_attribute(
170170- target_task : vm_map_t;
171171- address : vm32_address_t;
172172- size : vm32_size_t;
173173- attribute : vm_machine_attribute_t;
174174- inout value : vm_machine_attribute_val_t);
175175-176176-routine remap(
177177- target_task : vm_map_t;
178178- inout target_address : vm32_address_t;
179179- size : vm32_size_t;
180180- mask : vm32_address_t;
181181- anywhere : boolean_t;
182182- src_task : vm_map_t;
183183- src_address : vm32_address_t;
184184- copy : boolean_t;
185185- out cur_protection : vm_prot_t;
186186- out max_protection : vm_prot_t;
187187- inheritance : vm_inherit_t);
188188-189189-routine _task_wire(
190190- target_task : vm_map_t;
191191- must_wire : boolean_t);
192192-193193-routine make_memory_entry(
194194- target_task :vm_map_t;
195195- inout size :vm32_size_t;
196196- offset :vm32_offset_t;
197197- permission :vm_prot_t;
198198- out object_handle :mem_entry_name_port_move_send_t;
199199- parent_entry :mem_entry_name_port_t);
200200-201201-routine map_page_query(
202202- target_map :vm_map_t;
203203- offset :vm32_offset_t;
204204- out disposition :integer_t;
205205- out ref_count :integer_t);
206206-207207-routine region_info(
208208- task : vm_map_t;
209209- address : vm32_address_t;
210210- out region : vm_info_region_t;
211211- out objects : vm_info_object_array_t);
212212-213213-routine mapped_pages_info(
214214- task : vm_map_t;
215215- out pages : page_address_array_t);
216216-217217-skip; /* was vm_region_object_create */
218218-219219-routine region_recurse(
220220- target_task : vm_map_t;
221221- inout address : vm32_address_t;
222222- out size : vm32_size_t;
223223- inout nesting_depth : natural_t;
224224- out info : vm_region_recurse_info_t,CountInOut);
225225-226226-routine region_recurse_64(
227227- target_task : vm_map_t;
228228- inout address : vm32_address_t;
229229- out size : vm32_size_t;
230230- inout nesting_depth : natural_t;
231231- out info : vm_region_recurse_info_t,CountInOut);
232232-233233-routine region_info_64(
234234- task : vm_map_t;
235235- address : vm32_address_t;
236236- out region : vm_info_region_64_t;
237237- out objects : vm_info_object_array_t);
238238-239239-routine region_64(
240240- target_task : vm_map_t;
241241- inout address : vm32_address_t;
242242- out size : vm32_size_t;
243243- flavor : vm_region_flavor_t;
244244- out info : vm_region_info_t, CountInOut;
245245- out object_name : memory_object_name_t =
246246- MACH_MSG_TYPE_MOVE_SEND
247247- ctype: mach_port_t);
248248-249249-routine make_memory_entry_64(
250250- target_task :vm_map_t;
251251- inout size :memory_object_size_t;
252252- offset :memory_object_offset_t;
253253- permission :vm_prot_t;
254254- out object_handle :mach_port_move_send_t;
255255- parent_entry :mem_entry_name_port_t);
256256-257257-258258-259259-routine map_64(
260260- target_task : vm_task_entry_t;
261261- inout address : vm32_address_t;
262262- size : vm32_size_t;
263263- mask : vm32_address_t;
264264- flags : int;
265265- object : mem_entry_name_port_t;
266266- offset : memory_object_offset_t;
267267- copy : boolean_t;
268268- cur_protection : vm_prot_t;
269269- max_protection : vm_prot_t;
270270- inheritance : vm_inherit_t);
271271-272272-skip; /* was vm_map_get_upl */
273273-skip; /* was vm_upl_map */
274274-skip; /* was vm_upl_unmap */
275275-276276-routine purgable_control(
277277- target_task : vm_map_t;
278278- address : vm32_address_t;
279279- control : vm_purgable_t;
280280- inout state : int);
281281-282282-#endif /* VM32_SUPPORT */
283283-284284-/* vim: set ft=c : */
-498
src/kernel/mach/vm_map.defs
···11-/*
22- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
33- *
44- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
55- *
66- * This file contains Original Code and/or Modifications of Original Code
77- * as defined in and that are subject to the Apple Public Source License
88- * Version 2.0 (the 'License'). You may not use this file except in
99- * compliance with the License. The rights granted to you under the License
1010- * may not be used to create, or enable the creation or redistribution of,
1111- * unlawful or unlicensed copies of an Apple operating system, or to
1212- * circumvent, violate, or enable the circumvention or violation of, any
1313- * terms of an Apple operating system software license agreement.
1414- *
1515- * Please obtain a copy of the License at
1616- * http://www.opensource.apple.com/apsl/ and read it before using this file.
1717- *
1818- * The Original Code and all software distributed under the License are
1919- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
2020- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
2121- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2222- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
2323- * Please see the License for the specific language governing rights and
2424- * limitations under the License.
2525- *
2626- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
2727- */
2828-/*
2929- * @OSF_FREE_COPYRIGHT@
3030- */
3131-/*
3232- * Mach Operating System
3333- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
3434- * All Rights Reserved.
3535- *
3636- * Permission to use, copy, modify and distribute this software and its
3737- * documentation is hereby granted, provided that both the copyright
3838- * notice and this permission notice appear in all copies of the
3939- * software, derivative works or modified versions, and any portions
4040- * thereof, and that both notices appear in supporting documentation.
4141- *
4242- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
4343- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
4444- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
4545- *
4646- * Carnegie Mellon requests users of this software to return to
4747- *
4848- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
4949- * School of Computer Science
5050- * Carnegie Mellon University
5151- * Pittsburgh PA 15213-3890
5252- *
5353- * any improvements or extensions that they make and grant Carnegie Mellon
5454- * the rights to redistribute these changes.
5555- */
5656-/*
5757- */
5858-/*
5959- * File: mach/vm_map.defs
6060- *
6161- * Exported (native-sized) kernel VM calls.
6262- */
6363-6464-subsystem
6565-#if KERNEL_SERVER
6666- KernelServer
6767-#endif /* KERNEL_SERVER */
6868- vm_map 3800;
6969-7070-#include <mach/std_types.defs>
7171-#include <mach/mach_types.defs>
7272-#include <mach_debug/mach_debug_types.defs>
7373-7474-#if !KERNEL && !LIBSYSCALL_INTERFACE
7575-#define PREFIX(NAME) _kernelrpc_ ## NAME
7676-#else
7777-#define PREFIX(NAME) NAME
7878-#endif
7979-8080-/*
8181- * Returns information about the contents of the virtual
8282- * address space of the target task at the specified
8383- * address. The returned protection, inheritance, sharing
8484- * and memory object values apply to the entire range described
8585- * by the address range returned; the memory object offset
8686- * corresponds to the beginning of the address range.
8787- * [If the specified address is not allocated, the next
8888- * highest address range is described. If no addresses beyond
8989- * the one specified are allocated, the call returns KERN_NO_SPACE.]
9090- */
9191-routine vm_region(
9292- target_task : vm_map_t;
9393- inout address : vm_address_t;
9494- out size : vm_size_t;
9595- flavor : vm_region_flavor_t;
9696- out info : vm_region_info_t, CountInOut;
9797- out object_name : memory_object_name_t =
9898- MACH_MSG_TYPE_MOVE_SEND
9999- ctype: mach_port_t);
100100-101101-/*
102102- * Allocate zero-filled memory in the address space
103103- * of the target task, either at the specified address,
104104- * or wherever space can be found (if anywhere is TRUE),
105105- * of the specified size. The address at which the
106106- * allocation actually took place is returned.
107107- */
108108-109109-#if !KERNEL && !LIBSYSCALL_INTERFACE
110110-skip;
111111-#else
112112-routine PREFIX(vm_allocate)(
113113- target_task : vm_task_entry_t;
114114- inout address : vm_address_t;
115115- size : vm_size_t;
116116- flags : int);
117117-118118-#endif
119119-120120-/*
121121- * Deallocate the specified range from the virtual
122122- * address space of the target task.
123123- */
124124-125125-#if !KERNEL && !LIBSYSCALL_INTERFACE
126126-skip;
127127-#else
128128-routine PREFIX(vm_deallocate)(
129129- target_task : vm_task_entry_t;
130130- address : vm_address_t;
131131- size : vm_size_t);
132132-133133-#endif
134134-135135-/*
136136- * Set the current or maximum protection attribute
137137- * for the specified range of the virtual address
138138- * space of the target task. The current protection
139139- * limits the memory access rights of threads within
140140- * the task; the maximum protection limits the accesses
141141- * that may be given in the current protection.
142142- * Protections are specified as a set of {read, write, execute}
143143- * *permissions*.
144144- */
145145-146146-#if !KERNEL && !LIBSYSCALL_INTERFACE
147147-skip;
148148-#else
149149-routine PREFIX(vm_protect)(
150150- target_task : vm_task_entry_t;
151151- address : vm_address_t;
152152- size : vm_size_t;
153153- set_maximum : boolean_t;
154154- new_protection : vm_prot_t);
155155-#endif
156156-157157-/*
158158- * Set the inheritance attribute for the specified range
159159- * of the virtual address space of the target task.
160160- * The inheritance value is one of {none, copy, share}, and
161161- * specifies how the child address space should acquire
162162- * this memory at the time of a task_create call.
163163- */
164164-routine vm_inherit(
165165- target_task : vm_task_entry_t;
166166- address : vm_address_t;
167167- size : vm_size_t;
168168- new_inheritance : vm_inherit_t);
169169-170170-/*
171171- * Returns the contents of the specified range of the
172172- * virtual address space of the target task. [The
173173- * range must be aligned on a virtual page boundary,
174174- * and must be a multiple of pages in extent. The
175175- * protection on the specified range must permit reading.]
176176- */
177177-routine PREFIX(vm_read) (
178178- target_task : vm_map_t;
179179- address : vm_address_t;
180180- size : vm_size_t;
181181- out data : pointer_t);
182182-183183-/*
184184- * List corrollary to vm_read, returns mapped contents of specified
185185- * ranges within target address space.
186186- */
187187-routine vm_read_list(
188188- target_task : vm_map_t;
189189- inout data_list : vm_read_entry_t;
190190- count : natural_t);
191191-192192-/*
193193- * Writes the contents of the specified range of the
194194- * virtual address space of the target task. [The
195195- * range must be aligned on a virtual page boundary,
196196- * and must be a multiple of pages in extent. The
197197- * protection on the specified range must permit writing.]
198198- */
199199-routine vm_write(
200200- target_task : vm_map_t;
201201- address : vm_address_t;
202202- data : pointer_t);
203203-204204-/*
205205- * Copy the contents of the source range of the virtual
206206- * address space of the target task to the destination
207207- * range in that same address space. [Both of the
208208- * ranges must be aligned on a virtual page boundary,
209209- * and must be multiples of pages in extent. The
210210- * protection on the source range must permit reading,
211211- * and the protection on the destination range must
212212- * permit writing.]
213213- */
214214-routine vm_copy(
215215- target_task : vm_map_t;
216216- source_address : vm_address_t;
217217- size : vm_size_t;
218218- dest_address : vm_address_t);
219219-220220-/*
221221- * Returns the contents of the specified range of the
222222- * virtual address space of the target task. [There
223223- * are no alignment restrictions, and the results will
224224- * overwrite the area pointed to by data - which must
225225- * already exist. The protection on the specified range
226226- * must permit reading.]
227227- */
228228-routine vm_read_overwrite(
229229- target_task : vm_map_t;
230230- address : vm_address_t;
231231- size : vm_size_t;
232232- data : vm_address_t;
233233- out outsize : vm_size_t);
234234-235235-236236-routine vm_msync(
237237- target_task : vm_map_t;
238238- address : vm_address_t;
239239- size : vm_size_t;
240240- sync_flags : vm_sync_t );
241241-242242-/*
243243- * Set the paging behavior attribute for the specified range
244244- * of the virtual address space of the target task.
245245- * The behavior value is one of {default, random, forward
246246- * sequential, reverse sequential} and indicates the expected
247247- * page reference pattern for the specified range.
248248- */
249249-routine vm_behavior_set(
250250- target_task : vm_map_t;
251251- address : vm_address_t;
252252- size : vm_size_t;
253253- new_behavior : vm_behavior_t);
254254-255255-256256-/*
257257- * Map a user-defined memory object into the virtual address
258258- * space of the target task. If desired (anywhere is TRUE),
259259- * the kernel will find a suitable address range of the
260260- * specified size; else, the specific address will be allocated.
261261- *
262262- * The beginning address of the range will be aligned on a virtual
263263- * page boundary, be at or beyond the address specified, and
264264- * meet the mask requirements (bits turned on in the mask must not
265265- * be turned on in the result); the size of the range, in bytes,
266266- * will be rounded up to an integral number of virtual pages.
267267- *
268268- * The memory in the resulting range will be associated with the
269269- * specified memory object, with the beginning of the memory range
270270- * referring to the specified offset into the memory object.
271271- *
272272- * The mapping will take the current and maximum protections and
273273- * the inheritance attributes specified; see the vm_protect and
274274- * vm_inherit calls for a description of these attributes.
275275- *
276276- * If desired (copy is TRUE), the memory range will be filled
277277- * with a copy of the data from the memory object; this copy will
278278- * be private to this mapping in this target task. Otherwise,
279279- * the memory in this mapping will be shared with other mappings
280280- * of the same memory object at the same offset (in this task or
281281- * in other tasks). [The Mach kernel only enforces shared memory
282282- * consistency among mappings on one host with similar page alignments.
283283- * The user-defined memory manager for this object is responsible
284284- * for further consistency.]
285285- */
286286-routine PREFIX(vm_map) (
287287- target_task : vm_task_entry_t;
288288- inout address : vm_address_t;
289289- size : vm_size_t;
290290- mask : vm_address_t;
291291- flags : int;
292292- object : mem_entry_name_port_t;
293293- offset : vm_offset_t;
294294- copy : boolean_t;
295295- cur_protection : vm_prot_t;
296296- max_protection : vm_prot_t;
297297- inheritance : vm_inherit_t);
298298-299299-/*
300300- * Set/Get special properties of memory associated
301301- * to some virtual address range, such as cachability,
302302- * migrability, replicability. Machine-dependent.
303303- */
304304-routine vm_machine_attribute(
305305- target_task : vm_map_t;
306306- address : vm_address_t;
307307- size : vm_size_t;
308308- attribute : vm_machine_attribute_t;
309309- inout value : vm_machine_attribute_val_t);
310310-311311-/*
312312- * Map portion of a task's address space.
313313- */
314314-routine PREFIX(vm_remap) (
315315- target_task : vm_map_t;
316316- inout target_address : vm_address_t;
317317- size : vm_size_t;
318318- mask : vm_address_t;
319319- flags : int;
320320- src_task : vm_map_t;
321321- src_address : vm_address_t;
322322- copy : boolean_t;
323323- out cur_protection : vm_prot_t;
324324- out max_protection : vm_prot_t;
325325- inheritance : vm_inherit_t);
326326-327327-/*
328328- * Require that all future virtual memory allocation
329329- * allocates wired memory. Setting must_wire to FALSE
330330- * disables the wired future feature.
331331- */
332332-routine task_wire(
333333- target_task : vm_map_t;
334334- must_wire : boolean_t);
335335-336336-337337-/*
338338- * Allow application level processes to create named entries which
339339- * correspond to mapped portions of their address space. These named
340340- * entries can then be manipulated, shared with other processes in
341341- * other address spaces and ultimately mapped in ohter address spaces
342342- */
343343-344344-routine mach_make_memory_entry(
345345- target_task :vm_map_t;
346346- inout size :vm_size_t;
347347- offset :vm_offset_t;
348348- permission :vm_prot_t;
349349- out object_handle :mem_entry_name_port_move_send_t;
350350- parent_entry :mem_entry_name_port_t);
351351-352352-/*
353353- * Give the caller information on the given location in a virtual
354354- * address space. If a page is mapped return ref and dirty info.
355355- */
356356-routine vm_map_page_query(
357357- target_map :vm_map_t;
358358- offset :vm_offset_t;
359359- out disposition :integer_t;
360360- out ref_count :integer_t);
361361-362362-/*
363363- * Returns information about a region of memory.
364364- * Includes info about the chain of objects rooted at that region.
365365- * Only available in MACH_VM_DEBUG compiled kernels,
366366- * otherwise returns KERN_FAILURE.
367367- */
368368-routine mach_vm_region_info(
369369- task : vm_map_t;
370370- address : vm_address_t;
371371- out region : vm_info_region_t;
372372- out objects : vm_info_object_array_t);
373373-374374-routine vm_mapped_pages_info(
375375- task : vm_map_t;
376376- out pages : page_address_array_t);
377377-378378-#if 0
379379-/*
380380- * Allow application level processes to create named entries which
381381- * are backed by sub-maps which describe regions of address space.
382382- * These regions of space can have objects mapped into them and
383383- * in turn, can be mapped into target address spaces
384384- */
385385-386386-routine vm_region_object_create(
387387- target_task :vm_map_t;
388388- in size :vm_size_t;
389389- out region_object :mach_port_move_send_t);
390390-#else
391391-skip; /* was vm_region_object_create */
392392-#endif
393393-394394-/*
395395- * A recursive form of vm_region which probes submaps withint the
396396- * address space.
397397- */
398398-routine vm_region_recurse(
399399- target_task : vm_map_t;
400400- inout address : vm_address_t;
401401- out size : vm_size_t;
402402- inout nesting_depth : natural_t;
403403- out info : vm_region_recurse_info_t,CountInOut);
404404-405405-406406-/*
407407- * The routines below are temporary, meant for transitional use
408408- * as their counterparts are moved from 32 to 64 bit data path
409409- */
410410-411411-412412-routine vm_region_recurse_64(
413413- target_task : vm_map_t;
414414- inout address : vm_address_t;
415415- out size : vm_size_t;
416416- inout nesting_depth : natural_t;
417417- out info : vm_region_recurse_info_t,CountInOut);
418418-419419-routine mach_vm_region_info_64(
420420- task : vm_map_t;
421421- address : vm_address_t;
422422- out region : vm_info_region_64_t;
423423- out objects : vm_info_object_array_t);
424424-425425-routine vm_region_64(
426426- target_task : vm_map_t;
427427- inout address : vm_address_t;
428428- out size : vm_size_t;
429429- flavor : vm_region_flavor_t;
430430- out info : vm_region_info_t, CountInOut;
431431- out object_name : memory_object_name_t =
432432- MACH_MSG_TYPE_MOVE_SEND
433433- ctype: mach_port_t);
434434-435435-routine mach_make_memory_entry_64(
436436- target_task :vm_map_t;
437437- inout size :memory_object_size_t;
438438- offset :memory_object_offset_t;
439439- permission :vm_prot_t;
440440- out object_handle :mach_port_move_send_t;
441441- parent_entry :mem_entry_name_port_t);
442442-443443-444444-445445-routine vm_map_64(
446446- target_task : vm_task_entry_t;
447447- inout address : vm_address_t;
448448- size : vm_size_t;
449449- mask : vm_address_t;
450450- flags : int;
451451- object : mem_entry_name_port_t;
452452- offset : memory_object_offset_t;
453453- copy : boolean_t;
454454- cur_protection : vm_prot_t;
455455- max_protection : vm_prot_t;
456456- inheritance : vm_inherit_t);
457457-458458-#if 0
459459-/*
460460- * The UPL interfaces are not ready for user-level export.
461461- */
462462-routine vm_map_get_upl(
463463- target_task : vm_map_t;
464464- address : vm_map_offset_t;
465465- inout size : vm_size_t;
466466- out upl : upl_t;
467467- out page_info : upl_page_info_array_t, CountInOut;
468468- inout flags : integer_t;
469469- force_data_sync : integer_t);
470470-471471-routine vm_upl_map(
472472- target_task : vm_map_t;
473473- upl : upl_t;
474474- inout address : vm_address_t);
475475-476476-routine vm_upl_unmap(
477477- target_task : vm_map_t;
478478- upl : upl_t);
479479-#else
480480-skip; /* was vm_map_get_upl */
481481-skip; /* was vm_upl_map */
482482-skip; /* was vm_upl_unmap */
483483-#endif
484484-485485-/*
486486- * Control behavior and investigate state of a "purgable" object in
487487- * the virtual address space of the target task. A purgable object is
488488- * created via a call to vm_allocate() with VM_FLAGS_PURGABLE
489489- * specified. See the routine implementation for a complete
490490- * definition of the routine.
491491- */
492492-routine vm_purgable_control(
493493- target_task : vm_map_t;
494494- address : vm_address_t;
495495- control : vm_purgable_t;
496496- inout state : int);
497497-498498-/* vim: set ft=c : */