From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org,
alistair23@gmail.com, edgar.iglesias@xilinx.com
Subject: Re: [Qemu-devel] [PATCH v1 1/1] generic-loader: file: Only set a PC if a CPU is specified
Date: Sat, 12 Nov 2016 05:06:52 +0100 [thread overview]
Message-ID: <20161112040652.GP9606@toto> (raw)
In-Reply-To: <537bf4d08be7acf7a89b590cff69e19db7f0a6cd.1478908712.git.alistair.francis@xilinx.com>
On Fri, Nov 11, 2016 at 06:51:20PM -0800, Alistair Francis wrote:
> 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.
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> ---
>
> hw/core/generic-loader.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c
> index 79ab6df..208f549 100644
> --- a/hw/core/generic-loader.c
> +++ b/hw/core/generic-loader.c
> @@ -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) {
> --
> 2.7.4
>
next prev parent reply other threads:[~2016-11-12 4:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-12 2:51 [Qemu-devel] [PATCH v1 1/1] generic-loader: file: Only set a PC if a CPU is specified Alistair Francis
2016-11-12 4:06 ` Edgar E. Iglesias [this message]
2016-11-16 22:02 ` Alistair Francis
2016-11-28 11:29 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161112040652.GP9606@toto \
--to=edgar.iglesias@gmail.com \
--cc=alistair.francis@xilinx.com \
--cc=alistair23@gmail.com \
--cc=edgar.iglesias@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.