Module Name: src
Committed By: cliff
Date: Sun Sep 13 03:30:27 UTC 2009
Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mips_machdep.c
Log Message:
- add support for MIPS_XLS616.
- add RMI and others to cidnames[]
- use MIPS_PHYS_TO_XKPHYS_CACHED to make va for msgbuf and maddr #ifdef _LP64
To generate a diff of this commit:
cvs rdiff -u -r1.205.4.1.2.1.2.11 -r1.205.4.1.2.1.2.12 \
src/sys/arch/mips/mips/mips_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/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.11 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.12
--- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.11 Sat Sep 12 18:19:17 2009
+++ src/sys/arch/mips/mips/mips_machdep.c Sun Sep 13 03:30:27 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.11 2009/09/12 18:19:17 matt Exp $ */
+/* $NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.12 2009/09/13 03:30:27 cliff Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.11 2009/09/12 18:19:17 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.205.4.1.2.1.2.12 2009/09/13 03:30:27 cliff Exp $");
#include "opt_cputype.h"
#include "opt_compat_netbsd32.h"
@@ -447,6 +447,10 @@
CPU_MIPS_HAVE_SPECIAL_CCA | (5 << CPU_MIPS_CACHED_CCA_SHIFT),
"SB-1" },
+ { MIPS_PRID_CID_RMI, MIPS_XLS616, -1, -1, -1, 0,
+ MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT,
+ "XLS616" },
+
{ 0, 0, 0, 0, 0, 0,
0, NULL }
};
@@ -471,6 +475,13 @@
"Alchemy", /* or "Alchemy Semiconductor" */
"SiByte", /* or "Broadcom Corp. (SiByte)" */
"SandCraft",
+ "Phillips",
+ "Toshiba",
+ "LSI",
+ "(unannounced)",
+ "(unannounced)",
+ "Lexra",
+ "RMI",
};
#define ncidnames (sizeof(cidnames) / sizeof(cidnames[0]))
@@ -1494,6 +1505,8 @@
bytes = mem_clusters[memcl].size;
for (i = 0; i < bytes; i += n, totalbytesleft -= n) {
+ void *maddr_va;
+
/* Print out how many MBs we have left to go. */
if ((totalbytesleft % (1024*1024)) == 0)
printf_nolog("%ld ",
@@ -1504,8 +1517,12 @@
if (n > BYTES_PER_DUMP)
n = BYTES_PER_DUMP;
- error = (*dump)(dumpdev, blkno,
- (void *)MIPS_PHYS_TO_KSEG0(maddr), n);
+#ifdef _LP64
+ maddr_va = (void *)MIPS_PHYS_TO_XKPHYS_CACHED(maddr);
+#else
+ maddr_va = (void *)MIPS_PHYS_TO_KSEG0(maddr);
+#endif
+ error = (*dump)(dumpdev, blkno, maddr_va, n);
if (error)
goto err;
maddr += n;
@@ -1565,7 +1582,11 @@
vps->end -= atop(sz);
vps->avail_end -= atop(sz);
+#ifdef _LP64
+ msgbufaddr = (void *) MIPS_PHYS_TO_XKPHYS_CACHED(ptoa(vps->end));
+#else
msgbufaddr = (void *) MIPS_PHYS_TO_KSEG0(ptoa(vps->end));
+#endif
initmsgbuf(msgbufaddr, sz);
/* Remove the last segment if it now has no pages. */