]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/misc_protos.h
xnu-792.6.76.tar.gz
[apple/xnu.git] / osfmk / ppc / misc_protos.h
1 /*
2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * @OSF_COPYRIGHT@
24 */
25
26 #ifndef _PPC_MISC_PROTOS_H_
27 #define _PPC_MISC_PROTOS_H_
28
29 #include <debug.h>
30 #include <mach_kdb.h>
31 #include <mach_kgdb.h>
32 #include <mach_kdp.h>
33 #include <mach_debug.h>
34
35 #include <ppc/boot.h>
36 #include <kern/thread.h>
37 #include <mach/vm_types.h>
38 #include <kern/cpu_data.h>
39 #include <ppc/savearea.h>
40 #include <mach/ppc/thread_status.h>
41 #include <stdarg.h>
42 #include <string.h>
43
44 /* uncached-safe */
45 extern void bzero_nc(
46 char *buf,
47 int size);
48
49 /* uncached-safe */
50 extern void bcopy_nc(
51 char *from,
52 char *to,
53 int size);
54
55 /* Physical to physical copy (ints must be disabled) */
56 extern void bcopy_phys(
57 addr64_t from,
58 addr64_t to,
59 int size);
60
61 /* Physical to physical copy virtually (ints must be disabled) */
62 extern void bcopy_physvir_32(
63 addr64_t from,
64 addr64_t to,
65 int size);
66
67 extern void phys_copy(
68 addr64_t from,
69 addr64_t to,
70 vm_size_t size);
71
72 extern void machine_conf(
73 void);
74
75 extern void machine_startup(
76 boot_args *args);
77
78 extern void ppc_vm_init(
79 uint64_t ppc_mem_size,
80 boot_args *args);
81
82 extern int ppcNull(
83 struct savearea *asavearea);
84
85 extern int ppcNullinst(
86 struct savearea *asavearea);
87
88 extern void disable_bluebox_internal(
89 thread_t act);
90
91 extern uint64_t hid0get64(
92 void);
93
94 extern void hid5set64(
95 uint64_t);
96
97 extern void Load_context(
98 thread_t th);
99
100 extern thread_t Switch_context(
101 thread_t old,
102 void (*cont)(void),
103 thread_t new);
104
105 extern void fpu_save(
106 struct facility_context *fpu_fc);
107
108 extern void vec_save(
109 struct facility_context *vec_fc);
110
111 extern void toss_live_fpu(
112 struct facility_context *fpu_fc);
113
114 extern void toss_live_vec(
115 struct facility_context *vec_fc);
116
117 extern struct savearea *enterDebugger(
118 unsigned int trap,
119 struct savearea *state,
120 unsigned int dsisr);
121
122 extern void draw_panic_dialog(
123 void);
124
125 #ifdef DEBUG
126 #define DPRINTF(x) { printf("%s : ",__FUNCTION__);printf x; }
127 #endif /* DEBUG */
128
129 #if MACH_ASSERT
130 extern void dump_thread(
131 thread_t th);
132 #endif
133
134 #endif /* _PPC_MISC_PROTOS_H_ */