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