|
|
1.1.1.2 root 1: /*
1.1 root 2: * Mach Operating System
3: * Copyright (c) 1991,1990 Carnegie Mellon University
4: * All Rights Reserved.
1.1.1.2 root 5: *
1.1 root 6: * Permission to use, copy, modify and distribute this software and its
7: * documentation is hereby granted, provided that both the copyright
8: * notice and this permission notice appear in all copies of the
9: * software, derivative works or modified versions, and any portions
10: * thereof, and that both notices appear in supporting documentation.
1.1.1.2 root 11: *
1.1 root 12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
1.1.1.2 root 15: *
1.1 root 16: * Carnegie Mellon requests users of this software to return to
1.1.1.2 root 17: *
1.1 root 18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
1.1.1.2 root 22: *
1.1 root 23: * any improvements or extensions that they make and grant Carnegie Mellon
24: * the rights to redistribute these changes.
25: */
26: /*
27: * File: mach_debug/vm_info.h
28: * Author: Rich Draves
29: * Date: March, 1990
30: *
31: * Definitions for the VM debugging interface.
32: */
33:
34: #ifndef _MACH_DEBUG_VM_INFO_H_
35: #define _MACH_DEBUG_VM_INFO_H_
36:
37: #include <mach/boolean.h>
38: #include <mach/machine/vm_types.h>
39: #include <mach/vm_inherit.h>
40: #include <mach/vm_prot.h>
41: #include <mach/memory_object.h>
42:
43: /*
44: * Remember to update the mig type definitions
45: * in mach_debug_types.defs when adding/removing fields.
46: */
47:
48: typedef struct vm_region_info {
49: vm_offset_t vri_start; /* start of region */
50: vm_offset_t vri_end; /* end of region */
51:
52: /*vm_prot_t*/natural_t vri_protection; /* protection code */
53: /*vm_prot_t*/natural_t vri_max_protection; /* maximum protection */
54: /*vm_inherit_t*/natural_t vri_inheritance; /* inheritance */
55: natural_t vri_wired_count; /* number of times wired */
56: natural_t vri_user_wired_count; /* number of times user has wired */
57:
58: vm_offset_t vri_object; /* the mapped object */
59: vm_offset_t vri_offset; /* offset into object */
60: /*boolean_t*/integer_t vri_needs_copy; /* does object need to be copied? */
61: natural_t vri_sharing; /* share map references */
62: } vm_region_info_t;
63:
64: typedef vm_region_info_t *vm_region_info_array_t;
65:
66:
67: typedef natural_t vm_object_info_state_t;
68:
69: #define VOI_STATE_PAGER_CREATED 0x00000001
70: #define VOI_STATE_PAGER_INITIALIZED 0x00000002
71: #define VOI_STATE_PAGER_READY 0x00000004
72: #define VOI_STATE_CAN_PERSIST 0x00000008
73: #define VOI_STATE_INTERNAL 0x00000010
74: #define VOI_STATE_TEMPORARY 0x00000020
75: #define VOI_STATE_ALIVE 0x00000040
76: #define VOI_STATE_LOCK_IN_PROGRESS 0x00000080
77: #define VOI_STATE_LOCK_RESTART 0x00000100
78:
79: typedef struct vm_object_info {
80: vm_offset_t voi_object; /* this object */
81: vm_size_t voi_pagesize; /* object's page size */
82: vm_size_t voi_size; /* object size (valid if internal) */
83: natural_t voi_ref_count; /* number of references */
84: natural_t voi_resident_page_count; /* number of resident pages */
85: natural_t voi_absent_count; /* number requested but not filled */
86: vm_offset_t voi_copy; /* copy object */
87: vm_offset_t voi_shadow; /* shadow object */
88: vm_offset_t voi_shadow_offset; /* offset into shadow object */
89: vm_offset_t voi_paging_offset; /* offset into memory object */
90: /*memory_object_copy_strategy_t*/integer_t voi_copy_strategy;
91: /* how to handle data copy */
92: vm_offset_t voi_last_alloc; /* offset of last allocation */
93: natural_t voi_paging_in_progress; /* paging references */
94: vm_object_info_state_t voi_state; /* random state bits */
95: } vm_object_info_t;
96:
97: typedef vm_object_info_t *vm_object_info_array_t;
98:
99:
100: typedef natural_t vm_page_info_state_t;
101:
102: #define VPI_STATE_BUSY 0x00000001
103: #define VPI_STATE_WANTED 0x00000002
104: #define VPI_STATE_TABLED 0x00000004
105: #define VPI_STATE_FICTITIOUS 0x00000008
106: #define VPI_STATE_PRIVATE 0x00000010
107: #define VPI_STATE_ABSENT 0x00000020
108: #define VPI_STATE_ERROR 0x00000040
109: #define VPI_STATE_DIRTY 0x00000080
110: #define VPI_STATE_PRECIOUS 0x00000100
111: #define VPI_STATE_OVERWRITING 0x00000200
112: #define VPI_STATE_INACTIVE 0x00000400
113: #define VPI_STATE_ACTIVE 0x00000800
114: #define VPI_STATE_LAUNDRY 0x00001000
115: #define VPI_STATE_FREE 0x00002000
116: #define VPI_STATE_REFERENCE 0x00004000
117:
118: #define VPI_STATE_PAGER 0x80000000 /* pager has the page */
119:
120: typedef struct vm_page_info {
121: vm_offset_t vpi_offset; /* offset in object */
122: vm_offset_t vpi_phys_addr; /* physical address */
123: natural_t vpi_wire_count; /* number of times wired */
124: /*vm_prot_t*/natural_t vpi_page_lock; /* XP access restrictions */
125: /*vm_prot_t*/natural_t vpi_unlock_request; /* outstanding unlock requests */
126: vm_page_info_state_t vpi_state; /* random state bits */
127: } vm_page_info_t;
128:
129: typedef vm_page_info_t *vm_page_info_array_t;
130:
1.1.1.2 root 131: #endif /* _MACH_DEBUG_VM_INFO_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.