Module Name:    src
Committed By:   matt
Date:           Thu Dec 17 15:29:47 UTC 2009

Modified Files:
        src/sys/arch/cobalt/cobalt: machdep.c
        src/sys/arch/cobalt/conf: std.cobalt
        src/sys/arch/cobalt/include: autoconf.h bootinfo.h
Added Files:
        src/sys/arch/cobalt/conf: GENERIC32 GENERIC64 INSTALL32 INSTALL64
            RAMDISK32 RAMDISK64
        src/sys/arch/cobalt/include: netbsd32_machdep.h

Log Message:
Enable mips64 support for cobalt.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/cobalt/cobalt/machdep.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/cobalt/conf/GENERIC32 \
    src/sys/arch/cobalt/conf/GENERIC64 src/sys/arch/cobalt/conf/INSTALL32 \
    src/sys/arch/cobalt/conf/INSTALL64 src/sys/arch/cobalt/conf/RAMDISK32 \
    src/sys/arch/cobalt/conf/RAMDISK64
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/cobalt/conf/std.cobalt
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cobalt/include/autoconf.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cobalt/include/bootinfo.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/cobalt/include/netbsd32_machdep.h

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/cobalt/cobalt/machdep.c
diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.106 src/sys/arch/cobalt/cobalt/machdep.c:1.107
--- src/sys/arch/cobalt/cobalt/machdep.c:1.106	Wed Dec 16 19:01:24 2009
+++ src/sys/arch/cobalt/cobalt/machdep.c	Thu Dec 17 15:29:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.106 2009/12/16 19:01:24 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $	*/
 
 /*-
  * Copyright (c) 2006 Izumi Tsutsui.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.106 2009/12/16 19:01:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -126,7 +126,7 @@
 phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
 int mem_cluster_cnt;
 
-void	mach_init(unsigned int, u_int, char*);
+void	mach_init(unsigned int, u_int, int32_t);
 void	decode_bootstring(void);
 static char *strtok_light(char *, const char);
 static u_int read_board_id(void);
@@ -143,8 +143,10 @@
  * Do all the stuff that locore normally does before calling main().
  */
 void
