Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode fix build



details:   https://anonhg.NetBSD.org/src/rev/af8a2f90008f
branches:  trunk
changeset: 768161:af8a2f90008f
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Aug 10 01:32:43 2011 +0000

description:
fix build

diffstat:

 sys/arch/usermode/conf/GENERIC           |  16 +------------
 sys/arch/usermode/conf/Makefile.usermode |   4 +-
 sys/arch/usermode/dev/clock.c            |   5 ++-
 sys/arch/usermode/dev/cpu.c              |   5 ++-
 sys/arch/usermode/include/bus.h          |  37 ++++++++++++++++++++++++++++++++
 sys/arch/usermode/usermode/machdep.c     |  14 +++++++++--
 sys/arch/usermode/usermode/pmap.c        |  24 +++++++++-----------
 sys/arch/usermode/usermode/vm_machdep.c  |   7 +++--
 8 files changed, 73 insertions(+), 39 deletions(-)

diffs (271 lines):

diff -r 730627d92d20 -r af8a2f90008f sys/arch/usermode/conf/GENERIC
--- a/sys/arch/usermode/conf/GENERIC    Tue Aug 09 23:46:05 2011 +0000
+++ b/sys/arch/usermode/conf/GENERIC    Wed Aug 10 01:32:43 2011 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: GENERIC,v 1.5 2010/11/23 11:14:07 hannken Exp $
+# $NetBSD: GENERIC,v 1.6 2011/08/10 01:32:43 jmcneill Exp $
 
 include "arch/usermode/conf/std.usermode"
 
 options        INCLUDE_CONFIG_FILE
-#ident                 "GENERIC-$Revision: 1.5 $"
+#ident                 "GENERIC-$Revision: 1.6 $"
 maxusers       32
 makeoptions    DEBUG="-g3"
 makeoptions    COPTS="-O2 -fno-omit-frame-pointer"
@@ -43,15 +43,3 @@
 ttycons0       at mainbus?
 
 pseudo-device  loop
-pseudo-device  md      
-
-#
-# accept filters
-pseudo-device   accf_data              # "dataready" accept filter
-pseudo-device   accf_http              # "httpready" accept filter
-
-options                MEMORY_DISK_HOOKS
-options                MEMORY_DISK_IS_ROOT
-options                MEMORY_DISK_SERVER=0
-options                MEMORY_DISK_ROOT_SIZE=10000
-options                MEMORY_DISK_RBFLAGS=RB_SINGLE   # boot in single-user mode
diff -r 730627d92d20 -r af8a2f90008f sys/arch/usermode/conf/Makefile.usermode
--- a/sys/arch/usermode/conf/Makefile.usermode  Tue Aug 09 23:46:05 2011 +0000
+++ b/sys/arch/usermode/conf/Makefile.usermode  Wed Aug 10 01:32:43 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.usermode,v 1.4 2011/01/21 15:59:09 joerg Exp $
+# $NetBSD: Makefile.usermode,v 1.5 2011/08/10 01:32:43 jmcneill Exp $
 
 MACHINE_ARCH=                  usermode
 USETOOLS?=                     no
@@ -17,7 +17,7 @@
 ## (2) compile settings
 ##
 DEFCOPTS=      -O2
-CPPFLAGS+=     -Dusermode -Dmalloc=kernmalloc -Dfree=kernfree
+CPPFLAGS+=     -Dusermode
 CPPFLAGS.init_main.c+= -Dmain=kernmain
 AFLAGS+=       -x assembler-with-cpp
 
