|
From: Richard C. <Ric...@su...> - 2004-05-04 14:32:05
|
Hi Marcelo,
Another patch against 2.4.26:
[sh64] Add a new config option to selectively enable the SR.WATCH bit
during boot. If enabled, the bit remains set in SR in both kernel and
user mode. It allows hardware watchpoints and tracing to be set up and
used across the debug link to help in diagnosing problems.
Please apply.
Cheers
Richard
--- sh64--to-marcelo--040430--patch-3/arch/sh64/config.in 2004-04-30 12:53:29.000000000 +0100
+++ sh64--to-marcelo--040430--patch-4/arch/sh64/config.in 2004-05-04 13:56:04.000000000 +0100
@@ -304,6 +304,7 @@
bool "Debug: audit page tables on return from syscall/exception/interrupt" CONFIG_SH64_PAGE_TABLE_AUDIT
dep_bool "Debug: report TLB fill/purge activity through /proc/tlb" CONFIG_SH64_PROC_TLB $CONFIG_PROC_FS
dep_bool "Debug: report ASIDS through /proc/asids" CONFIG_SH64_PROC_ASIDS $CONFIG_PROC_FS
+bool "Debug: set SR.WATCH to enable hardware watchpoints and trace" CONFIG_SH64_SR_WATCH
int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0
diff -urN -x {arch} -x ',,*' -x .arch-ids sh64--to-marcelo--040430--patch-3/arch/sh64/defconfig sh64--to-marcelo--040430--patch-4/arch/sh64/defconfig
--- sh64--to-marcelo--040430--patch-3/arch/sh64/defconfig 2004-04-30 12:53:29.000000000 +0100
+++ sh64--to-marcelo--040430--patch-4/arch/sh64/defconfig 2004-05-04 13:56:04.000000000 +0100
@@ -490,6 +490,7 @@
# CONFIG_SH64_PAGE_TABLE_AUDIT is not set
# CONFIG_SH64_PROC_TLB is not set
# CONFIG_SH64_PROC_ASIDS is not set
+# CONFIG_SH64_SR_WATCH is not set
#
# Library routines
diff -urN -x {arch} -x ',,*' -x .arch-ids sh64--to-marcelo--040430--patch-3/arch/sh64/kernel/entry.S sh64--to-marcelo--040430--patch-4/arch/sh64/kernel/entry.S
--- sh64--to-marcelo--040430--patch-3/arch/sh64/kernel/entry.S 2004-04-30 12:53:29.000000000 +0100
+++ sh64--to-marcelo--040430--patch-4/arch/sh64/kernel/entry.S 2004-05-04 13:56:04.000000000 +0100
@@ -1607,12 +1607,6 @@
shlli r36, 31, r36
andc r1, r36, r1 /* turn sr.mmu off in real mode section */
- /* Bodge : force sr.watch high on return. Can't understand why else this
- isn't happening. */
- movi 1, r38
- shlli r38, 26, r38
- or r38, r0, r0
-
putcon r1, ssr
_loada .poke0-CONFIG_CACHED_MEMORY_OFFSET, r36 /* real mode target address */
_loada 1f, r37 /* virtual mode return addr */
diff -urN -x {arch} -x ',,*' -x .arch-ids sh64--to-marcelo--040430--patch-3/include/asm-sh64/processor.h sh64--to-marcelo--040430--patch-4/include/asm-sh64/processor.h
--- sh64--to-marcelo--040430--patch-3/include/asm-sh64/processor.h 2004-04-30 12:53:29.000000000 +0100
+++ sh64--to-marcelo--040430--patch-4/include/asm-sh64/processor.h 2004-05-04 13:56:04.000000000 +0100
@@ -101,7 +101,7 @@
*/
#define SR_FD 0x00008000
-#ifdef ST_DEBUG
+#if defined(CONFIG_SH64_SR_WATCH)
#define SR_MMU 0x84000000
#else
#define SR_MMU 0x80000000
diff -urN -x {arch} -x ',,*' -x .arch-ids sh64--to-marcelo--040430--patch-3/include/asm-sh64/registers.h sh64--to-marcelo--040430--patch-4/include/asm-sh64/registers.h
--- sh64--to-marcelo--040430--patch-3/include/asm-sh64/registers.h 2004-04-30 12:53:29.000000000 +0100
+++ sh64--to-marcelo--040430--patch-4/include/asm-sh64/registers.h 2004-05-04 13:56:04.000000000 +0100
@@ -115,7 +115,7 @@
#define SR_HARMLESS 0x00000000500080f0 /* Write ignores for most */
#define SR_ENABLE_FPU 0xffffffffffff7fff /* AND with this */
-#ifdef ST_DEBUG
+#if defined (CONFIG_SH64_SR_WATCH)
#define SR_ENABLE_MMU 0x0000000084000000 /* OR with this */
#else
#define SR_ENABLE_MMU 0x0000000080000000 /* OR with this */
--
Richard \\\ SH-4/SH-5 Core & Debug Architect
Curnow \\\ SuperH (UK) Ltd, Bristol
|