145748Smckusick /* 245748Smckusick * Copyright (c) 1991 Regents of the University of California. 345748Smckusick * All rights reserved. 445748Smckusick * 545748Smckusick * This code is derived from software contributed to Berkeley by 645748Smckusick * The Mach Operating System project at Carnegie-Mellon University. 745748Smckusick * 848493Smckusick * %sccs.include.redist.c% 945748Smckusick * 10*50545Smckusick * @(#)vm_init.c 7.4 (Berkeley) 07/25/91 1148493Smckusick * 1248493Smckusick * 1348493Smckusick * Copyright (c) 1987, 1990 Carnegie-Mellon University. 1448493Smckusick * All rights reserved. 1548493Smckusick * 1648493Smckusick * Authors: Avadis Tevanian, Jr., Michael Wayne Young 1748493Smckusick * 1848493Smckusick * Permission to use, copy, modify and distribute this software and 1948493Smckusick * its documentation is hereby granted, provided that both the copyright 2048493Smckusick * notice and this permission notice appear in all copies of the 2148493Smckusick * software, derivative works or modified versions, and any portions 2248493Smckusick * thereof, and that both notices appear in supporting documentation. 2348493Smckusick * 2448493Smckusick * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 2548493Smckusick * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 2648493Smckusick * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 2748493Smckusick * 2848493Smckusick * Carnegie Mellon requests users of this software to return to 2948493Smckusick * 3048493Smckusick * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 3148493Smckusick * School of Computer Science 3248493Smckusick * Carnegie Mellon University 3348493Smckusick * Pittsburgh PA 15213-3890 3448493Smckusick * 3548493Smckusick * any improvements or extensions that they make and grant Carnegie the 3648493Smckusick * rights to redistribute these changes. 3745748Smckusick */ 3845748Smckusick 3945748Smckusick /* 4045748Smckusick * Initialize the Virtual Memory subsystem. 4145748Smckusick */ 4245748Smckusick 4348386Skarels #include "param.h" 4445748Smckusick 4548386Skarels #include "vm.h" 4648386Skarels #include "vm_page.h" 4748386Skarels #include "vm_kern.h" 4848386Skarels 4945748Smckusick /* 5045748Smckusick * vm_init initializes the virtual memory system. 5145748Smckusick * This is done only by the first cpu up. 5245748Smckusick * 5345748Smckusick * The start and end address of physical memory is passed in. 5445748Smckusick */ 5545748Smckusick 5645748Smckusick void vm_mem_init() 5745748Smckusick { 5845748Smckusick extern vm_offset_t avail_start, avail_end; 5945748Smckusick extern vm_offset_t virtual_avail, virtual_end; 6045748Smckusick 6145748Smckusick /* 6245748Smckusick * Initializes resident memory structures. 6345748Smckusick * From here on, all physical memory is accounted for, 6445748Smckusick * and we use only virtual addresses. 6545748Smckusick */ 66*50545Smckusick vm_set_page_size(); 6745748Smckusick virtual_avail = vm_page_startup(avail_start, avail_end, virtual_avail); 6845748Smckusick /* 6945748Smckusick * Initialize other VM packages 7045748Smckusick */ 7145748Smckusick vm_object_init(); 7248386Skarels vm_map_startup(); 7345748Smckusick kmem_init(virtual_avail, virtual_end); 7445748Smckusick pmap_init(avail_start, avail_end); 7545748Smckusick vm_pager_init(); 7645748Smckusick } 77