diff -r 730627d92d20 -r af8a2f90008f sys/arch/usermode/dev/clock.c
--- a/sys/arch/usermode/dev/clock.c     Tue Aug 09 23:46:05 2011 +0000
+++ b/sys/arch/usermode/dev/clock.c     Wed Aug 10 01:32:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.4 2009/11/27 03:23:14 rmind Exp $ */
+/* $NetBSD: clock.c,v 1.5 2011/08/10 01:32:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,13 +27,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.4 2009/11/27 03:23:14 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.5 2011/08/10 01:32:44 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
 #include <sys/systm.h>
 #include <sys/device.h>
 #include <sys/timetc.h>
+#include <sys/time.h>
 
 #include <machine/mainbus.h>
 
diff -r 730627d92d20 -r af8a2f90008f sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c       Tue Aug 09 23:46:05 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c       Wed Aug 10 01:32:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.7 2010/02/08 19:02:32 joerg Exp $ */
+/* $NetBSD: cpu.c,v 1.8 2011/08/10 01:32:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.7 2010/02/08 19:02:32 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.8 2011/08/10 01:32:44 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -43,6 +43,7 @@
 
 #include <machine/cpu.h>
 #include <machine/mainbus.h>
+#include <machine/pcb.h>
 
 #include <uvm/uvm_extern.h>
 #include <uvm/uvm_page.h>
diff -r 730627d92d20 -r af8a2f90008f sys/arch/usermode/include/bus.h
--- a/sys/arch/usermode/include/bus.h   Tue Aug 09 23:46:05 2011 +0000
+++ b/sys/arch/usermode/include/bus.h   Wed Aug 10 01:32:43 2011 +0000
@@ -0,0 +1,37 @@
+/* $NetBSD: bus.h,v 1.2 2011/08/10 01:32:44 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _ARCH_USERMODE_INCLUDE_BUS_H
+#define _ARCH_USERMODE_INCLUDE_BUS_H
+
+struct bus_space_tag;
+typedef struct bus_space_tag *bus_space_tag_t;
+
+typedef vaddr_t bus_space_handle_t;
+
+#endif /* !_ARCH_USERMODE_INCLUDE_BUS_H */
diff -r 730627d92d20 -r af8a2f90008f sys/arch/usermode/usermode/machdep.c
--- a/sys/arch/usermode/usermode/machdep.c      Tue Aug 09 23:46:05 2011 +0000
+++ b/sys/arch/usermode/usermode/machdep.c      Wed Aug 10 01:32:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.9 2010/02/08 19:02:32 joerg Exp $ */
+/* $NetBSD: machdep.c,v 1.10 2011/08/10 01:32:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2010/02/08 19:02:32 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10 2011/08/10 01:32:44 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -39,6 +39,8 @@
 #include <uvm/uvm_extern.h>
 #include <uvm/uvm_page.h>
 
+#include <dev/mm.h>
+
 #include "opt_memsize.h"
 
 char machine[] = "usermode";
@@ -100,6 +102,12 @@
 }
 
 void
-sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
+sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask)
 {
 }
+
+int
+mm_md_physacc(paddr_t pa, vm_prot_t prog)
+{
+       return 0;
+}
diff -r 730627d92d20 -r af8a2f90008f sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Tue Aug 09 23:46:05 2011 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Wed Aug 10 01:32:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.5 2009/11/07 07:27:48 cegger Exp $ */
+/* $NetBSD: pmap.c,v 1.6 2011/08/10 01:32:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.5 2009/11/07 07:27:48 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.6 2011/08/10 01:32:44 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -39,8 +39,12 @@
 
 #include "opt_memsize.h"
 
-struct pmap    pmap_kernel_store;
-static uint8_t pmap_memory[1024*MEMSIZE] __attribute__((__aligned__));
+extern void * calloc(size_t, size_t);
+
+static struct pmap     pmap_kernel_store;
+struct pmap * const    kernel_pmap_ptr = &pmap_kernel_store;
+
+static uint8_t *pmap_memory;
 static vaddr_t virtual_avail, virtual_end;
 static vaddr_t pmap_maxkvaddr;
 
@@ -49,9 +53,9 @@
 void
 pmap_bootstrap(void)
 {
-#if 0
-       vsize_t bufsz;
-#endif
+       pmap_memory = calloc(1, 1024 * MEMSIZE);
+       if (pmap_memory == NULL)
+               panic("pmap_bootstrap: no memory");
 
        virtual_avail = (vaddr_t)pmap_memory;
        virtual_end = virtual_avail + sizeof(pmap_memory);
@@ -78,12 +82,6 @@
 {
 }
 
-pmap_t
-pmap_kernel(void)
-{
-       return &pmap_kernel_store;
-}
-
 void
 pmap_virtual_space(vaddr_t *vstartp, vaddr_t *vendp)
 {
diff -r 730627d92d20 -r af8a2f90008f sys/arch/usermode/usermode/vm_machdep.c
--- a/sys/arch/usermode/usermode/vm_machdep.c   Tue Aug 09 23:46:05 2011 +0000
+++ b/sys/arch/usermode/usermode/vm_machdep.c   Wed Aug 10 01:32:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.2 2009/10/21 16:07:00 snj Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.3 2011/08/10 01:32:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.2 2009/10/21 16:07:00 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.3 2011/08/10 01:32:44 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -35,9 +35,10 @@
 
 #include <uvm/uvm_extern.h>
 
-void
+int
 vmapbuf(struct buf *bp, vsize_t len)
 {
+       return 0;
 }
 
 void



Home | Main Index | Thread Index | Old Index