提交 6aa3a616 编写于 作者: A Alistair Francis 提交者: Peter Maydell

generic-loader: file: Only set a PC if a CPU is specified

This patch fixes the generic-loader file loading to only set the program
counter if a CPU is specified. This follows what is written in the
documentation and was always part of the original intention.
Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 537bf4d08be7acf7a89b590cff69e19db7f0a6cd.1478908712.git.alistair.francis@xilinx.com
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 00227fef
......@@ -93,7 +93,12 @@ static void generic_loader_realize(DeviceState *dev, Error **errp)
"image");
return;
}
s->set_pc = true;
/* The user specified a file, only set the PC if they also specified
* a CPU to use.
*/
if (s->cpu_num != CPU_NONE) {
s->set_pc = true;
}
} else if (s->addr) {
/* User is setting the PC */
if (s->data || s->data_len || s->data_be) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册