2 * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
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.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
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.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
32 #ifndef _KERN_MACHINE_H_
33 #define _KERN_MACHINE_H_
35 #include <mach/kern_return.h>
36 #include <mach/processor_info.h>
37 #include <kern/kern_types.h>
40 * Machine support declarations.
43 extern void processor_up(
44 processor_t processor
);
46 extern void processor_offline(
47 processor_t processor
);
49 extern void processor_start_thread(void *machine_param
);
52 * Must be implemented in machine dependent code.
55 /* Initialize machine dependent ast code */
56 extern void init_ast_check(
57 processor_t processor
);
59 /* Cause check for ast */
60 extern void cause_ast_check(
61 processor_t processor
);
63 extern kern_return_t
cpu_control(
65 processor_info_t info
,
68 extern void cpu_sleep(void);
70 extern kern_return_t
cpu_start(
73 extern void cpu_exit_wait(
76 extern kern_return_t
cpu_info(
77 processor_flavor_t flavor
,
79 processor_info_t info
,
82 extern kern_return_t
cpu_info_count(
83 processor_flavor_t flavor
,
86 extern thread_t
machine_processor_shutdown(
88 void (*doshutdown
)(processor_t
),
89 processor_t processor
);
91 extern void machine_idle(void);
93 extern void machine_track_platform_idle(boolean_t
);
95 extern void machine_signal_idle(
96 processor_t processor
);
98 extern void halt_cpu(void);
100 extern void halt_all_cpus(
103 extern char *machine_boot_info(
108 * Machine-dependent routine to fill in an array with up to callstack_max
109 * levels of return pc information.
111 extern void machine_callstack(
113 vm_size_t callstack_max
);
115 extern void consider_machine_collect(void);
117 #endif /* _KERN_MACHINE_H_ */