Mon Nov 30 16:09:14 2009 UTC ()
Cast a vaddr_t to void* before passing to memset, so that this builds again.


(he)
diff -r1.37 -r1.38 src/sys/arch/sun3/sun3x/locore2.c

cvs diff -r1.37 -r1.38 src/sys/arch/sun3/sun3x/locore2.c (expand / switch to unified diff)

--- src/sys/arch/sun3/sun3x/locore2.c 2009/11/27 03:23:14 1.37
+++ src/sys/arch/sun3/sun3x/locore2.c 2009/11/30 16:09:14 1.38
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: locore2.c,v 1.37 2009/11/27 03:23:14 rmind Exp $ */ 1/* $NetBSD: locore2.c,v 1.38 2009/11/30 16:09:14 he Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1996 The NetBSD Foundation, Inc. 4 * Copyright (c) 1996 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Gordon W. Ross and Jeremy Cooper. 8 * by Gordon W. Ross and Jeremy Cooper.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.37 2009/11/27 03:23:14 rmind Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.38 2009/11/30 16:09:14 he Exp $");
34 34
35#include "opt_ddb.h" 35#include "opt_ddb.h"
36 36
37#include <sys/param.h> 37#include <sys/param.h>
38#include <sys/systm.h> 38#include <sys/systm.h>
39#include <sys/proc.h> 39#include <sys/proc.h>
40#include <sys/reboot.h> 40#include <sys/reboot.h>
41#define ELFSIZE 32 41#define ELFSIZE 32
42#include <sys/exec_elf.h> 42#include <sys/exec_elf.h>
43 43
44#include <uvm/uvm_extern.h> 44#include <uvm/uvm_extern.h>
45 45
46#include <machine/cpu.h> 46#include <machine/cpu.h>
@@ -158,27 +158,27 @@ _vm_init(void) @@ -158,27 +158,27 @@ _vm_init(void)
158 /* 158 /*
159 * Steal some special-purpose, already mapped pages. 159 * Steal some special-purpose, already mapped pages.
160 * Note: msgbuf is setup in machdep.c:cpu_startup() 160 * Note: msgbuf is setup in machdep.c:cpu_startup()
161 */ 161 */
162 nextva = m68k_round_page(esym); 162 nextva = m68k_round_page(esym);
163 163
164 /* 164 /*
165 * Setup the u-area pages (stack, etc.) for lwp0. 165 * Setup the u-area pages (stack, etc.) for lwp0.
166 * This is done very early (here) to make sure the 166 * This is done very early (here) to make sure the
167 * fault handler works in case we hit an early bug. 167 * fault handler works in case we hit an early bug.
168 * (The fault handler may reference lwp0 stuff.) 168 * (The fault handler may reference lwp0 stuff.)
169 */ 169 */
170 uvm_lwp_setuarea(&lwp0, nextva); 170 uvm_lwp_setuarea(&lwp0, nextva);
171 memset(nextva, 0, USPACE); 171 memset((void *)nextva, 0, USPACE);
172 172
173 nextva += USPACE; 173 nextva += USPACE;
174 174
175 /* 175 /*
176 * Now that lwp0 exists, make it the "current" one. 176 * Now that lwp0 exists, make it the "current" one.
177 */ 177 */
178 curlwp = &lwp0; 178 curlwp = &lwp0;
179 curpcb = lwp_getpcb(&lwp0); 179 curpcb = lwp_getpcb(&lwp0);
180 180
181 /* This does most of the real work. */ 181 /* This does most of the real work. */
182 pmap_bootstrap(nextva); 182 pmap_bootstrap(nextva);
183} 183}
184 184