On Thursday 10 September 2009, Øyvind Harboe wrote: > > I can see there is run_algorithm implemented in arm11.c. Can you give me > > some pointers on what needs to be added/changed? I can take a stab at > > this. > > I think David looked at this... > > Can you share David?
One issue I have with the ARM run_algorithm() stuff is that each core has a separate *interface* ... the last param is core-specific, not generic for all ARM cores. So for example the src/flash/arm_nandwrite.c code can't be used on ARMv6 or ARMv7 cores. And there are various CFI utils that can't be used either (for NOR flash). Which means if you have some ARM algorithm, you need different invocation code for ARMv4/ARMv5, ARMv6 (like arm1136), ARMv7, etc. OR ... there's pretty dubious stuff going on there, where the ARMv4/ARMv5 stuff is used as "generic ARM" even though there's a bunch of stuff that should be core-specific. Sorting all that out could be messy; but the place to start is that "arch_info" parameter. Now, the arm11 stuff (is it arm1136-specific? or does it work for other arm11 cores?) doesn't use that param. But half the code in its run_algorithm() method is commented out, Thumb isn't supported, there's a big HACKHACKHACK comment up front, and so forth. One gets the feeling it's been used much yet! So one thing to do is just to address those obvious problems in the code. Specific to the ARM1136 cores, I'm not sure the bulk_write() method is as fast as it should be. For ARMv4/ARMv5 there is some DCC write code which seems to make a big difference; it uses the run_algorithm() logic. Doesn't NOR flash writing use those bulk_write() paths? Section 14.8.14 of the ARM1136 spec shows what is claimed to be a code sequence that's optimized for fast writes. I think something using the DCC would be faster. (Note: DCC on 1136 differs from v4/v5.) - Dave _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development