2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Kernel debug stuff to use the Watch registers.
7 * Useful to find stack overflows, dangling pointers etc.
9 * Copyright (C) 1995, 1996, 1999, 2001 by Ralf Baechle
12 #include <asm/mipsregs.h>
13 #include <asm/regdef.h>
17 * Parameter: a0 - physical address to watch
18 * a1 - set bit #1 to trap on load references
19 * bit #0 to trap on store references
31 mtc0 zero, CP0_WATCHHI
40 mtc0 zero, CP0_WATCHLO
47 LEAF(__watch_reenable)
54 * Saved value of the c0_watchlo register for watch_reenable()
57 .comm watch_savelo, 8, 8