FreeBSD/Linux Kernel Cross Reference
sys/vm/vm_init.c
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1992,1991,1990,1989,1988,1987 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 Software.Distribution@CS.CMU.EDU
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 * HISTORY
28 * $Log: vm_init.c,v $
29 * Revision 2.11 93/11/17 18:54:05 dbg
30 * ANSI-fied.
31 * [93/10/27 dbg]
32 *
33 * Revision 2.10 92/08/03 18:00:35 jfriedl
34 * removed silly prototypes
35 * [92/08/02 jfriedl]
36 *
37 * Revision 2.9 92/05/21 17:25:56 jfriedl
38 * tried prototypes.
39 * [92/05/20 jfriedl]
40 *
41 * Revision 2.8 92/01/14 16:47:54 rpd
42 * Split vm_mem_init into vm_mem_bootstrap and vm_mem_init.
43 * [91/12/29 rpd]
44 *
45 * Revision 2.7 91/05/18 14:40:21 rpd
46 * Replaced vm_page_startup with vm_page_bootstrap.
47 * [91/04/10 rpd]
48 *
49 * Revision 2.6 91/05/14 17:49:05 mrt
50 * Correcting copyright
51 *
52 * Revision 2.5 91/03/16 15:05:10 rpd
53 * Added vm_fault_init.
54 * [91/02/16 rpd]
55 *
56 * Revision 2.4 91/02/05 17:58:17 mrt
57 * Changed to new Mach copyright
58 * [91/02/01 16:32:11 mrt]
59 *
60 * Revision 2.3 90/02/22 20:05:35 dbg
61 * Reduce lint.
62 * [90/01/29 dbg]
63 *
64 * Revision 2.2 89/09/08 11:28:15 dbg
65 * Initialize kalloc package here.
66 * [89/09/06 dbg]
67 *
68 * Removed non-XP code.
69 * [89/04/28 dbg]
70 *
71 * Revision 2.10 89/04/22 15:35:20 gm0w
72 * Removed MACH_VFS code.
73 * [89/04/14 gm0w]
74 *
75 * Revision 2.9 89/04/18 21:25:30 mwyoung
76 * Recent history:
77 * Add memory_manager_default_init(), vm_page_module_init().
78 *
79 * Older history has been integrated into the documentation for
80 * this module.
81 * [89/04/18 mwyoung]
82 *
83 */
84 /*
85 * File: vm/vm_init.c
86 * Author: Avadis Tevanian, Jr., Michael Wayne Young
87 * Date: 1985
88 *
89 * Initialize the Virtual Memory subsystem.
90 */
91
92 #include <mach/machine/vm_types.h>
93 #include <kern/zalloc.h>
94 #include <kern/kalloc.h>
95 #include <vm/vm_fault.h>
96 #include <vm/vm_object.h>
97 #include <vm/vm_map.h>
98 #include <vm/vm_page.h>
99 #include <vm/vm_kern.h>
100 #include <vm/memory_object.h>
101
102
103
104 /*
105 * vm_mem_bootstrap initializes the virtual memory system.
106 * This is done only by the first cpu up.
107 */
108
109 void vm_mem_bootstrap(void)
110 {
111 vm_offset_t start, end;
112
113 /*
114 * Initializes resident memory structures.
115 * From here on, all physical memory is accounted for,
116 * and we use only virtual addresses.
117 */
118
119 vm_page_bootstrap(&start, &end);
120
121 /*
122 * Initialize other VM packages
123 */
124
125 zone_bootstrap();
126 vm_object_bootstrap();
127 vm_map_init();
128 kmem_init(start, end);
129 pmap_init();
130 zone_init();
131 kalloc_init();
132 vm_fault_init();
133 vm_page_module_init();
134 memory_manager_default_init();
135 }
136
137 void vm_mem_init(void)
138 {
139 vm_object_init();
140 }
Cache object: e92b61dc5695e67790665880452c28d5
|