summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2007-06-09 22:15:13 +0000
committermarcel <marcel@FreeBSD.org>2007-06-09 22:15:13 +0000
commit41b2f34ed7264ab1cb5952e4c5a1dc5452ffcea3 (patch)
tree7473a2c0132a402260739f05de46e052a66ef387 /sys/ia64
parent75588c5a15dad18e2f69aee6a984065d314bffb7 (diff)
downloadFreeBSD-src-41b2f34ed7264ab1cb5952e4c5a1dc5452ffcea3.zip
FreeBSD-src-41b2f34ed7264ab1cb5952e4c5a1dc5452ffcea3.tar.gz
Synchronize the instruction cache after writing to memory. This is
needed for breakpoints to work.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/db_machdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/ia64/ia64/db_machdep.c b/sys/ia64/ia64/db_machdep.c
index 00f3205..e713d6d 100644
--- a/sys/ia64/ia64/db_machdep.c
+++ b/sys/ia64/ia64/db_machdep.c
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
#include <machine/db_machdep.h>
#include <machine/frame.h>
+#include <machine/kdb.h>
#include <machine/md_var.h>
#include <machine/mutex.h>
#include <machine/pcb.h>
@@ -552,6 +553,7 @@ db_write_bytes(vm_offset_t addr, size_t size, char *data)
{
jmp_buf jb;
void *prev_jb;
+ size_t cnt;
char *dst;
int ret;
@@ -559,8 +561,10 @@ db_write_bytes(vm_offset_t addr, size_t size, char *data)
ret = setjmp(jb);
if (ret == 0) {
dst = (char *)addr;
- while (size-- > 0)
+ cnt = size;
+ while (cnt-- > 0)
*dst++ = *data++;
+ kdb_cpu_sync_icache((void *)addr, size);
}
(void)kdb_jmpbuf(prev_jb);
return (ret);
OpenPOWER on IntegriCloud