]> git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/machine.h
0028d7ba855d5c025229bc07df173b6a90197a5d
[apple/xnu.git] / osfmk / kern / machine.h
1 /*
2 * Copyright (c) 2000-2004 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
27 #ifndef _KERN_MACHINE_H_
28 #define _KERN_MACHINE_H_
29
30 #include <mach/kern_return.h>
31 #include <mach/processor_info.h>
32 #include <kern/kern_types.h>
33
34 /*
35 * Machine support declarations.
36 */
37
38 extern void processor_up(
39 processor_t processor);
40
41 extern void processor_offline(
42 processor_t processor);
43
44 extern void processor_start_thread(void);
45
46 /*
47 * Must be implemented in machine dependent code.
48 */
49
50 /* Initialize machine dependent ast code */
51 extern void init_ast_check(
52 processor_t processor);
53
54 /* Cause check for ast */
55 extern void cause_ast_check(
56 processor_t processor);
57
58 extern kern_return_t cpu_control(
59 int slot_num,
60 processor_info_t info,
61 unsigned int count);
62
63 extern void cpu_sleep(void);
64
65 extern kern_return_t cpu_start(
66 int slot_num);
67
68 extern void cpu_exit_wait(
69 int slot_num);
70
71 extern kern_return_t cpu_info(
72 processor_flavor_t flavor,
73 int slot_num,
74 processor_info_t info,
75 unsigned int *count);
76
77 extern kern_return_t cpu_info_count(
78 processor_flavor_t flavor,
79 unsigned int *count);
80
81 extern thread_t machine_processor_shutdown(
82 thread_t thread,
83 void (*doshutdown)(processor_t),
84 processor_t processor);
85
86 extern void machine_idle(void);
87
88 extern void machine_signal_idle(
89 processor_t processor);
90
91 extern void halt_cpu(void);
92
93 extern void halt_all_cpus(
94 boolean_t reboot);
95
96 extern char *machine_boot_info(
97 char *buf,
98 vm_size_t buf_len);
99
100 /*
101 * Machine-dependent routine to fill in an array with up to callstack_max
102 * levels of return pc information.
103 */
104 extern void machine_callstack(
105 natural_t *buf,
106 vm_size_t callstack_max);
107
108 extern void consider_machine_collect(void);
109
110 #endif /* _KERN_MACHINE_H_ */