|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /*
26: * Mach Operating System
27: * Copyright (c) 1987 Carnegie-Mellon University
28: * All rights reserved. The CMU software License Agreement specifies
29: * the terms and conditions for use and redistribution.
30: */
31: /*
32: * File: vm/vm_init.c
33: * Author: Avadis Tevanian, Jr., Michael Wayne Young
34: *
35: * Copyright (C) 1985, Avadis Tevanian, Jr., Michael Wayne Young
36: *
37: * Initialize the Virtual Memory subsystem.
38: */
39:
40: #import <mach_xp.h>
41:
42: #import <mach/machine/vm_types.h>
43: #import <kern/lock.h>
44: #import <vm/vm_object.h>
45: #import <vm/vm_map.h>
46: #import <vm/vm_page.h>
47: #import <vm/vm_kern.h>
48: #import <vm/vnode_pager.h>
49:
50: /*
51: * vm_init initializes the virtual memory system.
52: * This is done only by the first cpu up.
53: *
54: * The start and end address of physical memory is passed in.
55: */
56:
57: void vm_mem_init()
58: {
59: extern vm_offset_t virtual_avail, virtual_end;
60:
61: /*
62: * Initializes resident memory structures.
63: * From here on, all physical memory is accounted for,
64: * and we use only virtual addresses.
65: */
66:
67: virtual_avail = vm_page_startup(
68: mem_region, num_regions, virtual_avail);
69:
70: #ifdef ppc
71: virtual_avail = adjust_bat_limit(virtual_avail, 0, TRUE, TRUE);
72: #endif
73:
74: /*
75: * Initialize other VM packages
76: */
77:
78: zone_bootstrap();
79: vm_object_init();
80: vm_map_init();
81: kmem_init(virtual_avail, virtual_end);
82: pmap_init(mem_region, num_regions);
83:
84: zone_init();
85: kalloc_init();
86:
87: #if MACH_XP
88: #else MACH_XP
89: vm_user_init();
90: #endif MACH_XP
91: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.