]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/misc_protos.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
29 #ifndef _MISC_PROTOS_H_
30 #define _MISC_PROTOS_H_
34 #include <machine/setjmp.h>
35 #include <mach/boolean.h>
36 #include <mach/message.h>
37 #include <mach/machine/vm_types.h>
38 #include <ipc/ipc_types.h>
40 /* Set a bit in a bit array */
45 /* Clear a bit in a bit array */
50 /* Find the first set bit in a bit array */
57 * Test if indicated bit is set in bit string.
63 /* Move arbitrarily-aligned data from one array to another */
69 /* Move overlapping, arbitrarily aligned data from one array to another */
70 /* Not present on all ports */
81 /* Zero an arbitrarily aligned array */
86 /* Move arbitrarily-aligned data from a user space to kernel space */
87 extern boolean_t
copyin(
88 const char *user_addr
,
92 /* Move a NUL-terminated string from a user space to kernel space */
93 extern boolean_t
copyinstr(
94 const char *user_addr
,
99 /* Move arbitrarily-aligned data from a user space to kernel space */
100 extern boolean_t
copyinmsg(
101 const char *user_addr
,
103 mach_msg_size_t nbytes
);
105 /* Move arbitrarily-aligned data from a kernel space to user space */
106 extern boolean_t
copyout(
107 const char *kernel_addr
,
111 /* Move arbitrarily-aligned data from a kernel space to user space */
112 extern boolean_t
copyoutmsg(
113 const char *kernel_addr
,
115 mach_msg_size_t nbytes
);
117 extern int sscanf(const char *input
, const char *fmt
, ...);
119 extern integer_t
sprintf(char *buf
, const char *fmt
, ...);
121 extern void printf(const char *format
, ...);
123 extern void kdp_printf(const char *format
, ...);
125 extern void printf_init(void);
127 extern void panic(const char *string
, ...);
129 extern void panic_init(void);
131 extern void log(int level
, char *fmt
, ...);
135 register const char *fmt
,
141 register const char *fmt
,
143 void (*putc
)(int, void *),
147 extern void safe_gets(
151 extern void cnputcusr(char);
153 extern void conslog_putc(char);
155 extern void consdebug_putc(char);
157 extern void cnputc(char);
159 extern int cngetc(void);
161 extern int cnmaygetc(void);
170 extern void bootstrap_create(void);
172 extern void halt_cpu(void);
174 extern void halt_all_cpus(
177 extern void Debugger(
178 const char * message
);
183 extern char *machine_boot_info(
188 * Machine-dependent routine to fill in an array with up to callstack_max
189 * levels of return pc information.
191 extern void machine_callstack(
193 vm_size_t callstack_max
);
195 extern void consider_machine_collect(void);
197 extern void norma_bootstrap(void);
200 extern boolean_t
no_bootstrap_task(void);
201 extern ipc_port_t
get_root_master_device_port(void);
204 #endif /* _MISC_PROTOS_H_ */