summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-26 12:00:56 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-26 12:00:56 -0800
commitfd5f53f035ed7af472b3edfa0afaba9c9af667a0 (patch)
tree9f7629af7ddb3b21d2a11a15e4d07b563f10e902 /src/target
parente07ad3057771eb51b6cda86c9bd9e4a92f35a129 (diff)
downloadopenocd_libswd-fd5f53f035ed7af472b3edfa0afaba9c9af667a0.tar.gz
openocd_libswd-fd5f53f035ed7af472b3edfa0afaba9c9af667a0.tar.bz2
openocd_libswd-fd5f53f035ed7af472b3edfa0afaba9c9af667a0.tar.xz
openocd_libswd-fd5f53f035ed7af472b3edfa0afaba9c9af667a0.zip
XScale: add stub {read,write}_phys routines
Just make these fail, instead of letting them write over potentially random memory. Users should be able to work around the lack of real implementations by disbling the MMU by hand ... until someone provides a Real Fix. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target')
-rw-r--r--src/target/xscale.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c
index 07fcc4c0..1a18ab85 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -1881,6 +1881,15 @@ static int xscale_read_memory(struct target *target, uint32_t address,
return ERROR_OK;
}
+static int xscale_read_phys_memory(struct target *target, uint32_t address,
+ uint32_t size, uint32_t count, uint8_t *buffer)
+{
+ /** \todo: provide a non-stub implementtion of this routine. */
+ LOG_ERROR("%s: %s is not implemented. Disable MMU?",
+ target_name(target), __func__);
+ return ERROR_FAIL;
+}
+
static int xscale_write_memory(struct target *target, uint32_t address,
uint32_t size, uint32_t count, uint8_t *buffer)
{
@@ -1959,6 +1968,15 @@ static int xscale_write_memory(struct target *target, uint32_t address,
return ERROR_OK;
}
+static int xscale_write_phys_memory(struct target *target, uint32_t address,
+ uint32_t size, uint32_t count, uint8_t *buffer)
+{
+ /** \todo: provide a non-stub implementtion of this routine. */
+ LOG_ERROR("%s: %s is not implemented. Disable MMU?",
+ target_name(target), __func__);
+ return ERROR_FAIL;
+}
+
static int xscale_bulk_write_memory(struct target *target, uint32_t address,
uint32_t count, uint8_t *buffer)
{
@@ -3684,7 +3702,9 @@ struct target_type xscale_target =
.get_gdb_reg_list = armv4_5_get_gdb_reg_list,
.read_memory = xscale_read_memory,
+ .read_phys_memory = xscale_read_phys_memory,
.write_memory = xscale_write_memory,
+ .write_phys_memory = xscale_write_phys_memory,
.bulk_write_memory = xscale_bulk_write_memory,
.checksum_memory = arm_checksum_memory,