|
|
1.1 root 1: /*
2: * Mach Operating System
3: * Copyright (c) 1991,1990 Carnegie Mellon University
4: * All Rights Reserved.
5: *
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.
11: *
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.
15: *
16: * Carnegie Mellon requests users of this software to return to
17: *
18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
22: *
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: #define VOI_STATE_USE_OLD_PAGEOUT 0x00000200
79:
80: typedef struct vm_object_info {
81: vm_offset_t voi_object; /* this object */
82: vm_size_t voi_pagesize; /* object's page size */
83: vm_size_t voi_size; /* object size (valid if internal) */
84: natural_t voi_ref_count; /* number of references */
85: natural_t voi_resident_page_count; /* number of resident pages */
86: natural_t voi_absent_count; /* number requested but not filled */
87: vm_offset_t voi_copy; /* copy object */
88: vm_offset_t voi_shadow; /* shadow object */
89: vm_offset_t voi_shadow_offset; /* offset into shadow object */
90: vm_offset_t voi_paging_offset; /* offset into memory object */
91: /*memory_object_copy_strategy_t*/integer_t voi_copy_strategy;
92: /* how to handle data copy */
93: vm_offset_t voi_last_alloc; /* offset of last allocation */
94: natural_t voi_paging_in_progress; /* paging references */
95: vm_object_info_state_t voi_state; /* random state bits */
96: } vm_object_info_t;
97:
98: typedef vm_object_info_t *vm_object_info_array_t;
99:
100:
101: typedef natural_t vm_page_info_state_t;
102:
103: #define VPI_STATE_BUSY 0x00000001
104: #define VPI_STATE_WANTED 0x00000002
105: #define VPI_STATE_TABLED 0x00000004
106: #define VPI_STATE_FICTITIOUS 0x00000008
107: #define VPI_STATE_PRIVATE 0x00000010
108: #define VPI_STATE_ABSENT 0x00000020
109: #define VPI_STATE_ERROR 0x00000040
110: #define VPI_STATE_DIRTY 0x00000080
111: #define VPI_STATE_PRECIOUS 0x00000100
112: #define VPI_STATE_OVERWRITING 0x00000200
113: #define VPI_STATE_INACTIVE 0x00000400
114: #define VPI_STATE_ACTIVE 0x00000800
115: #define VPI_STATE_LAUNDRY 0x00001000
116: #define VPI_STATE_FREE 0x00002000
117: #define VPI_STATE_REFERENCE 0x00004000
118:
119: #define VPI_STATE_PAGER 0x80000000 /* pager has the page */
120:
121: typedef struct vm_page_info {
122: vm_offset_t vpi_offset; /* offset in object */
123: vm_offset_t vpi_phys_addr; /* physical address */
124: natural_t vpi_wire_count; /* number of times wired */
125: /*vm_prot_t*/natural_t vpi_page_lock; /* XP access restrictions */
126: /*vm_prot_t*/natural_t vpi_unlock_request; /* outstanding unlock requests */
127: vm_page_info_state_t vpi_state; /* random state bits */
128: } vm_page_info_t;
129:
130: typedef vm_page_info_t *vm_page_info_array_t;
131:
132: #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.