init_main.c (eadf9e27cdb6351c07aab06fe098cbe8b8c63ee2) | init_main.c (68940ac1a05aed6f6ec47c8540a640f3eab17f79) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)init_main.c 8.9 (Berkeley) 1/21/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)init_main.c 8.9 (Berkeley) 1/21/94 |
39 * $Id: init_main.c,v 1.16 1994/11/06 05:01:58 davidg Exp $ | 39 * $Id: init_main.c,v 1.17 1994/11/25 07:58:16 davidg Exp $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/filedesc.h> 44#include <sys/errno.h> 45#include <sys/exec.h> 46#include <sys/kernel.h> 47#include <sys/mount.h> --- 339 unchanged lines hidden (view full) --- 387 * passed a pointer to that space as main's argument. 388 */ 389 cpu_set_init_frame(p, framep); 390 391 /* 392 * Need just enough stack to hold the faked-up "execve()" arguments. 393 */ 394 addr = trunc_page(VM_MAXUSER_ADDRESS - PAGE_SIZE); | 40 */ 41 42#include <sys/param.h> 43#include <sys/filedesc.h> 44#include <sys/errno.h> 45#include <sys/exec.h> 46#include <sys/kernel.h> 47#include <sys/mount.h> --- 339 unchanged lines hidden (view full) --- 387 * passed a pointer to that space as main's argument. 388 */ 389 cpu_set_init_frame(p, framep); 390 391 /* 392 * Need just enough stack to hold the faked-up "execve()" arguments. 393 */ 394 addr = trunc_page(VM_MAXUSER_ADDRESS - PAGE_SIZE); |
395 if (vm_allocate(&p->p_vmspace->vm_map, &addr, PAGE_SIZE, FALSE) != 0) | 395 if (vm_map_find(&p->p_vmspace->vm_map, NULL, 0, &addr, PAGE_SIZE, FALSE) != 0) |
396 panic("init: couldn't allocate argument space"); 397 p->p_vmspace->vm_maxsaddr = (caddr_t)addr; 398 p->p_vmspace->vm_ssize = 1; 399 400 for (pathp = &initpaths[0]; (path = *pathp) != NULL; pathp++) { 401 /* 402 * Move out the boot flag argument. 403 */ --- 52 unchanged lines hidden --- | 396 panic("init: couldn't allocate argument space"); 397 p->p_vmspace->vm_maxsaddr = (caddr_t)addr; 398 p->p_vmspace->vm_ssize = 1; 399 400 for (pathp = &initpaths[0]; (path = *pathp) != NULL; pathp++) { 401 /* 402 * Move out the boot flag argument. 403 */ --- 52 unchanged lines hidden --- |