| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: uvm_pmap.h,v 1.37 2011/06/30 00:49:14 matt Exp $ */ | | 1 | /* $NetBSD: uvm_pmap.h,v 1.38 2013/02/02 14:06:58 matt Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1991, 1993 | | 4 | * Copyright (c) 1991, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to Berkeley by | | 7 | * This code is derived from software contributed to Berkeley by |
8 | * The Mach Operating System project at Carnegie-Mellon University. | | 8 | * The Mach Operating System project at Carnegie-Mellon University. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -127,27 +127,26 @@ extern struct pmap *const kernel_pmap_pt | | | @@ -127,27 +127,26 @@ extern struct pmap *const kernel_pmap_pt |
127 | #define PMAP_WIRED 0x00000010 /* wired mapping */ | | 127 | #define PMAP_WIRED 0x00000010 /* wired mapping */ |
128 | #define PMAP_CANFAIL 0x00000020 /* can fail if resource shortage */ | | 128 | #define PMAP_CANFAIL 0x00000020 /* can fail if resource shortage */ |
129 | #if defined(PMAP_ENABLE_PMAP_KMPAGE) | | 129 | #if defined(PMAP_ENABLE_PMAP_KMPAGE) |
130 | #define PMAP_KMPAGE 0x00000040 /* [PA] page used for kernel memory */ | | 130 | #define PMAP_KMPAGE 0x00000040 /* [PA] page used for kernel memory */ |
131 | #else | | 131 | #else |
132 | #define PMAP_KMPAGE 0x00000000 | | 132 | #define PMAP_KMPAGE 0x00000000 |
133 | #endif /* PMAP_ENABLE_PMAP_KMPAGE */ | | 133 | #endif /* PMAP_ENABLE_PMAP_KMPAGE */ |
134 | | | 134 | |
135 | #define PMAP_MD_MASK 0xff000000 /* [BOTH] Machine-dependent bits */ | | 135 | #define PMAP_MD_MASK 0xff000000 /* [BOTH] Machine-dependent bits */ |
136 | #define PMAP_PROT_MASK 0x0000000f /* [BOTH] VM_PROT_* bit mask */ | | 136 | #define PMAP_PROT_MASK 0x0000000f /* [BOTH] VM_PROT_* bit mask */ |
137 | | | 137 | |
138 | #ifndef PMAP_EXCLUDE_DECLS /* Used in Sparc port to virtualize pmap mod */ | | 138 | #ifndef PMAP_EXCLUDE_DECLS /* Used in Sparc port to virtualize pmap mod */ |
139 | #ifdef _KERNEL | | 139 | #ifdef _KERNEL |
140 | __BEGIN_DECLS | | | |
141 | void pmap_activate(struct lwp *); | | 140 | void pmap_activate(struct lwp *); |
142 | void pmap_deactivate(struct lwp *); | | 141 | void pmap_deactivate(struct lwp *); |
143 | void pmap_unwire(pmap_t, vaddr_t); | | 142 | void pmap_unwire(pmap_t, vaddr_t); |
144 | | | 143 | |
145 | #if !defined(pmap_clear_modify) | | 144 | #if !defined(pmap_clear_modify) |
146 | bool pmap_clear_modify(struct vm_page *); | | 145 | bool pmap_clear_modify(struct vm_page *); |
147 | #endif | | 146 | #endif |
148 | #if !defined(pmap_clear_reference) | | 147 | #if !defined(pmap_clear_reference) |
149 | bool pmap_clear_reference(struct vm_page *); | | 148 | bool pmap_clear_reference(struct vm_page *); |
150 | #endif | | 149 | #endif |
151 | | | 150 | |
152 | #if !defined(pmap_copy) | | 151 | #if !defined(pmap_copy) |
153 | void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t); | | 152 | void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t); |
| @@ -155,27 +154,29 @@ void pmap_copy(pmap_t, pmap_t, vaddr_t, | | | @@ -155,27 +154,29 @@ void pmap_copy(pmap_t, pmap_t, vaddr_t, |
155 | #if !defined(pmap_copy_page) | | 154 | #if !defined(pmap_copy_page) |
156 | void pmap_copy_page(paddr_t, paddr_t); | | 155 | void pmap_copy_page(paddr_t, paddr_t); |
157 | #endif | | 156 | #endif |
158 | struct pmap *pmap_create(void); | | 157 | struct pmap *pmap_create(void); |
159 | void pmap_destroy(pmap_t); | | 158 | void pmap_destroy(pmap_t); |
160 | int pmap_enter(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int); | | 159 | int pmap_enter(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int); |
161 | bool pmap_extract(pmap_t, vaddr_t, paddr_t *); | | 160 | bool pmap_extract(pmap_t, vaddr_t, paddr_t *); |
162 | #if defined(PMAP_GROWKERNEL) | | 161 | #if defined(PMAP_GROWKERNEL) |
163 | vaddr_t pmap_growkernel(vaddr_t); | | 162 | vaddr_t pmap_growkernel(vaddr_t); |
164 | #endif | | 163 | #endif |
165 | | | 164 | |
166 | void pmap_init(void); | | 165 | void pmap_init(void); |
167 | | | 166 | |
| | | 167 | #if !defined(pmap_kenter_pa) |
168 | void pmap_kenter_pa(vaddr_t, paddr_t, vm_prot_t, u_int); | | 168 | void pmap_kenter_pa(vaddr_t, paddr_t, vm_prot_t, u_int); |
| | | 169 | #endif |
169 | void pmap_kremove(vaddr_t, vsize_t); | | 170 | void pmap_kremove(vaddr_t, vsize_t); |
170 | #if !defined(pmap_is_modified) | | 171 | #if !defined(pmap_is_modified) |
171 | bool pmap_is_modified(struct vm_page *); | | 172 | bool pmap_is_modified(struct vm_page *); |
172 | #endif | | 173 | #endif |
173 | #if !defined(pmap_is_referenced) | | 174 | #if !defined(pmap_is_referenced) |
174 | bool pmap_is_referenced(struct vm_page *); | | 175 | bool pmap_is_referenced(struct vm_page *); |
175 | #endif | | 176 | #endif |
176 | | | 177 | |
177 | void pmap_page_protect(struct vm_page *, vm_prot_t); | | 178 | void pmap_page_protect(struct vm_page *, vm_prot_t); |
178 | | | 179 | |
179 | #if !defined(pmap_phys_address) | | 180 | #if !defined(pmap_phys_address) |
180 | paddr_t pmap_phys_address(paddr_t); | | 181 | paddr_t pmap_phys_address(paddr_t); |
181 | #endif | | 182 | #endif |
| @@ -201,18 +202,17 @@ long pmap_wired_count(pmap_t); | | | @@ -201,18 +202,17 @@ long pmap_wired_count(pmap_t); |
201 | #endif | | 202 | #endif |
202 | #if !defined(pmap_zero_page) | | 203 | #if !defined(pmap_zero_page) |
203 | void pmap_zero_page(paddr_t); | | 204 | void pmap_zero_page(paddr_t); |
204 | #endif | | 205 | #endif |
205 | | | 206 | |
206 | void pmap_virtual_space(vaddr_t *, vaddr_t *); | | 207 | void pmap_virtual_space(vaddr_t *, vaddr_t *); |
207 | #if defined(PMAP_STEAL_MEMORY) | | 208 | #if defined(PMAP_STEAL_MEMORY) |
208 | vaddr_t pmap_steal_memory(vsize_t, vaddr_t *, vaddr_t *); | | 209 | vaddr_t pmap_steal_memory(vsize_t, vaddr_t *, vaddr_t *); |
209 | #endif | | 210 | #endif |
210 | | | 211 | |
211 | #if defined(PMAP_FORK) | | 212 | #if defined(PMAP_FORK) |
212 | void pmap_fork(pmap_t, pmap_t); | | 213 | void pmap_fork(pmap_t, pmap_t); |
213 | #endif | | 214 | #endif |
214 | __END_DECLS | | | |
215 | #endif /* kernel*/ | | 215 | #endif /* kernel*/ |
216 | #endif /* PMAP_EXCLUDE_DECLS */ | | 216 | #endif /* PMAP_EXCLUDE_DECLS */ |
217 | | | 217 | |
218 | #endif /* _PMAP_VM_ */ | | 218 | #endif /* _PMAP_VM_ */ |