vm_init.c (76973) | vm_init.c (79224) |
---|---|
1/* 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 47 unchanged lines hidden (view full) --- 56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 57 * School of Computer Science 58 * Carnegie Mellon University 59 * Pittsburgh PA 15213-3890 60 * 61 * any improvements or extensions that they make and grant Carnegie the 62 * rights to redistribute these changes. 63 * | 1/* 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 47 unchanged lines hidden (view full) --- 56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 57 * School of Computer Science 58 * Carnegie Mellon University 59 * Pittsburgh PA 15213-3890 60 * 61 * any improvements or extensions that they make and grant Carnegie the 62 * rights to redistribute these changes. 63 * |
64 * $FreeBSD: head/sys/vm/vm_init.c 76973 2001-05-22 05:35:45Z jhb $ | 64 * $FreeBSD: head/sys/vm/vm_init.c 79224 2001-07-04 16:20:28Z dillon $ |
65 */ 66 67/* 68 * Initialize the Virtual Memory subsystem. 69 */ 70 71#include <sys/param.h> 72#include <sys/kernel.h> --- 19 unchanged lines hidden (view full) --- 92 93/* 94 * vm_init initializes the virtual memory system. 95 * This is done only by the first cpu up. 96 * 97 * The start and end address of physical memory is passed in. 98 */ 99 | 65 */ 66 67/* 68 * Initialize the Virtual Memory subsystem. 69 */ 70 71#include <sys/param.h> 72#include <sys/kernel.h> --- 19 unchanged lines hidden (view full) --- 92 93/* 94 * vm_init initializes the virtual memory system. 95 * This is done only by the first cpu up. 96 * 97 * The start and end address of physical memory is passed in. 98 */ 99 |
100struct mtx vm_mtx; 101 | |
102/* ARGSUSED*/ 103static void 104vm_mem_init(dummy) 105 void *dummy; 106{ | 100/* ARGSUSED*/ 101static void 102vm_mem_init(dummy) 103 void *dummy; 104{ |
107 | |
108 /* 109 * Initializes resident memory structures. From here on, all physical 110 * memory is accounted for, and we use only virtual addresses. 111 */ | 105 /* 106 * Initializes resident memory structures. From here on, all physical 107 * memory is accounted for, and we use only virtual addresses. 108 */ |
112 mtx_init(&vm_mtx, "vm", MTX_DEF); 113 mtx_lock(&vm_mtx); | |
114 vm_set_page_size(); 115 virtual_avail = vm_page_startup(avail_start, avail_end, virtual_avail); 116 117 /* 118 * Initialize other VM packages 119 */ 120 vm_zone_init(); 121 vm_object_init(); 122 vm_map_startup(); 123 kmem_init(virtual_avail, virtual_end); 124 pmap_init(avail_start, avail_end); 125 vm_pager_init(); | 109 vm_set_page_size(); 110 virtual_avail = vm_page_startup(avail_start, avail_end, virtual_avail); 111 112 /* 113 * Initialize other VM packages 114 */ 115 vm_zone_init(); 116 vm_object_init(); 117 vm_map_startup(); 118 kmem_init(virtual_avail, virtual_end); 119 pmap_init(avail_start, avail_end); 120 vm_pager_init(); |
126 mtx_unlock(&vm_mtx); | |
127} | 121} |