I'm thinking about adding these two fn's to target->type. It would
provide a polymorphic interface on top of which we can implement
general mrc/mcr commands.

Do we need anything but cp15? If not, then cpnum could be
omitted.


        /* Read coprocessor - arm specific. Default implementation returns 
error. */
        int (*mrc)(struct target_s *target, int cpnum, uint32_t op1, uint32_t
op2, uint32_t CRn, uint32_t CRm, uint32_t *value);

        /* Write coprocessor. Default implementation returns error.  */
        int (*mrc)(struct target_s *target, int cpnum, uint32_t op1, uint32_t
op2, uint32_t CRn, uint32_t CRm, uint32_t value);


Regarding command syntax, since we're omitting the register
to/from argument we're not 100% compatible with the machine code
syntax anyway.

For the mrc(read) operation, I was thinking about having the register
read returned as a Tcl result, so one could do:

set result [mrc x y ...]


I want the commands to be tcl friendly, on top of which we can implement
tcl wrappers for humans.

-- 
Øyvind Harboe
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

Reply via email to