PERFORCE change 31183 for review
Juli Mallett
jmallett at FreeBSD.org
Wed May 14 12:59:48 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31183
Change 31183 by jmallett at jmallett_dalek on 2003/05/14 12:59:33
Use vm_offset_t, not 'unsigned' for the MIPS_foo_TO_bar
macros. Add XKSEG definition. Might be good to redo
this header with Modern Times in mind, at least the addr
bits.
Affected files ...
.. //depot/projects/mips/sys/mips/include/cpuregs.h#8 edit
Differences ...
==== //depot/projects/mips/sys/mips/include/cpuregs.h#8 (text+ko) ====
@@ -76,6 +76,7 @@
*/
#define MIPS_KUSEG_START 0x0
+#define MIPS_XKSEG_START 0xc000000000000000
#define MIPS_KSEG0_START 0xffffffff80000000
#define MIPS_KSEG1_START 0xffffffffa0000000
#define MIPS_KSEG2_START 0xffffffffc0000000
@@ -84,16 +85,14 @@
#define MIPS_PHYS_MASK 0x000000001fffffff
-#define MIPS_KSEG0_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK)
-#define MIPS_PHYS_TO_KSEG0(x) ((unsigned)(x) | MIPS_KSEG0_START)
-#define MIPS_KSEG1_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK)
-#define MIPS_PHYS_TO_KSEG1(x) ((unsigned)(x) | MIPS_KSEG1_START)
-#define MIPS_KSEG2_TO_PHYS(x) ((unsigned)(x) & MIPS_PHYS_MASK)
-#define MIPS_PHYS_TO_KSEG2(x) ((unsigned)(x) | MIPS_KSEG2_START)
+#define MIPS_KSEG0_TO_PHYS(x) ((vm_offset_t)(x) & MIPS_PHYS_MASK)
+#define MIPS_PHYS_TO_KSEG0(x) ((vm_offset_t)(x) | MIPS_KSEG0_START)
+#define MIPS_KSEG1_TO_PHYS(x) ((vm_offset_t)(x) & MIPS_PHYS_MASK)
+#define MIPS_PHYS_TO_KSEG1(x) ((vm_offset_t)(x) | MIPS_KSEG1_START)
/* Map virtual address to index in mips3 r4k virtually-indexed cache */
#define MIPS3_VA_TO_CINDEX(x) \
- ((unsigned)(x) & 0xffffff | MIPS_KSEG0_START)
+ ((vm_offset_t)(x) & 0xffffff | MIPS_KSEG0_START)
#define MIPS_PHYS_TO_XKPHYS(cca,x) \
((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x))
More information about the p4-projects
mailing list