diff options
author | Bernhard Nortmann <bernhard.nortmann@web.de> | 2016-11-21 16:48:43 +0300 |
---|---|---|
committer | Bernhard Nortmann <bernhard.nortmann@web.de> | 2016-12-28 16:20:02 +0300 |
commit | 37e9965b1e17ea8ac06b033d978a49a3db5c40c3 (patch) | |
tree | 8f20ef92c43a65a5e2a5710c19e0e71580745f0f /fel.c | |
parent | 81f54c0c2739368e840cf5aca05127b6a3d808bc (diff) |
fel: Add "memmove" command
This also obsoletes fel-copy.c - for details see issue #78.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Diffstat (limited to 'fel.c')
-rw-r--r-- | fel.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -996,6 +996,7 @@ int main(int argc, char **argv) " dump address length Binary memory dump\n" " exe[cute] address Call function address\n" " reset64 address RMR request for AArch64 warm boot\n" + " memmove dest source size Copy <size> bytes within device memory\n" " readl address Read 32-bit value from device memory\n" " writel address value Write 32-bit value to device memory\n" " read address length file Write memory contents into file\n" @@ -1090,6 +1091,11 @@ int main(int argc, char **argv) } else if (strncmp(argv[1], "dump", 4) == 0 && argc > 3) { aw_fel_dump(handle, strtoul(argv[2], NULL, 0), strtoul(argv[3], NULL, 0)); skip = 3; + } else if (strcmp(argv[1], "memmove") == 0 && argc > 4) { + /* three parameters: destination addr, source addr, byte count */ + fel_memmove(handle, strtoul(argv[2], NULL, 0), + strtoul(argv[3], NULL, 0), strtoul(argv[4], NULL, 0)); + skip = 4; } else if (strcmp(argv[1], "readl") == 0 && argc > 2) { printf("0x%08x\n", fel_readl(handle, strtoul(argv[2], NULL, 0))); skip = 2; |