Rui Miguel Silva | 433f15a | 2022-05-11 10:55:40 +0100 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
Heinrich Schuchardt | 1b0c316 | 2024-01-14 14:53:13 +0100 | [diff] [blame] | 3 | .. index:: |
| 4 | single: loadm (command) |
| 5 | |
Rui Miguel Silva | 433f15a | 2022-05-11 10:55:40 +0100 | [diff] [blame] | 6 | loadm command |
| 7 | ============= |
| 8 | |
| 9 | Synopsis |
| 10 | -------- |
| 11 | |
| 12 | :: |
| 13 | |
| 14 | loadm <src_addr> <dst_addr> <len> |
| 15 | |
| 16 | Description |
| 17 | ----------- |
| 18 | |
| 19 | The loadm command is used to copy memory content from source address |
| 20 | to destination address and, if efi is enabled, will setup a "Mem" efi |
| 21 | boot device. |
| 22 | |
| 23 | The number of transferred bytes must be set by bytes parameter |
| 24 | |
| 25 | src_addr |
| 26 | start address of the memory location to be loaded |
| 27 | |
| 28 | dst_addr |
| 29 | destination address of the byte stream to be loaded |
| 30 | |
| 31 | len |
| 32 | number of bytes to be copied in hexadecimal. Can not be 0 (zero). |
| 33 | |
| 34 | Example |
| 35 | ------- |
| 36 | |
| 37 | :: |
| 38 | |
| 39 | => loadm ${kernel_addr} ${kernel_addr_r} ${kernel_size} |
| 40 | loaded bin to memory: size: 12582912 |
| 41 | |
| 42 | Configuration |
| 43 | ------------- |
| 44 | |
| 45 | The command is only available if CONFIG_CMD_LOADM=y. |
| 46 | |
| 47 | Return value |
| 48 | ------------ |
| 49 | |
| 50 | The return value $? is set 0 (true) if the loading is succefull, and |
| 51 | is set to 1 (false) in case of error. |
| 52 | |