Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode add procfs support
details: https://anonhg.NetBSD.org/src/rev/dc4d3efd7b02
branches: trunk
changeset: 768664:dc4d3efd7b02
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Aug 24 10:59:10 2011 +0000
description:
add procfs support
diffstat:
sys/arch/usermode/conf/GENERIC | 5 ++-
sys/arch/usermode/conf/files.usermode | 3 +-
sys/arch/usermode/include/ptrace.h | 3 +-
sys/arch/usermode/usermode/procfs_machdep.c | 42 +++++++++++++++++++++++++++++
4 files changed, 49 insertions(+), 4 deletions(-)
diffs (102 lines):
diff -r f2adbb1e77fc -r dc4d3efd7b02 sys/arch/usermode/conf/GENERIC
--- a/sys/arch/usermode/conf/GENERIC Wed Aug 24 10:57:48 2011 +0000
+++ b/sys/arch/usermode/conf/GENERIC Wed Aug 24 10:59:10 2011 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: GENERIC,v 1.12 2011/08/23 12:27:01 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.13 2011/08/24 10:59:10 jmcneill Exp $
include "arch/usermode/conf/std.usermode"
options INCLUDE_CONFIG_FILE
-#ident "GENERIC-$Revision: 1.12 $"
+#ident "GENERIC-$Revision: 1.13 $"
maxusers 32
makeoptions DEBUG="-O1 -g3"
@@ -29,6 +29,7 @@
file-system FFS
file-system FDESC
file-system KERNFS
+file-system PROCFS
file-system TMPFS
options INET
diff -r f2adbb1e77fc -r dc4d3efd7b02 sys/arch/usermode/conf/files.usermode
--- a/sys/arch/usermode/conf/files.usermode Wed Aug 24 10:57:48 2011 +0000
+++ b/sys/arch/usermode/conf/files.usermode Wed Aug 24 10:59:10 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.usermode,v 1.4 2011/08/12 12:59:13 jmcneill Exp $
+# $NetBSD: files.usermode,v 1.5 2011/08/24 10:59:10 jmcneill Exp $
maxpartitions 8
maxusers 8 16 64
@@ -30,6 +30,7 @@
file arch/usermode/usermode/machdep.c
file arch/usermode/usermode/pmap.c
file arch/usermode/usermode/process_machdep.c
+file arch/usermode/usermode/procfs_machdep.c procfs
file arch/usermode/usermode/sys_machdep.c
file arch/usermode/usermode/syscall.c
file arch/usermode/usermode/trap.c
diff -r f2adbb1e77fc -r dc4d3efd7b02 sys/arch/usermode/include/ptrace.h
--- a/sys/arch/usermode/include/ptrace.h Wed Aug 24 10:57:48 2011 +0000
+++ b/sys/arch/usermode/include/ptrace.h Wed Aug 24 10:59:10 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ptrace.h,v 1.3 2009/10/21 16:06:59 snj Exp $ */
+/* $NetBSD: ptrace.h,v 1.4 2011/08/24 10:59:10 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,5 +31,6 @@
#include </usr/include/machine/ptrace.h>
#undef __HAVE_PTRACE_MACHDEP
+#undef __HAVE_PROCFS_MACHDEP
#endif /* !_ARCH_USERMODE_INCLUDE_PTRACE_H */
diff -r f2adbb1e77fc -r dc4d3efd7b02 sys/arch/usermode/usermode/procfs_machdep.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/usermode/usermode/procfs_machdep.c Wed Aug 24 10:59:10 2011 +0000
@@ -0,0 +1,42 @@
+/* $NetBSD: procfs_machdep.c,v 1.1 2011/08/24 10:59:37 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.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: procfs_machdep.c,v 1.1 2011/08/24 10:59:37 jmcneill Exp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+
+#include <miscfs/procfs/procfs.h>
+
+int
+procfs_getcpuinfstr(char *bf, int *len)
+{
+ *len = 0;
+ return 0;
+}
Home |
Main Index |
Thread Index |
Old Index