mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
docs/system/generic-loader: move TODO to source code
Currently we have a "Restrictions and ToDos" section at the bottom of the document which notes that there's no way to specify a CPU to load a file through that doesn't also set that CPU's PC. This is written as a developer-facing note. Move this to a TODO comment in the source code, and provide a shorter user-facing statement of the current restriction under the specific sub-option that it applies to. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
This commit is contained in:
@@ -99,6 +99,9 @@ shown below:
|
||||
If this option is not specified, then the data will be loaded via
|
||||
the address space of the first CPU, and no CPU will have its PC set.
|
||||
|
||||
Note that there is currently no way to specify the address space to
|
||||
load the data without also causing that CPU's PC to be set.
|
||||
|
||||
Since it sets the starting PC, this option should only be used for the boot
|
||||
image.
|
||||
|
||||
@@ -111,14 +114,3 @@ shown below:
|
||||
An example of loading an ELF file which CPU0 will boot is shown below::
|
||||
|
||||
-device loader,file=./images/boot.elf,cpu-num=0
|
||||
|
||||
Restrictions and ToDos
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
At the moment it is just assumed that if you specify a cpu-num then
|
||||
you want to set the PC as well. This might not always be the case. In
|
||||
future the internal state 'set_pc' (which exists in the generic loader
|
||||
now) should be exposed to the user so that they can choose if the PC
|
||||
is set or not.
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,24 @@
|
||||
* separate backend.
|
||||
*/
|
||||
|
||||
/*
|
||||
* TODO: currently the "load a file" functionality provides no way
|
||||
* for the user to specify which CPU address space to load the data
|
||||
* into without also causing that CPU's PC to be set to the start
|
||||
* address of the file.
|
||||
*
|
||||
* We could fix this by having a new suboption set-pc (default: true)
|
||||
* so the user can say
|
||||
* -device loader,file=<file>,cpu-num=<cpu-num>
|
||||
* for the current "use this address space and set the PC" behaviour
|
||||
* or
|
||||
* -device loader,file=<file>,cpu-num=<cpu-num>,set-pc=off
|
||||
* to just pick the address space and not set the PC.
|
||||
*
|
||||
* Using set-pc without file= should be handled as an error; otherwise
|
||||
* it can feed through to what we set s->set_pc to.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "system/dma.h"
|
||||
#include "system/reset.h"
|
||||
|
||||
Reference in New Issue
Block a user