]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
de355530 A |
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. | |
1c79356b | 11 | * |
de355530 A |
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 | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
de355530 A |
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. | |
1c79356b A |
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 <cpus.h> | |
30 | #include <debug.h> | |
31 | #include <mach_kdb.h> | |
32 | #include <mach_kgdb.h> | |
33 | #include <mach_kdp.h> | |
34 | #include <mach_debug.h> | |
35 | ||
36 | #include <ppc/thread.h> | |
37 | #include <ppc/boot.h> | |
38 | #include <kern/thread_act.h> | |
39 | #include <mach/vm_types.h> | |
40 | #include <kern/cpu_data.h> | |
41 | #include <mach/ppc/thread_status.h> | |
42 | #include <stdarg.h> | |
43 | ||
44 | extern int strcmp(const char *s1, const char *s2); | |
45 | extern int strncmp(const char *s1, const char *s2, unsigned long n); | |
46 | extern char *strcat(char *dest, const char *src); | |
47 | extern char *strcpy(char *dest, const char *src); | |
48 | ||
49 | extern void vprintf(const char *fmt, va_list args); | |
50 | extern void printf(const char *fmt, ...); | |
51 | ||
52 | extern void bcopy_nc(char *from, char *to, int size); /* uncached-safe */ | |
de355530 A |
53 | extern void bcopy_phys(char *from, char *to, int size); /* Physical to physical copy (ints must be disabled) */ |
54 | extern void bcopy_physvir(char *from, char *to, int size); /* Physical to physical copy virtually (ints must be disabled) */ | |
1c79356b A |
55 | |
56 | extern void ppc_init(boot_args *args); | |
9bccf70c A |
57 | extern struct savearea *enterDebugger(unsigned int trap, |
58 | struct savearea *state, | |
1c79356b A |
59 | unsigned int dsisr); |
60 | ||
9bccf70c | 61 | extern void draw_panic_dialog(void); |
de355530 | 62 | extern void ppc_vm_init(unsigned int mem_size, boot_args *args); |
1c79356b A |
63 | |
64 | extern void autoconf(void); | |
65 | extern void machine_init(void); | |
66 | extern void machine_conf(void); | |
67 | extern void probeio(void); | |
68 | extern int cons_find(boolean_t); | |
69 | extern void machine_startup(boot_args *args); | |
70 | ||
71 | extern void interrupt_init(void); | |
72 | extern void interrupt_enable(void); | |
73 | extern void interrupt_disable(void); | |
74 | extern void disable_bluebox_internal(thread_act_t act); | |
75 | #if MACH_KDB | |
76 | extern void db_interrupt_enable(void); | |
77 | extern void db_interrupt_disable(void); | |
78 | #endif /* MACH_KDB */ | |
1c79356b A |
79 | |
80 | extern void phys_zero(vm_offset_t, vm_size_t); | |
de355530 | 81 | extern void phys_copy(vm_offset_t, vm_offset_t, vm_size_t); |
1c79356b A |
82 | |
83 | extern void Load_context(thread_t th); | |
84 | ||
85 | extern struct thread_shuttle *Switch_context(struct thread_shuttle *old, | |
86 | void (*cont)(void), | |
87 | struct thread_shuttle *new); | |
88 | ||
9bccf70c A |
89 | extern void fpu_save(struct facility_context *); |
90 | extern void vec_save(struct facility_context *); | |
91 | extern void toss_live_fpu(struct facility_context *); | |
92 | extern void toss_live_vec(struct facility_context *); | |
93 | ||
1c79356b A |
94 | extern int nsec_to_processor_clock_ticks(int nsec); |
95 | ||
96 | extern void tick_delay(int ticks); | |
97 | ||
98 | #ifdef DEBUG | |
99 | #define DPRINTF(x) { printf("%s : ",__FUNCTION__);printf x; } | |
100 | #endif /* DEBUG */ | |
101 | ||
102 | #if MACH_ASSERT | |
1c79356b A |
103 | extern void dump_thread(thread_t th); |
104 | #endif | |
105 | ||
106 | #if NCPUS > 1 | |
107 | extern void mp_probe_cpus(void); | |
108 | #if MACH_KDB | |
109 | extern void remote_kdb(void); | |
110 | extern void clear_kdb_intr(void); | |
111 | extern void kdb_console(void); | |
112 | #endif /* MACH_KDB */ | |
113 | #endif /* NCPUS > 1 */ | |
114 | ||
115 | #endif /* _PPC_MISC_PROTOS_H_ */ |