svn commit: r206825 - in user/jmallett/octeon/sys/mips: include mips
Juli Mallett
jmallett at FreeBSD.org
Mon Apr 19 03:07:48 UTC 2010
Author: jmallett
Date: Mon Apr 19 03:07:47 2010
New Revision: 206825
URL: http://svn.freebsd.org/changeset/base/206825
Log:
Use sign extension and genassym.c rather that remarkable contortions to get
pointer-width definitions of the 32-bit kernel segment base addresses.
While here remove some unused macros.
Modified:
user/jmallett/octeon/sys/mips/include/cpuregs.h
user/jmallett/octeon/sys/mips/mips/genassym.c
Modified: user/jmallett/octeon/sys/mips/include/cpuregs.h
==============================================================================
--- user/jmallett/octeon/sys/mips/include/cpuregs.h Mon Apr 19 03:01:52 2010 (r206824)
+++ user/jmallett/octeon/sys/mips/include/cpuregs.h Mon Apr 19 03:07:47 2010 (r206825)
@@ -78,30 +78,20 @@
* Caching of mapped addresses is controlled by bits in the TLB entry.
*/
-#if defined(_LOCORE) || defined(LOCORE)
-#ifdef __mips_n64
-#define KSEG_ADDRESS(x) __CONCAT(0xffffffff, x)
-#else
-#define KSEG_ADDRESS(x) __CONCAT(0x, x)
-#endif
-#else
-#define KSEG_ADDRESS(x) ((intptr_t)(int32_t)__CONCAT(0x, x))
-#endif
-
+#if !defined(_LOCORE)
#define MIPS_KUSEG_START 0x00000000
-#define MIPS_KSEG0_START KSEG_ADDRESS(80000000)
-#define MIPS_KSEG0_END KSEG_ADDRESS(9fffffff)
-#define MIPS_KSEG1_START KSEG_ADDRESS(a0000000)
-#define MIPS_KSEG1_END KSEG_ADDRESS(bfffffff)
-#define MIPS_KSSEG_START KSEG_ADDRESS(c0000000)
-#define MIPS_KSSEG_END KSEG_ADDRESS(dfffffff)
-#define MIPS_KSEG3_START KSEG_ADDRESS(e0000000)
-#define MIPS_KSEG3_END KSEG_ADDRESS(ffffffff)
-#define MIPS_MAX_MEM_ADDR KSEG_ADDRESS(be000000)
-#define MIPS_RESERVED_ADDR KSEG_ADDRESS(bfc80000)
+#define MIPS_KSEG0_START ((intptr_t)(int32_t)0x80000000)
+#define MIPS_KSEG0_END ((intptr_t)(int32_t)0x9fffffff)
+#define MIPS_KSEG1_START ((intptr_t)(int32_t)0xa0000000)
+#define MIPS_KSEG1_END ((intptr_t)(int32_t)0xbfffffff)
+#define MIPS_KSSEG_START ((intptr_t)(int32_t)0xc0000000)
+#define MIPS_KSSEG_END ((intptr_t)(int32_t)0xdfffffff)
+#define MIPS_KSEG3_START ((intptr_t)(int32_t)0xe0000000)
+#define MIPS_KSEG3_END ((intptr_t)(int32_t)0xffffffff)
#define MIPS_KSEG2_START MIPS_KSSEG_START
#define MIPS_KSEG2_END MIPS_KSSEG_END
+#endif
#define MIPS_XKPHYS_START 0x8000000000000000
#define MIPS_XKPHYS_END 0xbfffffffffffffff
Modified: user/jmallett/octeon/sys/mips/mips/genassym.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/genassym.c Mon Apr 19 03:01:52 2010 (r206824)
+++ user/jmallett/octeon/sys/mips/mips/genassym.c Mon Apr 19 03:07:47 2010 (r206825)
@@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <sys/proc.h>
+#include <machine/cpuregs.h>
#include <machine/pcb.h>
#include <machine/sigframe.h>
#include <machine/proc.h>
@@ -98,3 +99,7 @@ ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
ASSYM(PCPU_SIZE, sizeof(struct pcpu));
ASSYM(MAXCOMLEN, MAXCOMLEN);
+
+ASSYM(MIPS_KSEG0_START, MIPS_KSEG0_START);
+ASSYM(MIPS_KSEG1_START, MIPS_KSEG1_START);
+ASSYM(MIPS_KSEG2_START, MIPS_KSEG2_START);
More information about the svn-src-user
mailing list