From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: peter.maydell@linaro.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
qemu-devel@nongnu.org, greg.bellows@linaro.org
Subject: [Qemu-devel] [PATCH v2] hw/arm/boot: register cpu reset handlers if using -bios
Date: Fri, 10 Oct 2014 13:35:44 +0200 [thread overview]
Message-ID: <1412940944-19107-1-git-send-email-ard.biesheuvel@linaro.org> (raw)
Move the registering of CPU reset handlers to before the point where
we leave the function in the -bios (not -kernel) case, so CPU reset
works correctly with -bios as well.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
hw/arm/boot.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index c8dc34f0865b..fc6a3ebf853d 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -488,6 +488,12 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
int big_endian;
static const ARMInsnFixup *primary_loader;
+ for (; cs; cs = CPU_NEXT(cs)) {
+ cpu = ARM_CPU(cs);
+ cpu->env.boot_info = info;
+ qemu_register_reset(do_cpu_reset, cpu);
+ }
+
/* Load the kernel. */
if (!info->kernel_filename) {
@@ -651,10 +657,4 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
}
}
info->is_linux = is_linux;
-
- for (; cs; cs = CPU_NEXT(cs)) {
- cpu = ARM_CPU(cs);
- cpu->env.boot_info = info;
- qemu_register_reset(do_cpu_reset, cpu);
- }
}
--
1.8.3.2
next reply other threads:[~2014-10-10 11:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 11:35 Ard Biesheuvel [this message]
2014-10-10 15:03 ` [Qemu-devel] [PATCH v2] hw/arm/boot: register cpu reset handlers if using -bios 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=1412940944-19107-1-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=greg.bellows@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).