Module Name: src Committed By: skrll Date: Sat Jan 22 19:35:48 UTC 2011
Modified Files: src/sys/arch/hp700/hp700: genassym.cf src/sys/arch/hppa/hppa: db_interface.c db_machdep.c kgdb_hppa.c trap.S src/sys/arch/hppa/include: frame.h Log Message: Save CR24 and CR27 and report in ddb. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hp700/hp700/genassym.cf cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hppa/hppa/db_interface.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/hppa/db_machdep.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/hppa/kgdb_hppa.c cvs rdiff -u -r1.51 -r1.52 src/sys/arch/hppa/hppa/trap.S cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/include/frame.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/hp700/hp700/genassym.cf diff -u src/sys/arch/hp700/hp700/genassym.cf:1.27 src/sys/arch/hp700/hp700/genassym.cf:1.28 --- src/sys/arch/hp700/hp700/genassym.cf:1.27 Sat Jan 22 19:27:43 2011 +++ src/sys/arch/hp700/hp700/genassym.cf Sat Jan 22 19:35:47 2011 @@ -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 Index: src/sys/arch/hppa/hppa/db_interface.c diff -u src/sys/arch/hppa/hppa/db_interface.c:1.24 src/sys/arch/hppa/hppa/db_interface.c:1.25 --- src/sys/arch/hppa/hppa/db_interface.c:1.24 Sat Jan 22 19:25:01 2011 +++ src/sys/arch/hppa/hppa/db_interface.c Sat Jan 22 19:35:48 2011 @@ -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 }, }; Index: src/sys/arch/hppa/hppa/db_machdep.c diff -u src/sys/arch/hppa/hppa/db_machdep.c:1.2 src/sys/arch/hppa/hppa/db_machdep.c:1.3 --- src/sys/arch/hppa/hppa/db_machdep.c:1.2 Mon Nov 15 06:32:38 2010 +++ src/sys/arch/hppa/hppa/db_machdep.c Sat Jan 22 19:35:48 2011 @@ -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 */ } Index: src/sys/arch/hppa/hppa/kgdb_hppa.c diff -u src/sys/arch/hppa/hppa/kgdb_hppa.c:1.7 src/sys/arch/hppa/hppa/kgdb_hppa.c:1.8 --- src/sys/arch/hppa/hppa/kgdb_hppa.c:1.7 Fri Jun 4 09:25:18 2010 +++ src/sys/arch/hppa/hppa/kgdb_hppa.c Sat Jan 22 19:35:48 2011 @@ -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 */ Index: src/sys/arch/hppa/hppa/trap.S diff -u src/sys/arch/hppa/hppa/trap.S:1.51 src/sys/arch/hppa/hppa/trap.S:1.52 --- src/sys/arch/hppa/hppa/trap.S:1.51 Sat Jan 22 10:57:07 2011 +++ src/sys/arch/hppa/hppa/trap.S Sat Jan 22 19:35:48 2011 @@ -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 Index: src/sys/arch/hppa/include/frame.h diff -u src/sys/arch/hppa/include/frame.h:1.11 src/sys/arch/hppa/include/frame.h:1.12 --- src/sys/arch/hppa/include/frame.h:1.11 Tue Mar 30 19:27:54 2010 +++ src/sys/arch/hppa/include/frame.h Sat Jan 22 19:35:48 2011 @@ -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__ */