]> git.sur5r.net Git - openocd/commitdiff
ARM DPM: don't write low bits of watchpoint value
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 7 Dec 2009 20:05:59 +0000 (12:05 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 7 Dec 2009 22:57:43 +0000 (14:57 -0800)
The low two bits are defined as should-be-zero-or-presereved.
We'll take the zero option, it's easier to enforce.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/target/arm_dpm.c

index ff89c47653b1f0b6b53fdd659439e90a6d064476..1ddf530c879f4b539690844d2dc2591d76d65c02 100644 (file)
@@ -329,7 +329,7 @@ int arm_dpm_write_dirty_registers(struct arm_dpm *dpm, bool bpwp)
                        retval = dpm->bpwp_disable(dpm, 16 + i);
                else
                        retval = dpm->bpwp_enable(dpm, 16 + i,
-                                       wp->address, dwp->control);
+                                       wp->address & ~3, dwp->control);
 
                if (retval != ERROR_OK)
                        LOG_ERROR("%s: can't %s HW watchpoint %d",