-mach_init(unsigned int memsize, u_int bim, char *bip)
+mach_init(unsigned int memsize32, u_int bim, int32_t bip32)
 {
+	size_t memsize = memsize32;
+	char *bip = (void *)(intptr_t)bip32;
 	char *kernend;
 	u_long first, last;
 	extern char edata[], end[];
@@ -212,8 +214,8 @@
 	/* Load symbol table if present */
 	if (bi_syms != NULL) {
 		nsym = bi_syms->nsym;
-		ssym = (void *)bi_syms->ssym;
-		esym = (void *)bi_syms->esym;
+		ssym = (void *)(intptr_t)bi_syms->ssym;
+		esym = (void *)(intptr_t)bi_syms->esym;
 		kernend = (void *)mips_round_page(esym);
 	}
 #endif
@@ -506,7 +508,7 @@
 
 	do {
 		bt = (struct btinfo_common *)help;
-		printf("Type %d @0x%x\n", bt->type, (u_int)bt);
+		printf("Type %d @%p\n", bt->type, (void *)(intptr_t)bt);
 		if (bt->type == type)
 			return (void *)help;
 		help += bt->next;

Index: src/sys/arch/cobalt/conf/std.cobalt
diff -u src/sys/arch/cobalt/conf/std.cobalt:1.13 src/sys/arch/cobalt/conf/std.cobalt:1.14
--- src/sys/arch/cobalt/conf/std.cobalt:1.13	Tue Jul 18 12:51:01 2006
+++ src/sys/arch/cobalt/conf/std.cobalt	Thu Dec 17 15:29:47 2009
@@ -1,8 +1,8 @@
-#	$NetBSD: std.cobalt,v 1.13 2006/07/18 12:51:01 tsutsui Exp $
+#	$NetBSD: std.cobalt,v 1.14 2009/12/17 15:29:47 matt Exp $
 
 machine cobalt mips
 include		"conf/std"	# MI standard options
-makeoptions	MACHINE_ARCH="mipsel"
+#makeoptions	MACHINE_ARCH="mipsel"
 
 options 	MIPS3
 options 	MIPS3_ENABLE_CLOCK_INTR

Index: src/sys/arch/cobalt/include/autoconf.h
diff -u src/sys/arch/cobalt/include/autoconf.h:1.4 src/sys/arch/cobalt/include/autoconf.h:1.5
--- src/sys/arch/cobalt/include/autoconf.h:1.4	Thu Mar 27 15:21:46 2008
+++ src/sys/arch/cobalt/include/autoconf.h	Thu Dec 17 15:29:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.4 2008/03/27 15:21:46 tsutsui Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.5 2009/12/17 15:29:47 matt Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang.  All rights reserved.
@@ -28,8 +28,8 @@
 #include <machine/bus.h>
 
 struct mainbus_attach_args {
-	char		*ma_name;
-	unsigned long	ma_addr;
+	const char	*ma_name;
+	bus_addr_t	ma_addr;
 	bus_space_tag_t	ma_iot;
 	int		ma_level;
 	int		ma_irq;

Index: src/sys/arch/cobalt/include/bootinfo.h
diff -u src/sys/arch/cobalt/include/bootinfo.h:1.7 src/sys/arch/cobalt/include/bootinfo.h:1.8
--- src/sys/arch/cobalt/include/bootinfo.h:1.7	Sat Mar 14 14:45:58 2009
+++ src/sys/arch/cobalt/include/bootinfo.h	Thu Dec 17 15:29:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootinfo.h,v 1.7 2009/03/14 14:45:58 dsl Exp $	*/
+/*	$NetBSD: bootinfo.h,v 1.8 2009/12/17 15:29:47 matt Exp $	*/
 
 /*
  * Copyright (c) 1997, 2000-2004
@@ -33,8 +33,8 @@
 #define BOOTINFO_SIZE	1024
 
 struct btinfo_common {
-	int next;		/* offset of next item, or zero */
-	int type;
+	int32_t next;		/* offset of next item, or zero */
+	int32_t type;
 };
 
 #define BTINFO_MAGIC	1
@@ -45,7 +45,7 @@
 
 struct btinfo_magic {
 	struct btinfo_common common;
-	int magic;
+	int32_t magic;
 };
 
 #define BTINFO_BOOTPATH_LEN	80
@@ -56,9 +56,9 @@
 
 struct btinfo_symtab {
 	struct btinfo_common common;
-	int nsym;
-	int ssym;
-	int esym;
+	int32_t nsym;
+	int32_t ssym;
+	int32_t esym;
 };
 
 struct btinfo_flags {

Added files:

Index: src/sys/arch/cobalt/conf/GENERIC32
diff -u /dev/null src/sys/arch/cobalt/conf/GENERIC32:1.1
--- /dev/null	Thu Dec 17 15:29:47 2009
+++ src/sys/arch/cobalt/conf/GENERIC32	Thu Dec 17 15:29:47 2009
@@ -0,0 +1,7 @@
+# $NetBSD: GENERIC32,v 1.1 2009/12/17 15:29:47 matt Exp $
+
+include "arch/cobalt/conf/GENERIC"
+
+#ident 		"GENERIC32-$Revision: 1.1 $"
+
+no makeoptions	CPUFLAGS
Index: src/sys/arch/cobalt/conf/GENERIC64
diff -u /dev/null src/sys/arch/cobalt/conf/GENERIC64:1.1
--- /dev/null	Thu Dec 17 15:29:47 2009
+++ src/sys/arch/cobalt/conf/GENERIC64	Thu Dec 17 15:29:47 2009
@@ -0,0 +1,10 @@
+# $NetBSD: GENERIC64,v 1.1 2009/12/17 15:29:47 matt Exp $
+
+include 	"arch/cobalt/conf/GENERIC"
+
+#ident 		"GENERIC64-$Revision: 1.1 $"
+
+no makeoptions	CPUFLAGS
+makeoptions	LP64="yes"
+options 	EXEC_ELF64
+options 	COMPAT_NETBSD64
Index: src/sys/arch/cobalt/conf/INSTALL32
diff -u /dev/null src/sys/arch/cobalt/conf/INSTALL32:1.1
--- /dev/null	Thu Dec 17 15:29:47 2009
+++ src/sys/arch/cobalt/conf/INSTALL32	Thu Dec 17 15:29:47 2009
@@ -0,0 +1,5 @@
+# $NetBSD: INSTALL32,v 1.1 2009/12/17 15:29:47 matt Exp $
+
+include "arch/cobalt/conf/INSTALL"
+
+no makeoptions	CPUFLAGS
Index: src/sys/arch/cobalt/conf/INSTALL64
diff -u /dev/null src/sys/arch/cobalt/conf/INSTALL64:1.1
--- /dev/null	Thu Dec 17 15:29:47 2009
+++ src/sys/arch/cobalt/conf/INSTALL64	Thu Dec 17 15:29:47 2009
@@ -0,0 +1,10 @@
+# $NetBSD: INSTALL64,v 1.1 2009/12/17 15:29:47 matt Exp $
+
+include 	"arch/cobalt/conf/INSTALL"
+
+#ident 		"INSTALL64-$Revision: 1.1 $"
+
+no makeoptions	CPUFLAGS
+makeoptions	LP64="yes"
+options 	EXEC_ELF64
+options 	COMPAT_NETBSD64
Index: src/sys/arch/cobalt/conf/RAMDISK32
diff -u /dev/null src/sys/arch/cobalt/conf/RAMDISK32:1.1
--- /dev/null	Thu Dec 17 15:29:47 2009
+++ src/sys/arch/cobalt/conf/RAMDISK32	Thu Dec 17 15:29:47 2009
@@ -0,0 +1,7 @@
+# $NetBSD: RAMDISK32,v 1.1 2009/12/17 15:29:47 matt Exp $
+
+include "arch/cobalt/conf/RAMDISK"
+
+#ident 		"RAMDISK32-$Revision: 1.1 $"
+
+no makeoptions	CPUFLAGS
Index: src/sys/arch/cobalt/conf/RAMDISK64
diff -u /dev/null src/sys/arch/cobalt/conf/RAMDISK64:1.1
--- /dev/null	Thu Dec 17 15:29:47 2009
+++ src/sys/arch/cobalt/conf/RAMDISK64	Thu Dec 17 15:29:47 2009
@@ -0,0 +1,10 @@
+# $NetBSD: RAMDISK64,v 1.1 2009/12/17 15:29:47 matt Exp $
+
+include 	"arch/cobalt/conf/RAMDISK"
+
+#ident 		"RAMDISK64-$Revision: 1.1 $"
+
+no makeoptions	CPUFLAGS
+makeoptions	LP64="yes"
+options 	EXEC_ELF64
+options 	COMPAT_NETBSD64

Index: src/sys/arch/cobalt/include/netbsd32_machdep.h
diff -u /dev/null src/sys/arch/cobalt/include/netbsd32_machdep.h:1.1
--- /dev/null	Thu Dec 17 15:29:47 2009
+++ src/sys/arch/cobalt/include/netbsd32_machdep.h	Thu Dec 17 15:29:47 2009
@@ -0,0 +1,3 @@
+/* $NetBSD: netbsd32_machdep.h,v 1.1 2009/12/17 15:29:47 matt Exp $ */
+
+#include <mips/netbsd32_machdep.h>

Reply via email to