| 1 | /*	$OpenBSD: uvm_extern.h,v 1.187 2025/11/13 10:55:51 mpi Exp $	*/ |
| 2 | /*	$NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $	*/ |
| 3 | |
| 4 | /* |
| 5 | * Copyright (c) 1997 Charles D. Cranor and Washington University. |
| 6 | * All rights reserved. |
| 7 | * |
| 8 | * Redistribution and use in source and binary forms, with or without |
| 9 | * modification, are permitted provided that the following conditions |
| 10 | * are met: |
| 11 | * 1. Redistributions of source code must retain the above copyright |
| 12 | * notice, this list of conditions and the following disclaimer. |
| 13 | * 2. Redistributions in binary form must reproduce the above copyright |
| 14 | * notice, this list of conditions and the following disclaimer in the |
| 15 | * documentation and/or other materials provided with the distribution. |
| 16 | * |
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
| 28 | |
| 29 | /*- |
| 30 | * Copyright (c) 1991, 1992, 1993 |
| 31 | *	The Regents of the University of California. All rights reserved. |
| 32 | * |
| 33 | * Redistribution and use in source and binary forms, with or without |
| 34 | * modification, are permitted provided that the following conditions |
| 35 | * are met: |
| 36 | * 1. Redistributions of source code must retain the above copyright |
| 37 | * notice, this list of conditions and the following disclaimer. |
| 38 | * 2. Redistributions in binary form must reproduce the above copyright |
| 39 | * notice, this list of conditions and the following disclaimer in the |
| 40 | * documentation and/or other materials provided with the distribution. |
| 41 | * 3. Neither the name of the University nor the names of its contributors |
| 42 | * may be used to endorse or promote products derived from this software |
| 43 | * without specific prior written permission. |
| 44 | * |
| 45 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 46 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 47 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 48 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 49 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 50 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 51 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 52 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 54 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 55 | * SUCH DAMAGE. |
| 56 | * |
| 57 | *	@(#)vm_extern.h	8.5 (Berkeley) 5/3/95 |
| 58 | */ |
| 59 | |
| 60 | #ifndef _UVM_UVM_EXTERN_H_ |
| 61 | #define _UVM_UVM_EXTERN_H_ |
| 62 | |
| 63 | typedef int vm_fault_t; |
| 64 | |
| 65 | typedef int vm_inherit_t;	/* XXX: inheritance codes */ |
| 66 | typedef off_t voff_t;		/* XXX: offset within a uvm_object */ |
| 67 | |
| 68 | struct vm_map_entry; |
| 69 | typedef struct vm_map_entry *vm_map_entry_t; |
| 70 | |
| 71 | struct vm_map; |
| 72 | typedef struct vm_map *vm_map_t; |
| 73 | |
| 74 | struct vm_page; |
| 75 | typedef struct vm_page *vm_page_t; |
| 76 | |
| 77 | /* |
| 78 | * Bit assignments assigned by UVM_MAPFLAG() and extracted by |
| 79 | * UVM_{PROTECTION,INHERIT,MAXPROTECTION,ADVICE}(): |
| 80 | * bits 0-2	protection |
| 81 | * bit 3	 unused |
| 82 | * bits 4-5	inheritance |
| 83 | * bits 6-7	 unused |
| 84 | * bits 8-10	max protection |
| 85 | * bit 11	 unused |
| 86 | * bits 12-14	advice |
| 87 | * bit 15	 unused |
| 88 | * bits 16-N	flags |
| 89 | */ |
| 90 | |
| 91 | /* protections bits */ |
| 92 | #define PROT_MASK	(PROT_READ | PROT_WRITE | PROT_EXEC) |
| 93 | |
| 94 | /* inherit codes */ |
| 95 | #define MAP_INHERIT_MASK	0x3	/* inherit mask */ |
| 96 | |
| 97 | typedef int		vm_prot_t; |
| 98 | |
| 99 | #define MADV_MASK	0x7	/* mask */ |
| 100 | |
| 101 | /* mapping flags */ |
| 102 | #define UVM_FLAG_FIXED 0x0010000 /* find space */ |
| 103 | #define UVM_FLAG_OVERLAY 0x0020000 /* establish overlay */ |
| 104 | #define UVM_FLAG_NOMERGE 0x0040000 /* don't merge map entries */ |
| 105 | #define UVM_FLAG_COPYONW 0x0080000 /* set copy_on_write flag */ |
| 106 | #define UVM_FLAG_TRYLOCK 0x0100000 /* fail if we can not lock map */ |
| 107 | #define UVM_FLAG_HOLE 0x0200000 /* no backend */ |
| 108 | #define UVM_FLAG_QUERY 0x0400000 /* do everything, except actual execution */ |
| 109 | #define UVM_FLAG_NOFAULT 0x0800000 /* don't fault */ |
| 110 | #define UVM_FLAG_UNMAP 0x1000000 /* unmap to make space */ |
| 111 | #define UVM_FLAG_STACK 0x2000000 /* page may contain a stack */ |
| 112 | #define UVM_FLAG_WC 0x4000000 /* write combining */ |
| 113 | #define UVM_FLAG_CONCEAL 0x8000000 /* omit from dumps */ |
| 114 | #define UVM_FLAG_SIGALTSTACK 0x20000000 /* sigaltstack validation required */ |
| 115 | |
| 116 | /* macros to extract info */ |
| 117 | #define UVM_PROTECTION(X)	((X) & PROT_MASK) |
| 118 | #define UVM_INHERIT(X)		(((X) >> 4) & MAP_INHERIT_MASK) |
| 119 | #define UVM_MAXPROTECTION(X)	(((X) >> 8) & PROT_MASK) |
| 120 | #define UVM_ADVICE(X)		(((X) >> 12) & MADV_MASK) |
| 121 | |
| 122 | #define UVM_MAPFLAG(prot, maxprot, inh, advice, flags) \ |
| 123 | 	((prot) | ((maxprot) << 8) | ((inh) << 4) | ((advice) << 12) | (flags)) |
| 124 | |
| 125 | /* magic offset value */ |
| 126 | #define UVM_UNKNOWN_OFFSET ((voff_t) -1) |
| 127 | 				/* offset not known(obj) or don't care(!obj) */ |
| 128 | |
| 129 | /* |
| 130 | * flags for uvm_pagealloc() |
| 131 | */ |
| 132 | #define UVM_PGA_USERESERVE	0x0001	/* ok to use reserve pages */ |
| 133 | #define	UVM_PGA_ZERO		0x0002	/* returned page must be zeroed */ |
| 134 | |
| 135 | /* |
| 136 | * flags for uvm_pglistalloc() also used by uvm_pmr_getpages() |
| 137 | */ |
| 138 | #define UVM_PLA_WAITOK		0x0001	/* may sleep */ |
| 139 | #define UVM_PLA_NOWAIT		0x0002	/* can't sleep (need one of the two) */ |
| 140 | #define UVM_PLA_ZERO		0x0004	/* zero all pages before returning */ |
| 141 | #define UVM_PLA_TRYCONTIG	0x0008	/* try to allocate contig physmem */ |
| 142 | #define UVM_PLA_FAILOK		0x0010	/* caller can handle failure */ |
| 143 | #define UVM_PLA_NOWAKE		0x0020	/* don't wake page daemon on failure */ |
| 144 | #define UVM_PLA_USERESERVE	0x0040	/* can allocate from kernel reserve */ |
| 145 | |
| 146 | /* |
| 147 | * lockflags that control the locking behavior of various functions. |
| 148 | */ |
| 149 | #define	UVM_LK_ENTER	0x00000001	/* map locked on entry */ |
| 150 | #define	UVM_LK_EXIT	0x00000002	/* leave map locked on exit */ |
| 151 | |
| 152 | /* |
| 153 | * flags to uvm_page_physload. |
| 154 | */ |
| 155 | #define	PHYSLOAD_DEVICE	0x01	/* don't add to the page queue */ |
| 156 | |
| 157 | #include <sys/queue.h> |
| 158 | #include <sys/tree.h> |
| 159 | #include <sys/mman.h> |
| 160 | |
| 161 | #ifdef _KERNEL |
| 162 | struct buf; |
| 163 | struct pglist; |
| 164 | struct vmspace; |
| 165 | struct pmap; |
| 166 | #endif |
| 167 | |
| 168 | #include <uvm/uvm_param.h> |
| 169 | |
| 170 | #include <uvm/uvm_pmap.h> |
| 171 | #include <uvm/uvm_object.h> |
| 172 | #include <uvm/uvm_page.h> |
| 173 | #include <uvm/uvm_map.h> |
| 174 | |
| 175 | #ifdef _KERNEL |
| 176 | #include <uvm/uvm_fault.h> |
| 177 | #include <uvm/uvm_pager.h> |
| 178 | #endif |
| 179 | |
| 180 | /* |
| 181 | * Shareable process virtual address space. |
| 182 | * May eventually be merged with vm_map. |
| 183 | * Several fields are temporary (text, data stuff). |
| 184 | * |
| 185 | * Locks used to protect struct members in this file: |
| 186 | *	K	kernel lock |
| 187 | *	I	immutable after creation |
| 188 | *	a	atomic operations |
| 189 | *	v	vm_map's lock |
| 190 | */ |
| 191 | struct vmspace { |
| 192 | 	struct	vm_map vm_map;	/* VM address map */ |
| 193 | 	int	vm_refcnt;	/* [a] number of references */ |
| 194 | 	caddr_t	vm_shm;		/* SYS5 shared memory private data XXX */ |
| 195 | /* we copy from vm_startcopy to the end of the structure on fork */ |
| 196 | #define vm_startcopy vm_rssize |
| 197 | 	segsz_t vm_rssize; 	/* current resident set size in pages */ |
| 198 | 	segsz_t vm_swrss;	/* resident set size before last swap */ |
| 199 | 	segsz_t vm_tsize;	/* text size (pages) XXX */ |
| 200 | 	segsz_t vm_dsize;	/* data size (pages) XXX */ |
| 201 | 	segsz_t vm_dused;	/* data segment length (pages) XXX */ |
| 202 | 	segsz_t vm_ssize;	/* [v] stack size (pages) */ |
| 203 | 	caddr_t	vm_taddr;	/* [I] user virtual address of text */ |
| 204 | 	caddr_t	vm_daddr;	/* [I] user virtual address of data */ |
| 205 | 	caddr_t vm_maxsaddr;	/* [I] user VA at max stack growth */ |
| 206 | 	caddr_t vm_minsaddr;	/* [I] user VA at top of stack */ |
| 207 | }; |
| 208 | |
| 209 | /* |
| 210 | * uvm_constraint_range's: |
| 211 | * MD code is allowed to setup constraint ranges for memory allocators, the |
| 212 | * primary use for this is to keep allocation for certain memory consumers |
| 213 | * such as mbuf pools within address ranges that are reachable by devices |
| 214 | * that perform DMA. |
| 215 | * |
| 216 | * It is also to discourage memory allocations from being satisfied from ranges |
| 217 | * such as the ISA memory range, if they can be satisfied with allocation |
| 218 | * from other ranges. |
| 219 | * |
| 220 | * the MD ranges are defined in arch/ARCH/ARCH/machdep.c |
| 221 | */ |
| 222 | struct uvm_constraint_range { |
| 223 | 	paddr_t	ucr_low; |
| 224 | 	paddr_t ucr_high; |
| 225 | }; |
| 226 | |
| 227 | #ifdef _KERNEL |
| 228 | |
| 229 | #include <uvm/uvmexp.h> |
| 230 | extern struct uvmexp uvmexp; |
| 231 | |
| 232 | /* Constraint ranges, set by MD code. */ |
| 233 | extern struct uvm_constraint_range isa_constraint; |
| 234 | extern struct uvm_constraint_range dma_constraint; |
| 235 | extern struct uvm_constraint_range no_constraint; |
| 236 | extern struct uvm_constraint_range *uvm_md_constraints[]; |
| 237 | |
| 238 | /* |
| 239 | * the various kernel maps, owned by MD code |
| 240 | */ |
| 241 | extern struct vm_map *exec_map; |
| 242 | extern struct vm_map *kernel_map; |
| 243 | extern struct vm_map *kmem_map; |
| 244 | extern struct vm_map *phys_map; |
| 245 | |
| 246 | /* base of kernel virtual memory */ |
| 247 | extern vaddr_t vm_min_kernel_address; |
| 248 | |
| 249 | #define vm_resident_count(vm) (pmap_resident_count((vm)->vm_map.pmap)) |
| 250 | |
| 251 | struct plimit; |
| 252 | |
| 253 | void			vmapbuf(struct buf *, vsize_t); |
| 254 | void			vunmapbuf(struct buf *, vsize_t); |
| 255 | struct uvm_object	*uao_create(vsize_t, int); |
| 256 | void			uao_detach(struct uvm_object *); |
| 257 | void			uao_reference(struct uvm_object *); |
| 258 | int			uvm_fault(vm_map_t, vaddr_t, vm_fault_t, vm_prot_t); |
| 259 | |
| 260 | vaddr_t			uvm_uarea_alloc(void); |
| 261 | void			uvm_uarea_free(struct proc *); |
| 262 | void			uvm_purge(void); |
| 263 | void			uvm_exit(struct process *); |
| 264 | void			uvm_init_limits(struct plimit *); |
| 265 | boolean_t		uvm_kernacc(caddr_t, size_t, int); |
| 266 | |
| 267 | int			uvm_vslock(struct proc *, caddr_t, size_t, |
| 268 | 			 vm_prot_t); |
| 269 | void			uvm_vsunlock(struct proc *, caddr_t, size_t); |
| 270 | int			uvm_vslock_device(struct proc *, void *, size_t, |
| 271 | 			 vm_prot_t, void **); |
| 272 | void			uvm_vsunlock_device(struct proc *, void *, size_t, |
| 273 | 			 void *); |
| 274 | void			uvm_init(void);	 |
| 275 | void			uvm_init_percpu(void); |
| 276 | int			uvm_io(vm_map_t, struct uio *, int); |
| 277 | |
| 278 | #define	UVM_IO_FIXPROT	0x01 |
| 279 | |
| 280 | struct vm_map		*uvm_km_suballoc(vm_map_t, vaddr_t *, vaddr_t *, |
| 281 | 			 vsize_t, int, boolean_t, vm_map_t); |
| 282 | /* |
| 283 | * Allocation mode for virtual space. |
| 284 | * |
| 285 | * kv_map - pointer to the pointer to the map we're allocating from. |
| 286 | * kv_align - alignment. |
| 287 | * kv_wait - wait for free space in the map if it's full. The default |
| 288 | * allocators don't wait since running out of space in kernel_map and |
| 289 | * kmem_map is usually fatal. Special maps like exec_map are specifically |
| 290 | * limited, so waiting for space in them is necessary. |
| 291 | * kv_singlepage - use the single page allocator. |
| 292 | * kv_executable - map the physical pages with PROT_EXEC. |
| 293 | */ |
| 294 | struct kmem_va_mode { |
| 295 | 	struct vm_map **kv_map; |
| 296 | 	vsize_t kv_align; |
| 297 | 	char kv_wait; |
| 298 | 	char kv_singlepage; |
| 299 | }; |
| 300 | |
| 301 | /* |
| 302 | * Allocation mode for physical pages. |
| 303 | * |
| 304 | * kp_constraint - allocation constraint for physical pages. |
| 305 | * kp_object - if the pages should be allocated from an object. |
| 306 | * kp_align - physical alignment of the first page in the allocation. |
| 307 | * kp_boundary - boundary that the physical addresses can't cross if |
| 308 | * the allocation is contiguous. |
| 309 | * kp_nomem - don't allocate any backing pages. |
| 310 | * kp_maxseg - maximal amount of contiguous segments. |
| 311 | * kp_zero - zero the returned memory. |
| 312 | * kp_pageable - allocate pageable memory. |
| 313 | */ |
| 314 | struct kmem_pa_mode { |
| 315 | 	struct uvm_constraint_range *kp_constraint; |
| 316 | 	struct uvm_object **kp_object; |
| 317 | 	paddr_t kp_align; |
| 318 | 	paddr_t kp_boundary; |
| 319 | 	int kp_maxseg; |
| 320 | 	char kp_nomem; |
| 321 | 	char kp_zero; |
| 322 | 	char kp_pageable; |
| 323 | }; |
| 324 | |
| 325 | /* |
| 326 | * Dynamic allocation parameters. Stuff that changes too often or too much |
| 327 | * to create separate va and pa modes for. |
| 328 | * |
| 329 | * kd_waitok - is it ok to sleep? |
| 330 | * kd_trylock - don't sleep on map locks. |
| 331 | * kd_prefer - offset to feed to PMAP_PREFER |
| 332 | * kd_slowdown - special parameter for the singlepage va allocator |
| 333 | * that tells the caller to sleep if possible to let the singlepage |
| 334 | * allocator catch up. |
| 335 | */ |
| 336 | struct kmem_dyn_mode { |
| 337 | 	voff_t kd_prefer; |
| 338 | 	int *kd_slowdown; |
| 339 | 	char kd_waitok; |
| 340 | 	char kd_trylock; |
| 341 | }; |
| 342 | |
| 343 | #define KMEM_DYN_INITIALIZER { UVM_UNKNOWN_OFFSET, NULL, 0, 0 } |
| 344 | |
| 345 | /* |
| 346 | * Notice that for kv_ waiting has a different meaning. It's only supposed |
| 347 | * to be used for very space constrained maps where waiting is a way |
| 348 | * to throttle some other operation. |
| 349 | * The exception is kv_page which needs to wait relatively often. |
| 350 | * All kv_ except kv_intrsafe will potentially sleep. |
| 351 | */ |
| 352 | extern const struct kmem_va_mode kv_any; |
| 353 | extern const struct kmem_va_mode kv_intrsafe; |
| 354 | extern const struct kmem_va_mode kv_page; |
| 355 | |
| 356 | extern const struct kmem_pa_mode kp_dirty; |
| 357 | extern const struct kmem_pa_mode kp_zero; |
| 358 | extern const struct kmem_pa_mode kp_dma; |
| 359 | extern const struct kmem_pa_mode kp_dma_contig; |
| 360 | extern const struct kmem_pa_mode kp_dma_zero; |
| 361 | extern const struct kmem_pa_mode kp_pageable; |
| 362 | extern const struct kmem_pa_mode kp_none; |
| 363 | |
| 364 | extern const struct kmem_dyn_mode kd_waitok; |
| 365 | extern const struct kmem_dyn_mode kd_nowait; |
| 366 | extern const struct kmem_dyn_mode kd_trylock; |
| 367 | |
| 368 | void			*km_alloc(size_t, const struct kmem_va_mode *, |
| 369 | 			 const struct kmem_pa_mode *, |
| 370 | 			 const struct kmem_dyn_mode *); |
| 371 | void			km_free(void *, size_t, const struct kmem_va_mode *, |
| 372 | 			 const struct kmem_pa_mode *); |
| 373 | int			uvm_map(vm_map_t, vaddr_t *, vsize_t, |
| 374 | 			 struct uvm_object *, voff_t, vsize_t, unsigned int); |
| 375 | int			uvm_mapanon(vm_map_t, vaddr_t *, vsize_t, vsize_t, unsigned int); |
| 376 | int			uvm_map_pageable(vm_map_t, vaddr_t, |
| 377 | 			 vaddr_t, boolean_t, int); |
| 378 | int			uvm_map_pageable_all(vm_map_t, int, vsize_t); |
| 379 | boolean_t		uvm_map_checkprot(vm_map_t, vaddr_t, |
| 380 | 			 vaddr_t, vm_prot_t); |
| 381 | int			uvm_map_protect(vm_map_t, vaddr_t, |
| 382 | 			 vaddr_t, vm_prot_t, int etype, boolean_t, boolean_t); |
| 383 | struct vmspace		*uvmspace_alloc(vaddr_t, vaddr_t, |
| 384 | 			 boolean_t, boolean_t); |
| 385 | void			uvmspace_init(struct vmspace *, struct pmap *, |
| 386 | 			 vaddr_t, vaddr_t, boolean_t, boolean_t); |
| 387 | void			uvmspace_exec(struct proc *, vaddr_t, vaddr_t); |
| 388 | struct vmspace		*uvmspace_fork(struct process *); |
| 389 | void			uvmspace_addref(struct vmspace *); |
| 390 | void			uvmspace_purge(struct vmspace *); |
| 391 | void			uvmspace_free(struct vmspace *); |
| 392 | struct vmspace		*uvmspace_share(struct process *); |
| 393 | int			uvm_sysctl(int *, u_int, void *, size_t *, |
| 394 | 			 void *, size_t, struct proc *); |
| 395 | struct vm_page		*uvm_pagealloc(struct uvm_object *, |
| 396 | 			 voff_t, struct vm_anon *, int); |
| 397 | int			uvm_pagealloc_multi(struct uvm_object *, voff_t, |
| 398 | 			 vsize_t, int); |
| 399 | void			uvm_pagerealloc(struct vm_page *, |
| 400 | 			 struct uvm_object *, voff_t); |
| 401 | int			uvm_pagerealloc_multi(struct uvm_object *, voff_t, |
| 402 | 			 vsize_t, int, struct uvm_constraint_range *); |
| 403 | /* Actually, uvm_page_physload takes PF#s which need their own type */ |
| 404 | void			uvm_page_physload(paddr_t, paddr_t, paddr_t, |
| 405 | 			 paddr_t, int); |
| 406 | void			uvm_setpagesize(void); |
| 407 | void			uvm_shutdown(void); |
| 408 | void			uvm_aio_biodone(struct buf *); |
| 409 | void			uvm_aio_aiodone(struct buf *); |
| 410 | void			uvm_pageout(void *); |
| 411 | void			uvm_aiodone_daemon(void *); |
| 412 | void			uvm_wait(const char *); |
| 413 | int			uvm_pglistalloc(psize_t, paddr_t, paddr_t, |
| 414 | 			 paddr_t, paddr_t, struct pglist *, int, int); |
| 415 | void			uvm_pglistfree(struct pglist *); |
| 416 | void			uvm_pmr_use_inc(paddr_t, paddr_t); |
| 417 | void			uvm_swap_init(void); |
| 418 | typedef int		uvm_coredump_setup_cb(int _nsegment, void *_cookie); |
| 419 | typedef int		uvm_coredump_walk_cb(vaddr_t _start, vaddr_t _realend, |
| 420 | 			 vaddr_t _end, vm_prot_t _prot, int _isvnode, |
| 421 | 			 int _nsegment, void *_cookie); |
| 422 | int			uvm_coredump_walkmap(struct proc *_p, |
| 423 | 			 uvm_coredump_setup_cb *_setup, |
| 424 | 			 uvm_coredump_walk_cb *_walk, void *_cookie); |
| 425 | void			uvm_grow(struct proc *, vaddr_t); |
| 426 | void			uvm_pagezero_thread(void *); |
| 427 | void			kmeminit_nkmempages(void); |
| 428 | void			kmeminit(void); |
| 429 | extern u_int		nkmempages; |
| 430 | |
| 431 | struct process; |
| 432 | struct kinfo_vmentry; |
| 433 | int			fill_vmmap(struct process *, struct kinfo_vmentry *, |
| 434 | 			 size_t *); |
| 435 | |
| 436 | #endif /* _KERNEL */ |
| 437 | |
| 438 | #endif /* _UVM_UVM_EXTERN_H_ */ |