svn commit: r195495 - projects/mips/sys/mips/malta

Warner Losh imp at FreeBSD.org
Thu Jul 9 15:04:25 UTC 2009


Author: imp
Date: Thu Jul  9 15:04:24 2009
New Revision: 195495
URL: http://svn.freebsd.org/changeset/base/195495

Log:
  Make the yamon function pointer stuff 64-bit safe.  Make the base
  unsigned long, and sign extend the address of the function we're
  calling through.

Modified:
  projects/mips/sys/mips/malta/yamon.h

Modified: projects/mips/sys/mips/malta/yamon.h
==============================================================================
--- projects/mips/sys/mips/malta/yamon.h	Thu Jul  9 14:54:09 2009	(r195494)
+++ projects/mips/sys/mips/malta/yamon.h	Thu Jul  9 15:04:24 2009	(r195495)
@@ -38,7 +38,7 @@
 #ifndef _MALTA_YAMON_H_
 #define _MALTA_YAMON_H_
 
-#define YAMON_FUNCTION_BASE	0x1fc00500
+#define YAMON_FUNCTION_BASE	0x1fc00500ul
 
 #define YAMON_PRINT_COUNT_OFS	(YAMON_FUNCTION_BASE + 0x04)
 #define YAMON_EXIT_OFS		(YAMON_FUNCTION_BASE + 0x20)
@@ -53,7 +53,7 @@
 #define YAMON_GETCHAR_OFS	(YAMON_FUNCTION_BASE + 0x50)
 #define YAMON_SYSCON_READ_OFS	(YAMON_FUNCTION_BASE + 0x54)
 
-#define YAMON_FUNC(ofs)		(*(uint32_t *)(MIPS_PHYS_TO_KSEG0(ofs)))
+#define YAMON_FUNC(ofs)		((long)(*(int32_t *)(MIPS_PHYS_TO_KSEG0(ofs))))
 
 typedef void (*t_yamon_print_count)(uint32_t port, char *s, uint32_t count);
 #define YAMON_PRINT_COUNT(s, count) \


More information about the svn-src-projects mailing list