summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2004-07-27 03:46:34 +0000
committergrehan <grehan@FreeBSD.org>2004-07-27 03:46:34 +0000
commita745685147cf8bdd139918b29529822fc40acdf6 (patch)
treee1495e09e390d6e6770c55d22933fb675041276d /sys/powerpc
parent1c3958ce8889b6f1132d0eb839e7597d051cba31 (diff)
downloadFreeBSD-src-a745685147cf8bdd139918b29529822fc40acdf6.zip
FreeBSD-src-a745685147cf8bdd139918b29529822fc40acdf6.tar.gz
Save DAR/DSISR in DDB regsave area when stack overflow detected. It's
hard to work out where the problem was without these.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/trap_subr.S4
-rw-r--r--sys/powerpc/powerpc/trap_subr.S4
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/powerpc/aim/trap_subr.S b/sys/powerpc/aim/trap_subr.S
index 828192e..cc5cd8d 100644
--- a/sys/powerpc/aim/trap_subr.S
+++ b/sys/powerpc/aim/trap_subr.S
@@ -373,6 +373,10 @@ disitrap:
/* Now convert this DSI into a DDB trap. */
GET_CPUINFO(%r1)
+ lwz %r30,(PC_TEMPSAVE+CPUSAVE_DAR)(%r1) /* get DAR */
+ stw %r30,(PC_DBSAVE +CPUSAVE_DAR)(%r1) /* save DAR */
+ lwz %r30,(PC_TEMPSAVE+CPUSAVE_DSISR)(%r1) /* get DSISR */
+ lwz %r30,(PC_DBSAVE +CPUSAVE_DSISR)(%r1) /* save DSISR */
lwz %r30,(PC_DISISAVE+CPUSAVE_R28)(%r1) /* get r28 */
stw %r30,(PC_DBSAVE +CPUSAVE_R28)(%r1) /* save r28 */
lwz %r31,(PC_DISISAVE+CPUSAVE_R29)(%r1) /* get r29 */
diff --git a/sys/powerpc/powerpc/trap_subr.S b/sys/powerpc/powerpc/trap_subr.S
index 828192e..cc5cd8d 100644
--- a/sys/powerpc/powerpc/trap_subr.S
+++ b/sys/powerpc/powerpc/trap_subr.S
@@ -373,6 +373,10 @@ disitrap:
/* Now convert this DSI into a DDB trap. */
GET_CPUINFO(%r1)
+ lwz %r30,(PC_TEMPSAVE+CPUSAVE_DAR)(%r1) /* get DAR */
+ stw %r30,(PC_DBSAVE +CPUSAVE_DAR)(%r1) /* save DAR */
+ lwz %r30,(PC_TEMPSAVE+CPUSAVE_DSISR)(%r1) /* get DSISR */
+ lwz %r30,(PC_DBSAVE +CPUSAVE_DSISR)(%r1) /* save DSISR */
lwz %r30,(PC_DISISAVE+CPUSAVE_R28)(%r1) /* get r28 */
stw %r30,(PC_DBSAVE +CPUSAVE_R28)(%r1) /* save r28 */
lwz %r31,(PC_DISISAVE+CPUSAVE_R29)(%r1) /* get r29 */
OpenPOWER on IntegriCloud