Hello,
The attached patch adds backward compatibility to the recently added read/write partial target vector methods. If a given target vector has to_xfer_memory but not to_read/write_partial, the to_xfer_memory method is used.
It was implemented by adding default read/write partial methods to each target vector.
For testing, I tweaked the existing read/write memory thus:
+#if 0
return target_xfer_memory (memaddr, myaddr, len, 0);
+#else
+ return (target_read (¤t_target, TARGET_OBJECT_MEMORY,
+ NULL, myaddr, memaddr, len)
+ <= 0);
+#endif
(included in the patch for reference, must remember to delete it ...). It turned up one bug.
Comments?
Having taken the change to this point, I'm now wondering if the read/write partial methods should be merged into:
to_xfer_partial (targ, object, annex,
offset, len,
readbuf, writebuf)
as that would make migrating existing targets easier.