From: Baptiste Reynal <b.reynal@virtualopensystems.com>
To: qemu-devel@nongnu.org
Cc: b.reynal@virtualopensystems.com, Jani.Kokkonen@huawei.com,
tech@virtualopensystems.com, Claudio.Fontana@huawei.com,
Christian Pinto <c.pinto@virtualopensystems.com>
Subject: [Qemu-devel] [RFC v2 5/6] hw/arm: boot
Date: Fri, 18 Mar 2016 10:13:57 +0100 [thread overview]
Message-ID: <1458292438-13909-6-git-send-email-b.reynal@virtualopensystems.com> (raw)
In-Reply-To: <1458292438-13909-1-git-send-email-b.reynal@virtualopensystems.com>
From: Christian Pinto <c.pinto@virtualopensystems.com>
This patch modifies the boot process of an ARM machine in otrder to check
whether if it is a slave, by checking the slave machine flag.
When the slave flag is on, no kernel, dtb or initrd are loaded into memory.
The boot address of each core is set to the start address of the RAM,
that depends on the machine model executed.
Signed-off-by: Christian Pinto <c.pinto@virtualopensystems.com>
---
hw/arm/boot.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index bef451b..ee0c4a1 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -590,6 +590,19 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
/* Load the kernel. */
if (!info->kernel_filename || info->firmware_loaded) {
+ if (!info->kernel_filename && machine_slave(current_machine)) {
+ /* If a machine is booted as a slave instance there is no need to
+ * provide the DTB blob or kernel image, that will instead
+ * be copied into memory later by a master instance.
+ * The boot address is set to be at the beginning of the RAM.
+ */
+ info->entry = info->loader_start;
+ CPU_FOREACH(cs) {
+ ARM_CPU(cs)->env.boot_info = info;
+ }
+ return;
+ }
+
if (have_dtb(info)) {
/* If we have a device tree blob, but no kernel to supply it to (or
* the kernel is supposed to be loaded by the bootloader), copy the
--
2.7.3
next prev parent reply other threads:[~2016-03-18 9:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 9:13 [Qemu-devel] [RFC v2 0/6] QEMU shared-memory backend Baptiste Reynal
2016-03-18 9:13 ` [Qemu-devel] [RFC v2 1/6] backend: shared memory backend Baptiste Reynal
2016-03-18 9:13 ` [Qemu-devel] [RFC v2 2/6] migration: add shared migration type Baptiste Reynal
2016-03-18 9:13 ` [Qemu-devel] [RFC v2 3/6] hw/misc: sdm signal shboot Baptiste Reynal
2016-03-18 9:13 ` [Qemu-devel] [RFC v2 4/6] qemu: slave machine flag Baptiste Reynal
2016-03-18 9:13 ` Baptiste Reynal [this message]
2016-03-18 9:13 ` [Qemu-devel] [RFC v2 6/6] qemu: numa Baptiste Reynal
2016-03-22 14:14 ` [Qemu-devel] [RFC v2 0/6] QEMU shared-memory backend Markus Armbruster
2016-03-22 14:54 ` Baptiste Reynal
2016-04-07 16:27 ` Markus Armbruster
2016-04-08 12:52 ` Baptiste Reynal
2016-04-08 13:59 ` Markus Armbruster
2016-03-31 9:14 ` Stefan Hajnoczi
2016-04-05 12:00 ` Baptiste Reynal
2016-04-06 8:57 ` Stefan Hajnoczi
2016-04-06 13:47 ` Igor Mammedov
2016-04-08 12:46 ` Baptiste Reynal
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=1458292438-13909-6-git-send-email-b.reynal@virtualopensystems.com \
--to=b.reynal@virtualopensystems.com \
--cc=Claudio.Fontana@huawei.com \
--cc=Jani.Kokkonen@huawei.com \
--cc=c.pinto@virtualopensystems.com \
--cc=qemu-devel@nongnu.org \
--cc=tech@virtualopensystems.com \
/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).