PERFORCE change 134532 for review
Warner Losh
imp at FreeBSD.org
Wed Jan 30 23:05:26 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=134532
Change 134532 by imp at imp_lighthouse on 2008/01/31 07:04:55
Save 32-bits only on ISA_MIPS32. Save 64 on MIPS64. Even if you
are running a 32-bit kernel, you'll need to save 64-bits of registers
because the kernel dereferences 64-bit addresses when it is writing
to the octeon hardware. This is likely to be typical of all 64-bit
machines, so base it off of ISA_MIPS64.
There's a hack in types.h that uses ISA_MIPS64 to define a few things,
but I'm not sure that's right since this file is exported to userland.
Affected files ...
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#9 edit
Differences ...
==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#9 (text+ko) ====
@@ -243,14 +243,16 @@
*
*----------------------------------------------------------------------------
*/
-#ifndef MIPS_ISAIII
+#if defined(ISA_MIPS32)
#define STORE sw /* 32 bit mode regsave instruction */
#define LOAD lw /* 32 bit mode regload instruction */
#define RSIZE 4 /* 32 bit mode register size */
-#else
+#elif defined(ISA_MIPS64)
#define STORE sd /* 64 bit mode regsave instruction */
#define LOAD ld /* 64 bit mode regload instruction */
#define RSIZE 8 /* 64 bit mode register size */
+#else
+#error "Please write code for this isa."
#endif
#define SAVE_REG(reg, offs, base) \
More information about the p4-projects
mailing list