qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Pinto <c.pinto@virtualopensystems.com>
To: qemu-devel@nongnu.org
Cc: Jani.Kokkonen@huawei.com, tech@virtualopensystems.com,
	Claudio.Fontana@huawei.com,
	Christian Pinto <c.pinto@virtualopensystems.com>
Subject: [Qemu-devel] [RFC PATCH 7/8] hw/arm: boot
Date: Tue, 29 Sep 2015 15:57:38 +0200	[thread overview]
Message-ID: <1443535059-26010-8-git-send-email-c.pinto@virtualopensystems.com> (raw)
In-Reply-To: <1443535059-26010-1-git-send-email-c.pinto@virtualopensystems.com>

Modify the boot process of an ARM machine in order to check
whether 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
-- 
1.9.1

  parent reply	other threads:[~2015-09-29 14:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 13:57 [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU Christian Pinto
2015-09-29 13:57 ` [Qemu-devel] [RFC PATCH 1/8] backend: multi-socket Christian Pinto
2015-09-29 13:57 ` [Qemu-devel] [RFC PATCH 2/8] backend: shared memory backend Christian Pinto
2015-09-29 13:57 ` [Qemu-devel] [RFC PATCH 3/8] migration: add shared migration type Christian Pinto
2015-09-29 13:57 ` [Qemu-devel] [RFC PATCH 4/8] hw/misc: IDM Device Christian Pinto
2015-09-29 13:57 ` [Qemu-devel] [RFC PATCH 5/8] hw/arm: sysbus-fdt Christian Pinto
2015-09-29 13:57 ` [Qemu-devel] [RFC PATCH 6/8] qemu: slave machine flag Christian Pinto
2015-09-29 13:57 ` Christian Pinto [this message]
2015-09-29 13:57 ` [Qemu-devel] [RFC PATCH 8/8] qemu: numa Christian Pinto
2015-10-01 16:26 ` [Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU Peter Crosthwaite
2015-10-05 15:50   ` Christian Pinto
2015-10-07 15:48     ` Peter Crosthwaite
2015-10-22  9:21       ` Christian Pinto
2015-10-25 21:38         ` Peter Crosthwaite
2015-10-26 17:12           ` mar.krzeminski
2015-10-26 17:42             ` Peter Crosthwaite
2015-10-27 10:30           ` Christian Pinto
2015-11-13  7:02             ` Peter Crosthwaite
2015-12-12 10:19               ` Christian Pinto

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=1443535059-26010-8-git-send-email-c.pinto@virtualopensystems.com \
    --to=c.pinto@virtualopensystems.com \
    --cc=Claudio.Fontana@huawei.com \
    --cc=Jani.Kokkonen@huawei.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).