Sat Aug 27 21:43:06 2011 UTC ()
defflag CPU_DEBUG


(jmcneill)
diff -r1.6 -r1.7 src/sys/arch/usermode/conf/files.usermode
diff -r1.18 -r1.19 src/sys/arch/usermode/dev/cpu.c

cvs diff -r1.6 -r1.7 src/sys/arch/usermode/conf/files.usermode (expand / switch to unified diff)

--- src/sys/arch/usermode/conf/files.usermode 2011/08/25 11:06:29 1.6
+++ src/sys/arch/usermode/conf/files.usermode 2011/08/27 21:43:06 1.7
@@ -1,20 +1,21 @@ @@ -1,20 +1,21 @@
1# $NetBSD: files.usermode,v 1.6 2011/08/25 11:06:29 jmcneill Exp $ 1# $NetBSD: files.usermode,v 1.7 2011/08/27 21:43:06 jmcneill Exp $
2 2
3maxpartitions 8 3maxpartitions 8
4maxusers 8 16 64 4maxusers 8 16 64
5 5
6defparam opt_memsize.h MEMSIZE 6defparam opt_memsize.h MEMSIZE
7defflag opt_sdl.h SDL 7defflag opt_sdl.h SDL
 8defflag opt_cpu.h CPU_DEBUG
8 9
9define thunkbus { } 10define thunkbus { }
10 11
11device mainbus: thunkbus 12device mainbus: thunkbus
12attach mainbus at root 13attach mainbus at root
13file arch/usermode/dev/mainbus.c mainbus 14file arch/usermode/dev/mainbus.c mainbus
14 15
15device cpu { } 16device cpu { }
16attach cpu at thunkbus 17attach cpu at thunkbus
17file arch/usermode/dev/cpu.c cpu 18file arch/usermode/dev/cpu.c cpu
18 19
19device clock { } 20device clock { }
20attach clock at thunkbus 21attach clock at thunkbus

cvs diff -r1.18 -r1.19 src/sys/arch/usermode/dev/cpu.c (expand / switch to unified diff)

--- src/sys/arch/usermode/dev/cpu.c 2011/08/27 21:15:07 1.18
+++ src/sys/arch/usermode/dev/cpu.c 2011/08/27 21:43:06 1.19
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cpu.c,v 1.18 2011/08/27 21:15:07 reinoud Exp $ */ 1/* $NetBSD: cpu.c,v 1.19 2011/08/27 21:43:06 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -16,52 +16,52 @@ @@ -16,52 +16,52 @@
16 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 16 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
 29#include "opt_cpu.h"
 30
29#include <sys/cdefs.h> 31#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.18 2011/08/27 21:15:07 reinoud Exp $"); 32__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.19 2011/08/27 21:43:06 jmcneill Exp $");
31 33
32#include <sys/param.h> 34#include <sys/param.h>
33#include <sys/conf.h> 35#include <sys/conf.h>
34#include <sys/proc.h> 36#include <sys/proc.h>
35#include <sys/systm.h> 37#include <sys/systm.h>
36#include <sys/device.h> 38#include <sys/device.h>
37#include <sys/reboot.h> 39#include <sys/reboot.h>
38#include <sys/lwp.h> 40#include <sys/lwp.h>
39#include <sys/cpu.h> 41#include <sys/cpu.h>
40#include <sys/mbuf.h> 42#include <sys/mbuf.h>
41#include <sys/msgbuf.h> 43#include <sys/msgbuf.h>
42 44
43#include <dev/cons.h> 45#include <dev/cons.h>
44 46
45#include <machine/cpu.h> 47#include <machine/cpu.h>
46#include <machine/mainbus.h> 48#include <machine/mainbus.h>
47#include <machine/pcb.h> 49#include <machine/pcb.h>
48#include <machine/thunk.h> 50#include <machine/thunk.h>
49 51
50#include <uvm/uvm_extern.h> 52#include <uvm/uvm_extern.h>
51#include <uvm/uvm_page.h> 53#include <uvm/uvm_page.h>
52 54
53#define CPU_DEBUG 
54 
55static int cpu_match(device_t, cfdata_t, void *); 55static int cpu_match(device_t, cfdata_t, void *);
56static void cpu_attach(device_t, device_t, void *); 56static void cpu_attach(device_t, device_t, void *);
57 57
58struct cpu_info cpu_info_primary = { 58struct cpu_info cpu_info_primary = {
59 .ci_dev = 0, 59 .ci_dev = 0,
60 .ci_self = &cpu_info_primary, 60 .ci_self = &cpu_info_primary,
61 .ci_idepth = -1, 61 .ci_idepth = -1,
62 .ci_curlwp = &lwp0, 62 .ci_curlwp = &lwp0,
63}; 63};
64 64
65char cpu_model[48] = "virtual processor"; 65char cpu_model[48] = "virtual processor";
66 66
67typedef struct cpu_softc { 67typedef struct cpu_softc {