2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_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. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
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.
21 * @APPLE_LICENSE_HEADER_END@
27 #ifndef _KERN_MACHINE_H_
28 #define _KERN_MACHINE_H_
30 #include <mach/kern_return.h>
31 #include <mach/processor_info.h>
32 #include <kern/kern_types.h>
35 * Machine support declarations.
38 extern void processor_up(
39 processor_t processor
);
41 extern void processor_offline(
42 processor_t processor
);
44 extern void processor_start_thread(void);
47 * Must be implemented in machine dependent code.
50 /* Initialize machine dependent ast code */
51 extern void init_ast_check(
52 processor_t processor
);
54 /* Cause check for ast */
55 extern void cause_ast_check(
56 processor_t processor
);
58 extern kern_return_t
cpu_control(
60 processor_info_t info
,
63 extern void cpu_sleep(void);
65 extern kern_return_t
cpu_start(
68 extern void cpu_exit_wait(
71 extern kern_return_t
cpu_info(
72 processor_flavor_t flavor
,
74 processor_info_t info
,
77 extern kern_return_t
cpu_info_count(
78 processor_flavor_t flavor
,
81 extern thread_t
machine_processor_shutdown(
83 void (*doshutdown
)(processor_t
),
84 processor_t processor
);
86 extern void machine_idle(void);
88 extern void machine_signal_idle(
89 processor_t processor
);
91 extern void halt_cpu(void);
93 extern void halt_all_cpus(
96 extern char *machine_boot_info(
101 * Machine-dependent routine to fill in an array with up to callstack_max
102 * levels of return pc information.
104 extern void machine_callstack(
106 vm_size_t callstack_max
);
108 extern void consider_machine_collect(void);
110 #endif /* _KERN_MACHINE_H_ */