Enable mips64 support for cobalt.

This commit is contained in:
matt 2009-12-17 15:29:47 +00:00
parent b56987f3f3
commit 4c499c3460
11 changed files with 73 additions and 19 deletions

View File

@ -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 @@ static const char * const cobalt_model[] =
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 @@ extern char *esym;
* 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 @@ mach_init(unsigned int memsize, u_int bim, char *bip)
/* 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 @@ lookup_bootinfo(int type)
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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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_common {
struct btinfo_magic {
struct btinfo_common common;
int magic;
int32_t magic;
};
#define BTINFO_BOOTPATH_LEN 80
@ -56,9 +56,9 @@ struct btinfo_bootpath {
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 {

View File

@ -0,0 +1,3 @@
/* $NetBSD: netbsd32_machdep.h,v 1.1 2009/12/17 15:29:47 matt Exp $ */
#include <mips/netbsd32_machdep.h>