]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/memory_object_types.h
1b6254a05ecdfb3d66d1c744b2654991a0b5c494
[apple/xnu.git] / osfmk / mach / memory_object_types.h
1 /*
2 * Copyright (c) 2000-2005 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 * Mach Operating System
27 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
28 * All Rights Reserved.
29 *
30 * Permission to use, copy, modify and distribute this software and its
31 * documentation is hereby granted, provided that both the copyright
32 * notice and this permission notice appear in all copies of the
33 * software, derivative works or modified versions, and any portions
34 * thereof, and that both notices appear in supporting documentation.
35 *
36 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
37 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
38 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
39 *
40 * Carnegie Mellon requests users of this software to return to
41 *
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
46 *
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
49 */
50 /*
51 */
52 /*
53 * File: memory_object.h
54 * Author: Michael Wayne Young
55 *
56 * External memory management interface definition.
57 */
58
59 #ifndef _MACH_MEMORY_OBJECT_TYPES_H_
60 #define _MACH_MEMORY_OBJECT_TYPES_H_
61
62 /*
63 * User-visible types used in the external memory
64 * management interface:
65 */
66
67 #include <mach/port.h>
68 #include <mach/message.h>
69 #include <mach/vm_prot.h>
70 #include <mach/vm_sync.h>
71 #include <mach/vm_types.h>
72 #include <mach/machine/vm_types.h>
73
74 #include <sys/cdefs.h>
75
76 #define VM_64_BIT_DATA_OBJECTS
77
78 typedef unsigned long long memory_object_offset_t;
79 typedef unsigned long long memory_object_size_t;
80 typedef natural_t memory_object_cluster_size_t;
81
82
83 /*
84 * Temporary until real EMMI version gets re-implemented
85 */
86
87 #ifdef KERNEL_PRIVATE
88
89 struct memory_object_pager_ops; /* forward declaration */
90
91 typedef struct memory_object {
92 const struct memory_object_pager_ops *mo_pager_ops;
93 } *memory_object_t;
94
95 typedef struct memory_object_control {
96 struct vm_object *moc_object;
97 unsigned int moc_ikot; /* XXX fake ip_kotype */
98 } *memory_object_control_t;
99
100 typedef const struct memory_object_pager_ops {
101 void (*memory_object_reference)(
102 memory_object_t mem_obj);
103 void (*memory_object_deallocate)(
104 memory_object_t mem_obj);
105 kern_return_t (*memory_object_init)(
106 memory_object_t mem_obj,
107 memory_object_control_t mem_control,
108 memory_object_cluster_size_t size);
109 kern_return_t (*memory_object_terminate)(
110 memory_object_t mem_obj);
111 kern_return_t (*memory_object_data_request)(
112 memory_object_t mem_obj,
113 memory_object_offset_t offset,
114 memory_object_cluster_size_t length,
115 vm_prot_t desired_access);
116 kern_return_t (*memory_object_data_return)(
117 memory_object_t mem_obj,
118 memory_object_offset_t offset,
119 vm_size_t size,
120 memory_object_offset_t *resid_offset,
121 int *io_error,
122 boolean_t dirty,
123 boolean_t kernel_copy,
124 int upl_flags);
125 kern_return_t (*memory_object_data_initialize)(
126 memory_object_t mem_obj,
127 memory_object_offset_t offset,
128 vm_size_t size);
129 kern_return_t (*memory_object_data_unlock)(
130 memory_object_t mem_obj,
131 memory_object_offset_t offset,
132 vm_size_t size,
133 vm_prot_t desired_access);
134 kern_return_t (*memory_object_synchronize)(
135 memory_object_t mem_obj,
136 memory_object_offset_t offset,
137 vm_size_t size,
138 vm_sync_t sync_flags);
139 kern_return_t (*memory_object_unmap)(
140 memory_object_t mem_obj);
141 const char *memory_object_pager_name;
142 } * memory_object_pager_ops_t;
143
144 #else /* KERNEL_PRIVATE */
145
146 typedef mach_port_t memory_object_t;
147 typedef mach_port_t memory_object_control_t;
148
149 #endif /* KERNEL_PRIVATE */
150
151 typedef memory_object_t *memory_object_array_t;
152 /* A memory object ... */
153 /* Used by the kernel to retrieve */
154 /* or store data */
155
156 typedef mach_port_t memory_object_name_t;
157 /* Used to describe the memory ... */
158 /* object in vm_regions() calls */
159
160 typedef mach_port_t memory_object_default_t;
161 /* Registered with the host ... */
162 /* for creating new internal objects */
163
164 #define MEMORY_OBJECT_NULL ((memory_object_t) 0)
165 #define MEMORY_OBJECT_CONTROL_NULL ((memory_object_control_t) 0)
166 #define MEMORY_OBJECT_NAME_NULL ((memory_object_name_t) 0)
167 #define MEMORY_OBJECT_DEFAULT_NULL ((memory_object_default_t) 0)
168
169
170 typedef int memory_object_copy_strategy_t;
171 /* How memory manager handles copy: */
172 #define MEMORY_OBJECT_COPY_NONE 0
173 /* ... No special support */
174 #define MEMORY_OBJECT_COPY_CALL 1
175 /* ... Make call on memory manager */
176 #define MEMORY_OBJECT_COPY_DELAY 2
177 /* ... Memory manager doesn't
178 * change data externally.
179 */
180 #define MEMORY_OBJECT_COPY_TEMPORARY 3
181 /* ... Memory manager doesn't
182 * change data externally, and
183 * doesn't need to see changes.
184 */
185 #define MEMORY_OBJECT_COPY_SYMMETRIC 4
186 /* ... Memory manager doesn't
187 * change data externally,
188 * doesn't need to see changes,
189 * and object will not be
190 * multiply mapped.
191 *
192 * XXX
193 * Not yet safe for non-kernel use.
194 */
195
196 #define MEMORY_OBJECT_COPY_INVALID 5
197 /* ... An invalid copy strategy,
198 * for external objects which
199 * have not been initialized.
200 * Allows copy_strategy to be
201 * examined without also
202 * examining pager_ready and
203 * internal.
204 */
205
206 typedef int memory_object_return_t;
207 /* Which pages to return to manager
208 this time (lock_request) */
209 #define MEMORY_OBJECT_RETURN_NONE 0
210 /* ... don't return any. */
211 #define MEMORY_OBJECT_RETURN_DIRTY 1
212 /* ... only dirty pages. */
213 #define MEMORY_OBJECT_RETURN_ALL 2
214 /* ... dirty and precious pages. */
215 #define MEMORY_OBJECT_RETURN_ANYTHING 3
216 /* ... any resident page. */
217
218 /*
219 * Data lock request flags
220 */
221
222 #define MEMORY_OBJECT_DATA_FLUSH 0x1
223 #define MEMORY_OBJECT_DATA_NO_CHANGE 0x2
224 #define MEMORY_OBJECT_DATA_PURGE 0x4
225 #define MEMORY_OBJECT_COPY_SYNC 0x8
226 #define MEMORY_OBJECT_DATA_SYNC 0x10
227 #define MEMORY_OBJECT_IO_SYNC 0x20
228
229 /*
230 * Types for the memory object flavor interfaces
231 */
232
233 #define MEMORY_OBJECT_INFO_MAX (1024)
234 typedef int *memory_object_info_t;
235 typedef int memory_object_flavor_t;
236 typedef int memory_object_info_data_t[MEMORY_OBJECT_INFO_MAX];
237
238
239 #define MEMORY_OBJECT_PERFORMANCE_INFO 11
240 #define MEMORY_OBJECT_ATTRIBUTE_INFO 14
241 #define MEMORY_OBJECT_BEHAVIOR_INFO 15
242
243 #ifdef PRIVATE
244
245 #define OLD_MEMORY_OBJECT_BEHAVIOR_INFO 10
246 #define OLD_MEMORY_OBJECT_ATTRIBUTE_INFO 12
247
248 struct old_memory_object_behave_info {
249 memory_object_copy_strategy_t copy_strategy;
250 boolean_t temporary;
251 boolean_t invalidate;
252 };
253
254 struct old_memory_object_attr_info { /* old attr list */
255 boolean_t object_ready;
256 boolean_t may_cache;
257 memory_object_copy_strategy_t copy_strategy;
258 };
259
260 typedef struct old_memory_object_behave_info *old_memory_object_behave_info_t;
261 typedef struct old_memory_object_behave_info old_memory_object_behave_info_data_t;
262 typedef struct old_memory_object_attr_info *old_memory_object_attr_info_t;
263 typedef struct old_memory_object_attr_info old_memory_object_attr_info_data_t;
264
265 #define OLD_MEMORY_OBJECT_BEHAVE_INFO_COUNT ((mach_msg_type_number_t) \
266 (sizeof(old_memory_object_behave_info_data_t)/sizeof(int)))
267 #define OLD_MEMORY_OBJECT_ATTR_INFO_COUNT ((mach_msg_type_number_t) \
268 (sizeof(old_memory_object_attr_info_data_t)/sizeof(int)))
269
270 #ifdef KERNEL
271
272 __BEGIN_DECLS
273 extern void memory_object_reference(memory_object_t object);
274 extern void memory_object_deallocate(memory_object_t object);
275
276 extern void memory_object_default_reference(memory_object_default_t);
277 extern void memory_object_default_deallocate(memory_object_default_t);
278
279 extern void memory_object_control_reference(memory_object_control_t control);
280 extern void memory_object_control_deallocate(memory_object_control_t control);
281 extern int memory_object_control_uiomove(memory_object_control_t, memory_object_offset_t, void *, int, int, int);
282 __END_DECLS
283
284 #endif /* KERNEL */
285
286 #endif /* PRIVATE */
287
288 struct memory_object_perf_info {
289 memory_object_cluster_size_t cluster_size;
290 boolean_t may_cache;
291 };
292
293 struct memory_object_attr_info {
294 memory_object_copy_strategy_t copy_strategy;
295 memory_object_cluster_size_t cluster_size;
296 boolean_t may_cache_object;
297 boolean_t temporary;
298 };
299
300 struct memory_object_behave_info {
301 memory_object_copy_strategy_t copy_strategy;
302 boolean_t temporary;
303 boolean_t invalidate;
304 boolean_t silent_overwrite;
305 boolean_t advisory_pageout;
306 };
307
308
309 typedef struct memory_object_behave_info *memory_object_behave_info_t;
310 typedef struct memory_object_behave_info memory_object_behave_info_data_t;
311
312 typedef struct memory_object_perf_info *memory_object_perf_info_t;
313 typedef struct memory_object_perf_info memory_object_perf_info_data_t;
314
315 typedef struct memory_object_attr_info *memory_object_attr_info_t;
316 typedef struct memory_object_attr_info memory_object_attr_info_data_t;
317
318 #define MEMORY_OBJECT_BEHAVE_INFO_COUNT ((mach_msg_type_number_t) \
319 (sizeof(memory_object_behave_info_data_t)/sizeof(int)))
320 #define MEMORY_OBJECT_PERF_INFO_COUNT ((mach_msg_type_number_t) \
321 (sizeof(memory_object_perf_info_data_t)/sizeof(int)))
322 #define MEMORY_OBJECT_ATTR_INFO_COUNT ((mach_msg_type_number_t) \
323 (sizeof(memory_object_attr_info_data_t)/sizeof(int)))
324
325 #define invalid_memory_object_flavor(f) \
326 (f != MEMORY_OBJECT_ATTRIBUTE_INFO && \
327 f != MEMORY_OBJECT_PERFORMANCE_INFO && \
328 f != OLD_MEMORY_OBJECT_BEHAVIOR_INFO && \
329 f != MEMORY_OBJECT_BEHAVIOR_INFO && \
330 f != OLD_MEMORY_OBJECT_ATTRIBUTE_INFO)
331
332
333 /*
334 * Used to support options on memory_object_release_name call
335 */
336 #define MEMORY_OBJECT_TERMINATE_IDLE 0x1
337 #define MEMORY_OBJECT_RESPECT_CACHE 0x2
338 #define MEMORY_OBJECT_RELEASE_NO_OP 0x4
339
340
341 /* named entry processor mapping options */
342 /* enumerated */
343 #define MAP_MEM_NOOP 0
344 #define MAP_MEM_COPYBACK 1
345 #define MAP_MEM_IO 2
346 #define MAP_MEM_WTHRU 3
347 #define MAP_MEM_WCOMB 4 /* Write combining mode */
348 /* aka store gather */
349
350 #define GET_MAP_MEM(flags) \
351 ((((unsigned int)(flags)) >> 24) & 0xFF)
352
353 #define SET_MAP_MEM(caching, flags) \
354 ((flags) = ((((unsigned int)(caching)) << 24) \
355 & 0xFF000000) | ((flags) & 0xFFFFFF));
356
357 /* leave room for vm_prot bits */
358 #define MAP_MEM_ONLY 0x10000 /* change processor caching */
359 #define MAP_MEM_NAMED_CREATE 0x20000 /* create extant object */
360 #define MAP_MEM_PURGABLE 0x40000 /* create a purgable VM object */
361 #define MAP_MEM_NAMED_REUSE 0x80000 /* reuse provided entry if identical */
362
363 #ifdef KERNEL
364
365 /*
366 * Universal Page List data structures
367 *
368 * A UPL describes a bounded set of physical pages
369 * associated with some range of an object or map
370 * and a snapshot of the attributes associated with
371 * each of those pages.
372 */
373 #ifdef PRIVATE
374 #define MAX_UPL_TRANSFER 256
375
376 struct upl_page_info {
377 ppnum_t phys_addr; /* physical page index number */
378 unsigned int
379 #ifdef XNU_KERNEL_PRIVATE
380 pageout:1, /* page is to be removed on commit */
381 absent:1, /* No valid data in this page */
382 dirty:1, /* Page must be cleaned (O) */
383 precious:1, /* must be cleaned, we have only copy */
384 device:1, /* no page data, mapped dev memory */
385 :0; /* force to long boundary */
386 #else
387 opaque; /* use upl_page_xxx() accessor funcs */
388 #endif /* XNU_KERNEL_PRIVATE */
389 };
390
391 #else
392
393 struct upl_page_info {
394 unsigned int opaque[2]; /* use upl_page_xxx() accessor funcs */
395 };
396
397 #endif /* PRIVATE */
398
399 typedef struct upl_page_info upl_page_info_t;
400 typedef upl_page_info_t *upl_page_info_array_t;
401 typedef upl_page_info_array_t upl_page_list_ptr_t;
402
403 typedef uint32_t upl_offset_t; /* page-aligned byte offset */
404 typedef uint32_t upl_size_t; /* page-aligned byte size */
405
406 /* upl invocation flags */
407 /* top nibble is used by super upl */
408
409 #define UPL_FLAGS_NONE 0x00000000
410 #define UPL_COPYOUT_FROM 0x00000001
411 #define UPL_PRECIOUS 0x00000002
412 #define UPL_NO_SYNC 0x00000004
413 #define UPL_CLEAN_IN_PLACE 0x00000008
414 #define UPL_NOBLOCK 0x00000010
415 #define UPL_RET_ONLY_DIRTY 0x00000020
416 #define UPL_SET_INTERNAL 0x00000040
417 #define UPL_QUERY_OBJECT_TYPE 0x00000080
418 #define UPL_RET_ONLY_ABSENT 0x00000100 /* used only for COPY_FROM = FALSE */
419 #define UPL_FILE_IO 0x00000200
420 #define UPL_SET_LITE 0x00000400
421 #define UPL_SET_INTERRUPTIBLE 0x00000800
422 #define UPL_SET_IO_WIRE 0x00001000
423 #define UPL_FOR_PAGEOUT 0x00002000
424 #define UPL_WILL_BE_DUMPED 0x00004000
425 #define UPL_FORCE_DATA_SYNC 0x00008000
426 /* continued after the ticket bits... */
427
428 #define UPL_PAGE_TICKET_MASK 0x000F0000
429 #define UPL_PAGE_TICKET_SHIFT 16
430
431 /* ... flags resume here */
432 #define UPL_BLOCK_ACCESS 0x00100000
433 #define UPL_ENCRYPT 0x00200000
434 #define UPL_NOZEROFILL 0x00400000
435 #define UPL_WILL_MODIFY 0x00800000 /* caller will modify the pages */
436
437 #define UPL_NEED_32BIT_ADDR 0x01000000
438
439 /* UPL flags known by this kernel */
440 #define UPL_VALID_FLAGS 0x01FFFFFF
441
442
443 /* upl abort error flags */
444 #define UPL_ABORT_RESTART 0x1
445 #define UPL_ABORT_UNAVAILABLE 0x2
446 #define UPL_ABORT_ERROR 0x4
447 #define UPL_ABORT_FREE_ON_EMPTY 0x8 /* only implemented in wrappers */
448 #define UPL_ABORT_DUMP_PAGES 0x10
449 #define UPL_ABORT_NOTIFY_EMPTY 0x20
450 #define UPL_ABORT_ALLOW_ACCESS 0x40
451
452 /* upl pages check flags */
453 #define UPL_CHECK_DIRTY 0x1
454
455
456 /*
457 * upl pagein/pageout flags
458 *
459 *
460 * when I/O is issued from this UPL it should be done synchronously
461 */
462 #define UPL_IOSYNC 0x1
463
464 /*
465 * the passed in UPL should not have either a commit or abort
466 * applied to it by the underlying layers... the site that
467 * created the UPL is responsible for cleaning it up.
468 */
469 #define UPL_NOCOMMIT 0x2
470
471 /*
472 * turn off any speculative read-ahead applied at the I/O layer
473 */
474 #define UPL_NORDAHEAD 0x4
475
476 /*
477 * pageout request is targeting a real file
478 * as opposed to a swap file.
479 */
480
481 #define UPL_VNODE_PAGER 0x8
482 /*
483 * this pageout is being originated as part of an explicit
484 * memory synchronization operation... no speculative clustering
485 * should be applied, only the range specified should be pushed.
486 */
487 #define UPL_MSYNC 0x10
488
489 /*
490 *
491 */
492 #ifdef MACH_KERNEL_PRIVATE
493 #define UPL_PAGING_ENCRYPTED 0x20
494 #endif /* MACH_KERNEL_PRIVATE */
495
496 /*
497 * this pageout is being originated as part of an explicit
498 * memory synchronization operation that is checking for I/O
499 * errors and taking it's own action... if an error occurs,
500 * just abort the pages back into the cache unchanged
501 */
502 #define UPL_KEEPCACHED 0x40
503
504
505
506 /* upl commit flags */
507 #define UPL_COMMIT_FREE_ON_EMPTY 0x1 /* only implemented in wrappers */
508 #define UPL_COMMIT_CLEAR_DIRTY 0x2
509 #define UPL_COMMIT_SET_DIRTY 0x4
510 #define UPL_COMMIT_INACTIVATE 0x8
511 #define UPL_COMMIT_NOTIFY_EMPTY 0x10
512 #define UPL_COMMIT_ALLOW_ACCESS 0x20
513
514 /* flags for return of state from vm_map_get_upl, vm_upl address space */
515 /* based call */
516 #define UPL_DEV_MEMORY 0x1
517 #define UPL_PHYS_CONTIG 0x2
518
519
520 /*
521 * Flags for the UPL page ops routine. This routine is not exported
522 * out of the kernel at the moment and so the defs live here.
523 */
524 #define UPL_POP_DIRTY 0x1
525 #define UPL_POP_PAGEOUT 0x2
526 #define UPL_POP_PRECIOUS 0x4
527 #define UPL_POP_ABSENT 0x8
528 #define UPL_POP_BUSY 0x10
529
530 #define UPL_POP_PHYSICAL 0x10000000
531 #define UPL_POP_DUMP 0x20000000
532 #define UPL_POP_SET 0x40000000
533 #define UPL_POP_CLR 0x80000000
534
535 /*
536 * Flags for the UPL range op routine. This routine is not exported
537 * out of the kernel at the moemet and so the defs live here.
538 */
539 /*
540 * UPL_ROP_ABSENT: Returns the extent of the range presented which
541 * is absent, starting with the start address presented
542 */
543 #define UPL_ROP_ABSENT 0x01
544 /*
545 * UPL_ROP_PRESENT: Returns the extent of the range presented which
546 * is present (i.e. resident), starting with the start address presented
547 */
548 #define UPL_ROP_PRESENT 0x02
549 /*
550 * UPL_ROP_DUMP: Dump the pages which are found in the target object
551 * for the target range.
552 */
553 #define UPL_ROP_DUMP 0x04
554
555 #ifdef PRIVATE
556
557 /* access macros for upl_t */
558
559 #define UPL_DEVICE_PAGE(upl) \
560 (((upl)[(index)].phys_addr != 0) ? (!((upl)[0].device)) : FALSE)
561
562 #define UPL_PAGE_PRESENT(upl, index) \
563 ((upl)[(index)].phys_addr != 0)
564
565 #define UPL_PHYS_PAGE(upl, index) \
566 ((upl)[(index)].phys_addr)
567
568 #define UPL_DIRTY_PAGE(upl, index) \
569 (((upl)[(index)].phys_addr != 0) ? ((upl)[(index)].dirty) : FALSE)
570
571 #define UPL_PRECIOUS_PAGE(upl, index) \
572 (((upl)[(index)].phys_addr != 0) ? ((upl)[(index)].precious) : FALSE)
573
574 #define UPL_VALID_PAGE(upl, index) \
575 (((upl)[(index)].phys_addr != 0) ? (!((upl)[(index)].absent)) : FALSE)
576
577 #define UPL_PAGEOUT_PAGE(upl, index) \
578 (((upl)[(index)].phys_addr != 0) ? ((upl)[(index)].pageout) : FALSE)
579
580 #define UPL_SET_PAGE_FREE_ON_COMMIT(upl, index) \
581 (((upl)[(index)].phys_addr != 0) ? \
582 ((upl)[(index)].pageout = TRUE) : FALSE)
583
584 #define UPL_CLR_PAGE_FREE_ON_COMMIT(upl, index) \
585 (((upl)[(index)].phys_addr != 0) ? \
586 ((upl)[(index)].pageout = FALSE) : FALSE)
587
588 /* The call prototyped below is used strictly by UPL_GET_INTERNAL_PAGE_LIST */
589
590 extern vm_size_t upl_offset_to_pagelist;
591 extern vm_size_t upl_get_internal_pagelist_offset(void);
592
593 /* UPL_GET_INTERNAL_PAGE_LIST is only valid on internal objects where the */
594 /* list request was made with the UPL_INTERNAL flag */
595
596 #define UPL_GET_INTERNAL_PAGE_LIST(upl) \
597 ((upl_page_info_t *)((upl_offset_to_pagelist == 0) ? \
598 (unsigned int)upl + (unsigned int)(upl_offset_to_pagelist = upl_get_internal_pagelist_offset()): \
599 (unsigned int)upl + (unsigned int)upl_offset_to_pagelist))
600
601 __BEGIN_DECLS
602
603 extern ppnum_t upl_phys_page(upl_page_info_t *upl, int index);
604 extern void upl_clear_dirty(upl_t upl, boolean_t value);
605
606 __END_DECLS
607
608 #endif /* PRIVATE */
609
610 __BEGIN_DECLS
611
612 extern boolean_t upl_page_present(upl_page_info_t *upl, int index);
613 extern boolean_t upl_dirty_page(upl_page_info_t *upl, int index);
614 extern boolean_t upl_valid_page(upl_page_info_t *upl, int index);
615 extern void upl_deallocate(upl_t upl);
616
617 __END_DECLS
618
619 #endif /* KERNEL */
620
621 #endif /* _MACH_MEMORY_OBJECT_TYPES_H_ */