Skip to content

Commit bcf4827

Browse files
alistair23pm215
authored andcommitted
docs/generic-loader: Update the document
This patch does three things: - It adds a list of restrictions and ToDos - It corrects the header --- lines to match the length of the header - It clarifies the force-raw option Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: e75d1d285cf8f45037c41ebe1bc3f68120f09cb9.1475702918.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
1 parent 0975b8b commit bcf4827

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

docs/generic-loader.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The 'loader' device allows the user to load multiple images or values into
88
QEMU at startup.
99

1010
Loading Data into Memory Values
11-
---------------------
11+
-------------------------------
1212
The loader device allows memory values to be set from the command line. This
1313
can be done by following the syntax below:
1414

@@ -36,7 +36,7 @@ An example of loading value 0x8000000e to address 0xfd1a0104 is:
3636
-device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4
3737

3838
Setting a CPU's Program Counter
39-
---------------------
39+
-------------------------------
4040
The loader device allows the CPU's PC to be set from the command line. This
4141
can be done by following the syntax below:
4242

@@ -55,9 +55,10 @@ An example of setting CPU 0's PC to 0x8000 is:
5555
-device loader,addr=0x8000,cpu-num=0
5656

5757
Loading Files
58-
---------------------
59-
The loader device also allows files to be loaded into memory. This can be done
60-
similarly to setting memory values. The syntax is shown below:
58+
-------------
59+
The loader device also allows files to be loaded into memory. It can load raw
60+
files and ELF executable files. Raw files are loaded verbatim. ELF executable
61+
files are loaded by an ELF loader. The syntax is shown below:
6162

6263
-device loader,file=<file>[,addr=<addr>][,cpu-num=<cpu-num>][,force-raw=<raw>]
6364

@@ -72,8 +73,8 @@ similarly to setting memory values. The syntax is shown below:
7273
for the boot image.
7374
This will also cause the image to be written to the specified
7475
CPU's address space. If not specified, the default is CPU 0.
75-
<force-raw> - Forces the file to be treated as a raw image. This can be
76-
used to specify the load address of ELF files.
76+
<force-raw> - Setting force-raw=on forces the file to be treated as a raw
77+
image. This can be used to load ELF files as if they were raw.
7778

7879
All values are parsed using the standard QemuOps parsing. This allows the user
7980
to specify any values in any format supported. By default the values
@@ -82,3 +83,10 @@ with a '0x'.
8283

8384
An example of loading an ELF file which CPU0 will boot is shown below:
8485
-device loader,file=./images/boot.elf,cpu-num=0
86+
87+
Restrictions and ToDos
88+
----------------------
89+
- At the moment it is just assumed that if you specify a cpu-num then you
90+
want to set the PC as well. This might not always be the case. In future
91+
the internal state 'set_pc' (which exists in the generic loader now) should
92+
be exposed to the user so that they can choose if the PC is set or not.

0 commit comments

Comments
 (0)