]> git.saurik.com Git - apple/xnu.git/blob - osfmk/i386/misc_protos.h
xnu-792.13.8.tar.gz
[apple/xnu.git] / osfmk / i386 / misc_protos.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_OSREFERENCE_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. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
14 * agreement.
15 *
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
18 * file.
19 *
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
27 *
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
29 */
30 /*
31 * @OSF_COPYRIGHT@
32 */
33
34 #ifndef _I386_MISC_PROTOS_H_
35 #define _I386_MISC_PROTOS_H_
36
37 #include <i386/thread.h>
38
39 struct boot_args;
40 struct cpu_data;
41
42 extern void i386_init(vm_offset_t);
43 extern void i386_macho_zerofill(void);
44 extern void i386_vm_init(
45 uint64_t maxmem,
46 boolean_t IA32e,
47 struct boot_args *args);
48 extern void cpu_IA32e_enable(struct cpu_data *);
49 extern void cpu_IA32e_disable(struct cpu_data *);
50 extern void ml_load_desc64(void);
51 extern void ml_64bit_wrmsr64(uint32_t msr, uint64_t value);
52 extern void cpu_window_init(int);
53 extern void ml_64bit_lldt(int);
54
55 extern void machine_startup(void);
56
57 extern void get_root_device(void);
58 extern void picinit(void);
59 extern void interrupt_processor(
60 int cpu);
61 extern void mp_probe_cpus(void);
62 extern void remote_kdb(void);
63 extern void clear_kdb_intr(void);
64 extern void draw_panic_dialog(void);
65 extern void cpu_init(void);
66 extern void cpu_shutdown(void);
67 extern void fix_desc(
68 void * desc,
69 int num_desc);
70 extern void fix_desc64(
71 void * desc,
72 int num_desc);
73 extern void cnpollc(
74 boolean_t on);
75 extern void form_pic_mask(void);
76 extern void intnull(
77 int unit);
78 extern char * i386_boot_info(
79 char *buf,
80 vm_size_t buf_len);
81
82 extern void blkclr(
83 const char *from,
84 int nbytes);
85
86 extern unsigned int div_scale(
87 unsigned int dividend,
88 unsigned int divisor,
89 unsigned int *scale);
90
91 extern unsigned int mul_scale(
92 unsigned int multiplicand,
93 unsigned int multiplier,
94 unsigned int *scale);
95
96 /* Move arbitrarily-aligned data from one physical address to another */
97 extern void bcopy_phys(addr64_t from, addr64_t to, vm_size_t nbytes);
98
99 /* Flush all cachelines for a page. */
100 extern void cache_flush_page_phys(ppnum_t pa);
101
102 /* Flushing for incoherent I/O */
103 extern void dcache_incoherent_io_flush64(addr64_t pa, unsigned int count);
104 extern void dcache_incoherent_io_store64(addr64_t pa, unsigned int count);
105
106
107 extern processor_t cpu_processor_alloc(boolean_t is_boot_cpu);
108 extern void cpu_processor_free(processor_t proc);
109
110 extern void *chudxnu_cpu_alloc(boolean_t is_boot_cpu);
111 extern void chudxnu_cpu_free(void *);
112
113 extern void sysclk_gettime_interrupts_disabled(
114 mach_timespec_t *cur_time);
115
116 extern void rtc_nanotime_init_commpage(void);
117
118 extern void rtc_sleep_wakeup(void);
119
120 extern void rtc_clock_stepping(
121 uint32_t new_frequency,
122 uint32_t old_frequency);
123 extern void rtc_clock_stepped(
124 uint32_t new_frequency,
125 uint32_t old_frequency);
126 extern void rtc_clock_napped(
127 uint64_t);
128
129 extern void x86_lowmem_free(void);
130
131 #endif /* _I386_MISC_PROTOS_H_ */