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