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