From b5ce7fe8125da3044a2b4f2d0ef57af4d9eef5e7 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Mon, 2 Nov 2009 11:10:09 +0100 Subject: target: require working area for physical/virtual addresses to be specified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed bug: if virtual address for working memory was not specified and MMU was enabled, then address 0 would be used. Require working address to be specified for both MMU enabled and disabled case. For some completely inexplicable reason this fixes the regression in svn 2646 for flash write in arm926ejs target. The logs showed that MMU was disabled in the case below: https://lists.berlios.de/pipermail/openocd-development/2009-November/011882.html Signed-off-by: Øyvind Harboe --- src/target/target.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/target/target.h') diff --git a/src/target/target.h b/src/target/target.h index ef578378..c971f18b 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -128,9 +128,11 @@ typedef struct target_s int reset_halt; /* attempt resetting the CPU into the halted mode? */ uint32_t working_area; /* working area (initialized RAM). Evaluated * upon first allocation from virtual/physical address. */ - uint32_t working_area_virt; /* virtual address */ - uint32_t working_area_phys; /* physical address */ - uint32_t working_area_size; /* size in bytes */ + bool working_area_virt_spec; /* virtual address specified? */ + uint32_t working_area_virt; /* virtual address */ + bool working_area_phys_spec; /* virtual address specified? */ + uint32_t working_area_phys; /* physical address */ + uint32_t working_area_size; /* size in bytes */ uint32_t backup_working_area; /* whether the content of the working area has to be preserved */ struct working_area_s *working_areas;/* list of allocated working areas */ enum target_debug_reason debug_reason;/* reason why the target entered debug state */ -- cgit v1.2.3