Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jul 2009 15:04:24 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r195495 - projects/mips/sys/mips/malta
Message-ID:  <200907091504.n69F4OXN088552@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907091504.n69F4OXN088552>