]> git.saurik.com Git - apple/xnu.git/blame - osfmk/kern/machine.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / osfmk / kern / machine.h
CommitLineData
1c79356b 1/*
91447636 2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
1c79356b
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
ff6e181a
A
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.
1c79356b 12 *
ff6e181a
A
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
1c79356b
A
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
ff6e181a
A
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.
1c79356b
A
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*
24 * @OSF_COPYRIGHT@
25 */
26
27#ifndef _KERN_MACHINE_H_
28#define _KERN_MACHINE_H_
29
1c79356b
A
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
91447636
A
38extern void processor_up(
39 processor_t processor);
1c79356b 40
55e303ae
A
41extern void processor_offline(
42 processor_t processor);
43
91447636
A
44extern void processor_start_thread(void);
45
1c79356b
A
46/*
47 * Must be implemented in machine dependent code.
48 */
49
50/* Initialize machine dependent ast code */
91447636
A
51extern void init_ast_check(
52 processor_t processor);
1c79356b
A
53
54/* Cause check for ast */
91447636
A
55extern void cause_ast_check(
56 processor_t processor);
1c79356b 57
91447636
A
58extern kern_return_t cpu_control(
59 int slot_num,
60 processor_info_t info,
61 unsigned int count);
1c79356b 62
91447636 63extern void cpu_sleep(void);
1c79356b 64
91447636
A
65extern kern_return_t cpu_start(
66 int slot_num);
67
68extern void cpu_exit_wait(
69 int slot_num);
70
71extern kern_return_t cpu_info(
72 processor_flavor_t flavor,
73 int slot_num,
74 processor_info_t info,
75 unsigned int *count);
76
77extern kern_return_t cpu_info_count(
78 processor_flavor_t flavor,
79 unsigned int *count);
80
81extern thread_t machine_processor_shutdown(
82 thread_t thread,
83 void (*doshutdown)(processor_t),
84 processor_t processor);
85
86extern void machine_idle(void);
87
88extern void machine_signal_idle(
89 processor_t processor);
90
91extern void halt_cpu(void);
92
93extern void halt_all_cpus(
94 boolean_t reboot);
95
96extern 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 */
104extern void machine_callstack(
105 natural_t *buf,
106 vm_size_t callstack_max);
1c79356b 107
91447636 108extern void consider_machine_collect(void);
1c79356b
A
109
110#endif /* _KERN_MACHINE_H_ */