Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Nov 2017 02:40:15 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325258 - head/sys/powerpc/booke
Message-ID:  <201711010240.vA12eFqX051092@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Wed Nov  1 02:40:15 2017
New Revision: 325258
URL: https://svnweb.freebsd.org/changeset/base/325258

Log:
  Fix debug interrupts on 64-bit Book-E
  
  Use a WORD_SIZE macro to define the correct offset to the second word
  needed.  This corrects the offset calculation in 64-bit builds.

Modified:
  head/sys/powerpc/booke/locore.S
  head/sys/powerpc/booke/trap_subr.S

Modified: head/sys/powerpc/booke/locore.S
==============================================================================
--- head/sys/powerpc/booke/locore.S	Wed Nov  1 01:22:33 2017	(r325257)
+++ head/sys/powerpc/booke/locore.S	Wed Nov  1 02:40:15 2017	(r325258)
@@ -57,6 +57,7 @@
 #define	THREAD_REG	%r13
 #define	ADDR(x)	\
 	.llong	x
+#define	WORD_SIZE	8
 #else
 #define	GET_TOCBASE(r)
 #define	TOC_RESTORE
@@ -72,6 +73,7 @@
 #define	THREAD_REG	%r2
 #define	ADDR(x)	\
 	.long	x
+#define	WORD_SIZE	4
 #endif
 
 	.text

Modified: head/sys/powerpc/booke/trap_subr.S
==============================================================================
--- head/sys/powerpc/booke/trap_subr.S	Wed Nov  1 01:22:33 2017	(r325257)
+++ head/sys/powerpc/booke/trap_subr.S	Wed Nov  1 02:40:15 2017	(r325258)
@@ -970,19 +970,14 @@ int_debug_int:
 	GET_CPUINFO(%r3)
 	LOAD	%r3, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR0)(%r3)
 	bl	0f
-#ifdef __powerpc64__
-	.llong	interrupt_vector_base-.
-	.llong	interrupt_vector_top-.
-#else
-	.long	interrupt_vector_base-.
-	.long	interrupt_vector_top-.
-#endif
+	ADDR(interrupt_vector_base-.)
+	ADDR(interrupt_vector_top-.)
 0:	mflr	%r5
 	LOAD	%r4,0(%r5)	/* interrupt_vector_base in r4 */
 	add	%r4,%r4,%r5
 	CMPL	cr0, %r3, %r4
 	blt	trap_common
-	LOAD	%r4,4(%r5)	/* interrupt_vector_top in r4 */
+	LOAD	%r4,WORD_SIZE(%r5)	/* interrupt_vector_top in r4 */
 	add	%r4,%r4,%r5
 	addi	%r4,%r4,4
 	CMPL	cr0, %r3, %r4



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