Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/cobalt Enable mips64 support for cobalt.
details: https://anonhg.NetBSD.org/src/rev/0ece2c760a4f
branches: trunk
changeset: 750119:0ece2c760a4f
user: matt <matt%NetBSD.org@localhost>
date: Thu Dec 17 15:29:47 2009 +0000
description:
Enable mips64 support for cobalt.
diffstat:
sys/arch/cobalt/cobalt/machdep.c | 16 +++++++++-------
sys/arch/cobalt/conf/GENERIC32 | 7 +++++++
sys/arch/cobalt/conf/GENERIC64 | 10 ++++++++++
sys/arch/cobalt/conf/INSTALL32 | 5 +++++
sys/arch/cobalt/conf/INSTALL64 | 10 ++++++++++
sys/arch/cobalt/conf/RAMDISK32 | 7 +++++++
sys/arch/cobalt/conf/RAMDISK64 | 10 ++++++++++
sys/arch/cobalt/conf/std.cobalt | 4 ++--
sys/arch/cobalt/include/autoconf.h | 6 +++---
sys/arch/cobalt/include/bootinfo.h | 14 +++++++-------
sys/arch/cobalt/include/netbsd32_machdep.h | 3 +++
11 files changed, 73 insertions(+), 19 deletions(-)
diffs (215 lines):
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/cobalt/machdep.c
--- a/sys/arch/cobalt/cobalt/machdep.c Thu Dec 17 15:19:48 2009 +0000
+++ b/sys/arch/cobalt/cobalt/machdep.c Thu Dec 17 15:29:47 2009 +0000
@@ -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;
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/conf/GENERIC32
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/cobalt/conf/GENERIC32 Thu Dec 17 15:29:47 2009 +0000
@@ -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
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/conf/GENERIC64
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/cobalt/conf/GENERIC64 Thu Dec 17 15:29:47 2009 +0000
@@ -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
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/conf/INSTALL32
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/cobalt/conf/INSTALL32 Thu Dec 17 15:29:47 2009 +0000
@@ -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
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/conf/INSTALL64
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/cobalt/conf/INSTALL64 Thu Dec 17 15:29:47 2009 +0000
@@ -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
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/conf/RAMDISK32
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/cobalt/conf/RAMDISK32 Thu Dec 17 15:29:47 2009 +0000
@@ -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
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/conf/RAMDISK64
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/cobalt/conf/RAMDISK64 Thu Dec 17 15:29:47 2009 +0000
@@ -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
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/conf/std.cobalt
--- a/sys/arch/cobalt/conf/std.cobalt Thu Dec 17 15:19:48 2009 +0000
+++ b/sys/arch/cobalt/conf/std.cobalt Thu Dec 17 15:29:47 2009 +0000
@@ -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
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/include/autoconf.h
--- a/sys/arch/cobalt/include/autoconf.h Thu Dec 17 15:19:48 2009 +0000
+++ b/sys/arch/cobalt/include/autoconf.h Thu Dec 17 15:29:47 2009 +0000
@@ -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;
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/include/bootinfo.h
--- a/sys/arch/cobalt/include/bootinfo.h Thu Dec 17 15:19:48 2009 +0000
+++ b/sys/arch/cobalt/include/bootinfo.h Thu Dec 17 15:29:47 2009 +0000
@@ -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 {
diff -r fcf6763bc986 -r 0ece2c760a4f sys/arch/cobalt/include/netbsd32_machdep.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/cobalt/include/netbsd32_machdep.h Thu Dec 17 15:29:47 2009 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: netbsd32_machdep.h,v 1.1 2009/12/17 15:29:47 matt Exp $ */
+
+#include <mips/netbsd32_machdep.h>
Home |
Main Index |
Thread Index |
Old Index