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