]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
2d21ac55 | 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. |
1c79356b | 3 | * |
2d21ac55 | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
1c79356b | 5 | * |
2d21ac55 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. | |
8f6c56a5 | 14 | * |
2d21ac55 A |
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 | |
8f6c56a5 A |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
2d21ac55 A |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
23 | * Please see the License for the specific language governing rights and | |
24 | * limitations under the License. | |
8f6c56a5 | 25 | * |
2d21ac55 | 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
1c79356b A |
27 | */ |
28 | /* | |
29 | * @OSF_COPYRIGHT@ | |
30 | */ | |
31 | ||
0c530ab8 A |
32 | #ifndef _I386_MISC_PROTOS_H_ |
33 | #define _I386_MISC_PROTOS_H_ | |
34 | ||
1c79356b A |
35 | #include <i386/thread.h> |
36 | ||
0c530ab8 A |
37 | struct boot_args; |
38 | struct cpu_data; | |
39 | ||
40 | extern void i386_init(vm_offset_t); | |
41 | extern void i386_macho_zerofill(void); | |
42 | extern void i386_vm_init( | |
2d21ac55 A |
43 | uint64_t, |
44 | boolean_t, | |
45 | struct boot_args *); | |
0c530ab8 A |
46 | extern void cpu_IA32e_enable(struct cpu_data *); |
47 | extern void cpu_IA32e_disable(struct cpu_data *); | |
48 | extern void ml_load_desc64(void); | |
49 | extern void ml_64bit_wrmsr64(uint32_t msr, uint64_t value); | |
0c530ab8 | 50 | extern void ml_64bit_lldt(int); |
2d21ac55 A |
51 | extern void cpu_userwindow_init(int); |
52 | extern void cpu_physwindow_init(int); | |
91447636 A |
53 | |
54 | extern void machine_startup(void); | |
55 | ||
1c79356b A |
56 | extern void get_root_device(void); |
57 | extern void picinit(void); | |
1c79356b A |
58 | extern void interrupt_processor( |
59 | int cpu); | |
60 | extern void mp_probe_cpus(void); | |
0c530ab8 | 61 | extern void panic_io_port_read(void); |
2d21ac55 | 62 | |
1c79356b A |
63 | extern void remote_kdb(void); |
64 | extern void clear_kdb_intr(void); | |
55e303ae | 65 | extern void draw_panic_dialog(void); |
91447636 | 66 | extern void cpu_init(void); |
1c79356b A |
67 | extern void cpu_shutdown(void); |
68 | extern void fix_desc( | |
69 | void * desc, | |
70 | int num_desc); | |
0c530ab8 A |
71 | extern void fix_desc64( |
72 | void * desc, | |
73 | int num_desc); | |
1c79356b A |
74 | extern void cnpollc( |
75 | boolean_t on); | |
76 | extern void form_pic_mask(void); | |
77 | extern void intnull( | |
78 | int unit); | |
79 | extern char * i386_boot_info( | |
80 | char *buf, | |
81 | vm_size_t buf_len); | |
82 | ||
83 | extern void blkclr( | |
84 | const char *from, | |
85 | int nbytes); | |
86 | ||
1c79356b A |
87 | extern unsigned int div_scale( |
88 | unsigned int dividend, | |
89 | unsigned int divisor, | |
90 | unsigned int *scale); | |
91 | ||
92 | extern unsigned int mul_scale( | |
93 | unsigned int multiplicand, | |
94 | unsigned int multiplier, | |
95 | unsigned int *scale); | |
0b4e3aa0 A |
96 | |
97 | /* Move arbitrarily-aligned data from one physical address to another */ | |
55e303ae A |
98 | extern void bcopy_phys(addr64_t from, addr64_t to, vm_size_t nbytes); |
99 | ||
91447636 A |
100 | /* Flush all cachelines for a page. */ |
101 | extern void cache_flush_page_phys(ppnum_t pa); | |
102 | ||
103 | /* Flushing for incoherent I/O */ | |
104 | extern void dcache_incoherent_io_flush64(addr64_t pa, unsigned int count); | |
105 | extern void dcache_incoherent_io_store64(addr64_t pa, unsigned int count); | |
106 | ||
107 | ||
108 | extern processor_t cpu_processor_alloc(boolean_t is_boot_cpu); | |
109 | extern void cpu_processor_free(processor_t proc); | |
110 | ||
0c530ab8 A |
111 | extern void *chudxnu_cpu_alloc(boolean_t is_boot_cpu); |
112 | extern void chudxnu_cpu_free(void *); | |
113 | ||
91447636 A |
114 | extern void sysclk_gettime_interrupts_disabled( |
115 | mach_timespec_t *cur_time); | |
116 | ||
0c530ab8 | 117 | extern void rtc_nanotime_init_commpage(void); |
6601e61a | 118 | |
0c530ab8 | 119 | extern void rtc_sleep_wakeup(uint64_t base); |
91447636 | 120 | |
0c530ab8 | 121 | extern void rtc_lapic_start_ticking(void); |
91447636 A |
122 | |
123 | extern void rtc_clock_stepping( | |
124 | uint32_t new_frequency, | |
125 | uint32_t old_frequency); | |
126 | extern void rtc_clock_stepped( | |
127 | uint32_t new_frequency, | |
128 | uint32_t old_frequency); | |
4a3eedf9 | 129 | extern void rtc_clock_napped(uint64_t, uint64_t); |
91447636 A |
130 | |
131 | extern void x86_lowmem_free(void); | |
0c530ab8 | 132 | |
2d21ac55 | 133 | thread_t Switch_context(thread_t, thread_continue_t, thread_t); |
0c530ab8 | 134 | |
2d21ac55 | 135 | #endif /* _I386_MISC_PROTOS_H_ */ |