Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Save CR24 and CR27 and report in ddb.
details: https://anonhg.NetBSD.org/src/rev/d937680293be
branches: trunk
changeset: 761283:d937680293be
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Jan 22 19:35:47 2011 +0000
description:
Save CR24 and CR27 and report in ddb.
diffstat:
sys/arch/hp700/hp700/genassym.cf | 4 +++-
sys/arch/hppa/hppa/db_interface.c | 6 ++++--
sys/arch/hppa/hppa/db_machdep.c | 6 ++++--
sys/arch/hppa/hppa/kgdb_hppa.c | 6 +++---
sys/arch/hppa/hppa/trap.S | 16 +++++++++++++---
sys/arch/hppa/include/frame.h | 6 ++++--
6 files changed, 31 insertions(+), 13 deletions(-)
diffs (167 lines):
diff -r e9126ee8c597 -r d937680293be sys/arch/hp700/hp700/genassym.cf
--- a/sys/arch/hp700/hp700/genassym.cf Sat Jan 22 19:35:00 2011 +0000
+++ b/sys/arch/hp700/hp700/genassym.cf Sat Jan 22 19:35:47 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.27 2011/01/22 19:27:43 skrll Exp $
+# $NetBSD: genassym.cf,v 1.28 2011/01/22 19:35:47 skrll Exp $
# $OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $
@@ -175,7 +175,9 @@
member TF_CR21 tf_ior
member TF_CR22 tf_ipsw
member TF_CR23 tf_eirr
+member TF_CR24 tf_cr24
member TF_CR25 tf_vtop
+member TF_CR27 tf_cr27
member TF_CR28 tf_cr28
member TF_CR30 tf_cr30
diff -r e9126ee8c597 -r d937680293be sys/arch/hppa/hppa/db_interface.c
--- a/sys/arch/hppa/hppa/db_interface.c Sat Jan 22 19:35:00 2011 +0000
+++ b/sys/arch/hppa/hppa/db_interface.c Sat Jan 22 19:35:47 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.24 2011/01/22 19:25:01 skrll Exp $ */
+/* $NetBSD: db_interface.c,v 1.25 2011/01/22 19:35:48 skrll Exp $ */
/* $OpenBSD: db_interface.c,v 1.16 2001/03/22 23:31:45 mickey Exp $ */
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.24 2011/01/22 19:25:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.25 2011/01/22 19:35:48 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -123,6 +123,8 @@
#endif
{ "vtop", (long *)&ddb_regs.tf_vtop, FCN_NULL },
+ { "cr24", (long *)&ddb_regs.tf_cr24, FCN_NULL },
+ { "cr27", (long *)&ddb_regs.tf_cr27, FCN_NULL },
{ "cr28", (long *)&ddb_regs.tf_cr28, FCN_NULL },
{ "cr30", (long *)&ddb_regs.tf_cr30, FCN_NULL },
};
diff -r e9126ee8c597 -r d937680293be sys/arch/hppa/hppa/db_machdep.c
--- a/sys/arch/hppa/hppa/db_machdep.c Sat Jan 22 19:35:00 2011 +0000
+++ b/sys/arch/hppa/hppa/db_machdep.c Sat Jan 22 19:35:47 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.2 2010/11/15 06:32:38 uebayasi Exp $ */
+/* $NetBSD: db_machdep.c,v 1.3 2011/01/22 19:35:48 skrll Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.2 2010/11/15 06:32:38 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.3 2011/01/22 19:35:48 skrll Exp $");
#include <sys/param.h>
#include <sys/lwp.h>
@@ -122,7 +122,9 @@
db_printf("rctr: %08x\n", tf->tf_rctr); /* cr0 */
db_printf("ccr: %08x\n", tf->tf_ccr); /* cr10 */
db_printf("eirr: %08x\n", tf->tf_eirr); /* cr23 - DDB */
+ db_printf("cr24: %08x\n", tf->tf_cr24); /* cr24 - DDB */
db_printf("vtop: %08x\n", tf->tf_vtop); /* cr25 - DDB */
+ db_printf("cr27: %08x\n", tf->tf_cr27); /* - DDB */
db_printf("cr28: %08x\n", tf->tf_cr28); /* - DDB */
db_printf("cr30: %08x\n", tf->tf_cr30); /* uaddr */
}
diff -r e9126ee8c597 -r d937680293be sys/arch/hppa/hppa/kgdb_hppa.c
--- a/sys/arch/hppa/hppa/kgdb_hppa.c Sat Jan 22 19:35:00 2011 +0000
+++ b/sys/arch/hppa/hppa/kgdb_hppa.c Sat Jan 22 19:35:47 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kgdb_hppa.c,v 1.7 2010/06/04 09:25:18 skrll Exp $ */
+/* $NetBSD: kgdb_hppa.c,v 1.8 2011/01/22 19:35:48 skrll Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.7 2010/06/04 09:25:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_hppa.c,v 1.8 2011/01/22 19:35:48 skrll Exp $");
#include <sys/param.h>
#include <sys/kgdb.h>
@@ -209,7 +209,7 @@
KGDB_MOVEREG(57, tf_hptm); /* cr24 - DDB */ \
KGDB_MOVEREG(58, tf_vtop); /* cr25 - DDB */ \
/* 59 should be cr26, which we don't have available */ \
- /* 60 should be cr27, which we don't have available */ \
+ KGDB_MOVEREG(60, tf_cr27); /* - DDB */ \
KGDB_MOVEREG(61, tf_cr28); /* - DDB */ \
/* 62 should be cr29, which we don't have available */ \
KGDB_MOVEREG(63, tf_cr30) /* uaddr */
diff -r e9126ee8c597 -r d937680293be sys/arch/hppa/hppa/trap.S
--- a/sys/arch/hppa/hppa/trap.S Sat Jan 22 19:35:00 2011 +0000
+++ b/sys/arch/hppa/hppa/trap.S Sat Jan 22 19:35:47 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.S,v 1.51 2011/01/22 10:57:07 skrll Exp $ */
+/* $NetBSD: trap.S,v 1.52 2011/01/22 19:35:48 skrll Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -375,8 +375,13 @@
stw %arg0, TF_CR23-TRAPFRAME_SIZEOF(%sr1, %t3)
stw %arg1, TF_CR25-TRAPFRAME_SIZEOF(%sr1, %t3)
+ mfctl %cr24, %arg0
mfctl %cr28, %arg1
+ stw %arg0, TF_CR24-TRAPFRAME_SIZEOF(%sr1, %t3)
stw %arg1, TF_CR28-TRAPFRAME_SIZEOF(%sr1, %t3)
+
+ mfctl CR_TLS, %arg0
+ stw %arg0, TF_CR27-TRAPFRAME_SIZEOF(%sr1, %t3)
#endif
/* setup kernel context */
@@ -2185,11 +2190,16 @@
stw %t1, TF_CR23(%t3)
stw %t2, TF_CR25(%t3)
+ mfctl %cr24, %t1
mfctl %cr28, %t2
+ stw %t1, TF_CR24(%t3)
stw %t2, TF_CR28(%t3)
+
+ mfctl CR_TLS, %t1
+ stw %t1, TF_CR27(%t3)
#endif
- mfctl CR_FPPADDR, %t1
- stw %t1, TF_CR30(%t3)
+ mfctl CR_FPPADDR, %t2
+ stw %t2, TF_CR30(%t3)
/*
* load the global pointer for the kernel
diff -r e9126ee8c597 -r d937680293be sys/arch/hppa/include/frame.h
--- a/sys/arch/hppa/include/frame.h Sat Jan 22 19:35:00 2011 +0000
+++ b/sys/arch/hppa/include/frame.h Sat Jan 22 19:35:47 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: frame.h,v 1.11 2010/03/30 19:27:54 skrll Exp $ */
+/* $NetBSD: frame.h,v 1.12 2011/01/22 19:35:48 skrll Exp $ */
/* $OpenBSD: frame.h,v 1.11 1999/11/25 18:28:06 mickey Exp $ */
@@ -132,11 +132,13 @@
u_int tf_rctr; /* cr0 */
u_int tf_ccr; /* cr10 */
u_int tf_eirr; /* cr23 - DDB */
+ u_int tf_cr24; /* cr24 - DDB */
u_int tf_vtop; /* cr25 - DDB */
+ u_int tf_cr27; /* - DDB */
u_int tf_cr28; /* - DDB */
u_int tf_cr30; /* fpregs */
- u_int tf_pad[4]; /* pad to 256 bytes */
+ u_int tf_pad[2]; /* pad to 256 bytes */
};
#endif /* !__ASSEMBLER__ */
Home |
Main Index |
Thread Index |
Old Index