From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgvS5-0000nZ-SR for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:00:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgvS1-0002jq-VS for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:00:17 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:33052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgvS1-0002jh-PG for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:00:13 -0400 Received: by wiclk2 with SMTP id lk2so152611448wic.0 for ; Tue, 29 Sep 2015 07:00:13 -0700 (PDT) From: Christian Pinto Date: Tue, 29 Sep 2015 15:57:38 +0200 Message-Id: <1443535059-26010-8-git-send-email-c.pinto@virtualopensystems.com> In-Reply-To: <1443535059-26010-1-git-send-email-c.pinto@virtualopensystems.com> References: <1443535059-26010-1-git-send-email-c.pinto@virtualopensystems.com> Subject: [Qemu-devel] [RFC PATCH 7/8] hw/arm: boot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jani.Kokkonen@huawei.com, tech@virtualopensystems.com, Claudio.Fontana@huawei.com, Christian Pinto 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 --- 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