]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/cpu_internal.h
ea7b3eb3cc56ee16027389d05c418e4dea028b6a
[apple/xnu.git] / osfmk / ppc / cpu_internal.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * @OSF_COPYRIGHT@
25 */
26 #ifndef _PPC_CPU_INTERNAL_H_
27 #define _PPC_CPU_INTERNAL_H_
28
29 #include <mach/kern_return.h>
30 #include <ppc/exception.h>
31
32 extern void _start_cpu(
33 void);
34
35 extern void cpu_bootstrap(
36 void);
37
38 extern void cpu_init(
39 void);
40
41 extern void cpu_machine_init(
42 void);
43
44 extern void cpu_doshutdown(
45 void);
46
47 extern void cpu_signal_handler(
48 void);
49
50 extern kern_return_t cpu_signal(
51 int target,
52 int signal,
53 unsigned int p1,
54 unsigned int p2);
55
56 #define SIGPast 0 /* Requests an ast on target processor */
57 #define SIGPcpureq 1 /* Requests CPU specific function */
58 #define SIGPdebug 2 /* Requests a debugger entry */
59 #define SIGPwake 3 /* Wake up a sleeping processor */
60 #define SIGPcall 4 /* Call a function on a processor */
61
62 #define CPRQtimebase 1 /* Get timebase of processor */
63 #define CPRQsegload 2 /* Segment registers reload */
64 #define CPRQscom 3 /* SCOM */
65 #define CPRQchud 4 /* CHUD perfmon */
66 #define CPRQsps 5 /* Set Processor Speed */
67
68
69 extern struct per_proc_info * cpu_per_proc_alloc(
70 void);
71
72 extern void cpu_per_proc_free(
73 struct per_proc_info *per_proc);
74
75 extern void * console_per_proc_alloc(
76 boolean_t boot_processor);
77
78 extern void console_per_proc_free(
79 void *per_proc_cbfr);
80
81 extern void * chudxnu_per_proc_alloc(
82 boolean_t boot_processor);
83
84 extern void chudxnu_per_proc_free(
85 void *per_proc_chud);
86
87 extern kern_return_t cpu_per_proc_register(
88 struct per_proc_info *proc_info);
89
90 extern unsigned int real_ncpus;
91 extern unsigned int max_ncpus;
92
93 #endif /* _PPC_CPU_INTERNAL_H_ */