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 by Ralf Baechle
12 #include <asm/mipsregs.h>
13 #include <asm/regdef.h>
17 * Parameter: a0 - logic address to watch
18 * Currently only KSEG0 addresses are allowed!
19 * a1 - set bit #1 to trap on load references
20 * bit #0 to trap on store references
33 mtc0 zero, CP0_WATCHHI
42 mtc0 zero, CP0_WATCHLO
49 LEAF(__watch_reenable)
56 * Saved value of the c0_watchlo register for watch_reenable()