Module Name:    src
Committed By:   nisimura
Date:           Tue Jan 11 13:29:09 UTC 2011

Modified Files:
        src/sys/arch/sandpoint/conf: GENERIC
        src/sys/arch/sandpoint/sandpoint: machdep.c

Log Message:
step forward to MODULAR sandpoint kernel. disabled until all work gets done.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/sandpoint/conf/GENERIC
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/sandpoint/sandpoint/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sandpoint/conf/GENERIC
diff -u src/sys/arch/sandpoint/conf/GENERIC:1.50 src/sys/arch/sandpoint/conf/GENERIC:1.51
--- src/sys/arch/sandpoint/conf/GENERIC:1.50	Sat Aug  7 19:18:04 2010
+++ src/sys/arch/sandpoint/conf/GENERIC	Tue Jan 11 13:29:09 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.50 2010/08/07 19:18:04 phx Exp $
+# $NetBSD: GENERIC,v 1.51 2011/01/11 13:29:09 nisimura Exp $
 #
 # machine description file for GENERIC NAS
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.50 $"
+#ident 		"GENERIC-$Revision: 1.51 $"
 
 maxusers	32
 
@@ -35,6 +35,8 @@
 #options 	IPKDBSECURE	# Allow debugging even when securelevel > 0
 #makeoptions	DEBUG="-g"
 
+#options 	MODULAR			# module(7) support
+
 #options 	DEBUG
 options 	DIAGNOSTIC
 options 	TRAP_PANICWAIT

Index: src/sys/arch/sandpoint/sandpoint/machdep.c
diff -u src/sys/arch/sandpoint/sandpoint/machdep.c:1.52 src/sys/arch/sandpoint/sandpoint/machdep.c:1.53
--- src/sys/arch/sandpoint/sandpoint/machdep.c:1.52	Mon Dec 20 00:25:42 2010
+++ src/sys/arch/sandpoint/sandpoint/machdep.c	Tue Jan 11 13:29:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.52 2010/12/20 00:25:42 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.53 2011/01/11 13:29:09 nisimura Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,13 +32,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.52 2010/12/20 00:25:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.53 2011/01/11 13:29:09 nisimura Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
 #include "opt_ipkdb.h"
 #include "opt_modular.h"
 #include "opt_interrupt.h"
+#include "opt_modular.h"
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -58,6 +59,7 @@
 #include <sys/sysctl.h>
 #include <sys/systm.h>
 #include <sys/ksyms.h>
+#include <sys/module.h>
 
 #include <uvm/uvm_extern.h>
 
@@ -389,6 +391,27 @@
 	while (1) ; /* may practice PPC processor reset sequence here */
 }
 
+#ifdef MODULAR
+void
+module_init_md(void)
+{
+        struct btinfo_modulelist *module;
+	struct bi_modulelist_entry *bi, *biend;
+
+        module = lookup_bootinfo(BTINFO_MODULELIST);
+        if (module == NULL)
+		return;
+	bi = (struct bi_modulelist_entry *)(module + 1);
+	biend = bi + module->num;
+	while (bi < biend) {
+		printf("module %s at 0x%08x size %x\n", 
+		    bi->kmod, bi->base, bi->len);
+		/* module_prime((void *)bi->base, bi->len); */
+		bi += 1;
+	}
+}
+#endif /* MODULAR */
+
 struct powerpc_bus_space sandpoint_io_space_tag = {
 	_BUS_SPACE_LITTLE_ENDIAN|_BUS_SPACE_IO_TYPE,
 	0xfe000000, 0x00000000, 0x00c00000,

Reply via email to