On Sat, Mar 17, 2012 at 10:39 AM, John <j...@clip-4-win.co.uk> wrote:
> On Sat, Mar 17, 2012 at 08:34:28AM +0000, ger...@openocd.zylin.com wrote:
>> This is an automated email from Gerrit.
>>
>> Salvador Arroyo (sarroyof...@yahoo.es) just uploaded a new patch set to 
>> Gerrit, which you can find at http://openocd.zylin.com/527
>>
>> -- gerrit
>>
>> commit 99977d7d8f170d8cd1166a455446f5bf81cb56fb
>> Author: Salvador <sarroyof...@yahoo.es>
>> Date:   Sat Mar 17 09:25:23 2012 +0100
>>
>>     Bug in src/target/mips32_pracc.c
>>
>>     The bug shows up with the command "mdw addres count" and only if 
>> count>1024 (count>0x400).
>>     The first 1024 values shows as expected, but the rest of the values  are 
>> wrong.
>
> Just wondering, but is the bug in other CPU families such as ARM?

Should not be... This is really something specific to MIPS EJTAG handling.

>
> Also, does it affect things like dumping flash contents?

Well - it should fix all reads bigger than 1KB, not related where the
address is - RAM or ROM.

Why this bug was not noted before is probably because we were always
falligng to "bulk write". Looking in the target.c :

/* use bulk writes above a certain limit. This may have to be changed */
                if (aligned > 128) {
                        retval = target->type->bulk_write_memory(target, 
address, aligned /
4, buffer);
                        if (retval != ERROR_OK)
                                return retval;
                } else {
                        retval = target_write_memory(target, address, 4, 
aligned / 4, buffer);
                        if (retval != ERROR_OK)
                                return retval;
                }

So, basically, for all addresses that are 128 bytes (and more)
aligned, mips_m4k_bulk_write_memory() was called instead of ordinary
mips_m4k_write_memory().

However, if no work-area  was defined prior to write,
mips_m4k_bulk_write_memory() will fall to ordinary slow write, and
this might be the case of Salvador (luckily :)).

Salvador,
did you define work-area in your OpenOCD cfg scripts ? If no, this
explains a bit why you have seen this bug (which in this case is
beneficial).


BR,
Drasko

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to