FreeBSD/Linux Kernel Cross Reference
sys/kern/machine.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: machine.h,v $
29 * Revision 2.2 93/11/17 19:07:23 dbg
30 * Created.
31 * [93/11/03 dbg]
32 *
33 */
34
35 /*
36 * Routines to control CPUS, exported from
37 * kern/machine.c and machine-dependent files.
38 */
39
40 #ifndef _KERN_MACHINE_H_
41 #define _KERN_MACHINE_H_
42
43 #include <cpus.h>
44
45 #include <mach/boolean.h>
46 #include <mach/host_info.h>
47 #include <mach/kern_return.h>
48 #include <mach/machine.h>
49 #include <mach/processor_info.h>
50
51 #include <kern/host.h>
52 #include <kern/kern_types.h>
53
54 /*
55 * Machine-independent data structures and routines:
56 */
57
58 extern struct machine_info machine_info;
59 extern struct machine_slot machine_slot[NCPUS];
60
61 extern void
62 cpu_up(
63 int cpu);
64
65 extern void
66 cpu_down(
67 int cpu);
68
69 extern kern_return_t
70 host_reboot(
71 host_t host,
72 int options);
73
74 extern kern_return_t
75 host_get_boot_info(
76 host_t priv_host,
77 kernel_boot_info_t boot_info);
78
79 extern kern_return_t
80 processor_assign(
81 processor_t processor,
82 processor_set_t new_pset,
83 boolean_t wait);
84
85 extern kern_return_t
86 processor_shutdown(
87 processor_t processor);
88
89 #if NCPUS > 1
90 extern void action_thread_init(void);
91 extern no_return action_thread(void);
92 #endif
93
94 /*
95 * Machine-dependent routines
96 */
97 extern void
98 machine_init(void);
99
100 extern no_return
101 halt_cpu(void);
102
103 extern void
104 halt_all_cpus(
105 boolean_t reboot);
106
107 #if NCPUS > 1
108 extern void
109 switch_to_shutdown_context(
110 thread_t thread,
111 no_return (*shutdown)(processor_t),
112 processor_t processor);
113
114 extern kern_return_t
115 cpu_start(int processor_number);
116
117 extern kern_return_t
118 cpu_control(
119 int processor_number,
120 processor_info_t info,
121 natural_t count);
122
123 extern void
124 start_other_cpus(void);
125
126 extern void
127 slave_machine_init(void);
128 #endif /* NCPUS > 1 */
129
130 #endif /* _KERN_MACHINE_H_ */
Cache object: 0ddd6cb44e62d984394d8464fc2ae126
|