]> git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/system.h
c7524f6b1f63aad880666a6a6c0da91e8bdfb09b
[apple/xnu.git] / iokit / IOKit / system.h
1 /*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
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
13 * file.
14 *
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.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 #ifndef __IOKIT_SYSTEM_H
26 #define __IOKIT_SYSTEM_H
27
28 #include <sys/cdefs.h>
29
30 __BEGIN_DECLS
31
32 #include <mach/mach_types.h>
33 #include <mach/mach_interface.h>
34 #include <mach/etap.h>
35 #include <mach/etap_events.h>
36
37 #include <stdarg.h>
38
39 #if KERNEL_PRIVATE
40 #include <IOKit/assert.h> /* Must be before other includes of kern/assert.h */
41 #include <kern/cpu_data.h>
42 #include <kern/thread.h>
43 #include <kern/thread_act.h>
44 #include <vm/pmap.h>
45 #include <vm/vm_kern.h>
46 #include <kern/kalloc.h>
47 #include <kern/task.h>
48 #include <kern/time_out.h>
49 #include <kern/sched_prim.h>
50 #include <machine/spl.h>
51 #include <kern/lock.h>
52 #include <kern/queue.h>
53 #include <kern/ipc_mig.h>
54 #endif /* KERNEL_PRIVATE */
55
56 extern int bcmp(const void *, const void *, size_t);
57 extern void bcopy(const void *, void *, size_t);
58 extern void bzero(void *, size_t);
59
60 extern int memcmp(const void *, const void *, size_t);
61
62 extern void _doprnt( const char *format, va_list *arg,
63 void (*putc)(char), int radix );
64
65 extern int sscanf(const char *input, const char *fmt, ...);
66 extern int sprintf(char *s, const char *format, ...);
67 extern long strtol(const char *, char **, int);
68 extern unsigned long strtoul(const char *, char **, int);
69 extern long long strtoq(const char *, char **, int);
70 extern unsigned long long strtouq(const char *, char **, int);
71
72 extern
73 #ifdef __GNUC__
74 volatile
75 #endif
76 void panic(const char * msg, ...);
77
78 /*
79 */
80
81 /*
82 * Really need a set of interfaces from osfmk/pexpert components to do
83 * all that is required to prepare an I/O from a cache management point
84 * of view.
85 * osfmk/ppc/cache.s
86 */
87 extern void invalidate_icache(vm_offset_t addr, unsigned cnt, int phys);
88 extern void flush_dcache(vm_offset_t addr, unsigned count, int phys);
89 extern void invalidate_icache64(addr64_t addr, unsigned cnt, int phys);
90 extern void flush_dcache64(addr64_t addr, unsigned count, int phys);
91
92 __END_DECLS
93
94 #endif /* !__IOKIT_SYSTEM_H */