On Mon, May 2, 2011 at 4:11 AM, Eric Cooper <e...@cmu.edu> wrote: > On Mon, May 02, 2011 at 03:24:00AM +0200, Øyvind Harboe wrote: >> Also, don't you need to flush the data cache somehow before >> invalidating the data cache? > > Good question. I thought the arm926ejs write code, which feroceon > uses, was already doing that. But I really don't know enough about > this architecture. This seems to work, but I've only tested it > lightly. Is there any kind of test suite I could use?
No. Writing a test suite to test cache and MMU handling is fiendeshly difficult. It would require intimate knowledge of the CPU, cache sizes, etc. Some high level testing + code review + drop into master branch is probably the best we can hope for at this point. > Or any feroceon experts who could review it? The clearer and crisper the cache and better documented it is, the bigger your chance that the feroceon experts on this list (there are some ;-), will review it. >> For now ARM targets have implemented the handling >> of caches and breakpoints in target->type->write_memory() >> by making single word writes(16 and 32) safe for setting >> and restoring software breakpoints. > > The arm926ejs_write_memory code says: > "Also it should be moved to the callbacks that handle breakpoints > specifically and not the generic memory write fn's. See XScale code." > And the XScale code does it somewhat similarly to my patch: with cache > invalidation in just the breakpoint set/unset routines. I'd have to agree with that comment. If it is possible, I'd like to see the breakpoint cache handling done in the breakpoint code rather than the generic memory write code... > In any case, I'll "un-generalize" my patch and resubmit a new version. > > -- > Eric Cooper e c c @ c m u . e d u > _______________________________________________ > Openocd-development mailing list > Openocd-development@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/openocd-development > -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development