From nobody Mon Apr 29 10:19:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548933895158793.2257428642332; Thu, 31 Jan 2019 03:24:55 -0800 (PST) Received: from localhost ([127.0.0.1]:53050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpASe-0003RN-V6 for importer@patchew.org; Thu, 31 Jan 2019 06:24:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpAQg-0002Cu-OX for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpAQf-0008Bk-PX for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:46 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:39311) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpAQf-0008BI-JV for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:45 -0500 Received: by mail-wm1-x341.google.com with SMTP id y8so2116300wmi.4 for ; Thu, 31 Jan 2019 03:22:45 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c8sm4078173wrx.42.2019.01.31.03.22.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 03:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ULXfIbeEbrOJ+8856c0Y/7Nen8Most1BOPfYn1VG/9k=; b=EMW0lQJAYLKpMNHwBSM7GNqO8CWI5CtFlju7S1It9+BYkA9Fs0zs5PmE5nMGRXAVkX 7e6NMOcp6M7zptn+0pgOLxgxar2/Tx0bnsp33iXab1ASSuwqYmjS6fhEa67p+S7tqz2P Ratd6XRng0zF09h9h0csBWH2UmKRStuvr5hFM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ULXfIbeEbrOJ+8856c0Y/7Nen8Most1BOPfYn1VG/9k=; b=cIHUcqyzFvQ4+ACxKw/rgeURb8iUS8w9j1sSy67AGCaMM/Q/4pjYbECXt78JDzIHv0 WtaIfquuKwcLo1iN9CiLUCLHi8XhTk7FvuSPwTomGTAuFX00sZitQqvZBsSqKJ3Dk7rU tg6h30TTgNSjsTBvOrcpkIux5HLIXf0ryUkoBx6FGR8iXY6i9NPOZrEzaDzFZ+sECXC/ 6CUbrcn58m7XQbcLT6qQTYlgtBuuirFQVqiaHbPU6c8ecQZA+VM1GWtM886HuYAbh9FQ l55KK7UNG8QAIaucmfKTuqzupPGQqnoAAMs7OP6kxbE8H2JiFzzXEQTg/Xq3TfvK5x2r Ed/Q== X-Gm-Message-State: AJcUukdx+MjaG05wUidjRsmthgbrZfTQ8+I7bn3gi+oHsHSe5SnazN5V mEYUwPVNGB4rbYQFlv0Zc8zwPA== X-Google-Smtp-Source: ALg8bN5cyNgi67uXTV22bUhJEkuLodtfGGv8ov6GK+PLMwvAOuBUKCvwldI4pC8B7G55EuLxTJJkxw== X-Received: by 2002:a1c:cf0d:: with SMTP id f13mr28523283wmg.70.1548933764527; Thu, 31 Jan 2019 03:22:44 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 11:22:36 +0000 Message-Id: <20190131112240.8395-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190131112240.8395-1-peter.maydell@linaro.org> References: <20190131112240.8395-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH 1/5] hw/arm/boot: Fix block comment style in arm_load_kernel() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hongbo Zhang , Igor Mammedov , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Fix the block comment style in arm_load_kernel() to QEMU's current style preferences. This will allow us to do some refactoring of this function without checkpatch complaining about the code-motion patches. Signed-off-by: Peter Maydell Reviewed-by: Igor Mammedov Reviewed-by: Richard Henderson --- hw/arm/boot.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index c7a67af7a97..6f9ceeb0e89 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -965,7 +965,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info = *info) static const ARMInsnFixup *primary_loader; AddressSpace *as =3D arm_boot_address_space(cpu, info); =20 - /* CPU objects (unlike devices) are not automatically reset on system + /* + * CPU objects (unlike devices) are not automatically reset on system * reset, so we must always register a handler to do so. If we're * actually loading a kernel, the handler is also responsible for * arranging that we start it correctly. @@ -974,7 +975,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info = *info) qemu_register_reset(do_cpu_reset, ARM_CPU(cs)); } =20 - /* The board code is not supposed to set secure_board_setup unless + /* + * The board code is not supposed to set secure_board_setup unless * running its code in secure mode is actually possible, and KVM * doesn't support secure. */ @@ -987,7 +989,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info = *info) if (!info->kernel_filename || info->firmware_loaded) { =20 if (have_dtb(info)) { - /* If we have a device tree blob, but no kernel to supply it t= o (or + /* + * If we have a device tree blob, but no kernel to supply it t= o (or * the kernel is supposed to be loaded by the bootloader), cop= y the * DTB to the base of RAM for the bootloader to pick up. */ @@ -1002,7 +1005,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_inf= o *info) try_decompressing_kernel =3D arm_feature(&cpu->env, ARM_FEATURE_AARCH64); =20 - /* Expose the kernel, the command line, and the initrd in fw_c= fg. + /* + * Expose the kernel, the command line, and the initrd in fw_c= fg. * We don't process them here at all, it's all left to the * firmware. */ @@ -1022,7 +1026,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_inf= o *info) } } =20 - /* We will start from address 0 (typically a boot ROM image) in the + /* + * We will start from address 0 (typically a boot ROM image) in the * same way as hardware. */ return; @@ -1049,7 +1054,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_inf= o *info) if (info->nb_cpus =3D=3D 0) info->nb_cpus =3D 1; =20 - /* We want to put the initrd far enough into RAM that when the + /* + * We want to put the initrd far enough into RAM that when the * kernel is uncompressed it will not clobber the initrd. However * on boards without much RAM we must ensure that we still leave * enough room for a decent sized initrd, and on boards with large @@ -1066,12 +1072,14 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_i= nfo *info) kernel_size =3D arm_load_elf(info, &elf_entry, &elf_low_addr, &elf_high_addr, elf_machine, as); if (kernel_size > 0 && have_dtb(info)) { - /* If there is still some room left at the base of RAM, try and put + /* + * If there is still some room left at the base of RAM, try and put * the DTB there like we do for images loaded with -bios or -pflas= h. */ if (elf_low_addr > info->loader_start || elf_high_addr < info->loader_start) { - /* Set elf_low_addr as address limit for arm_load_dtb if it ma= y be + /* + * Set elf_low_addr as address limit for arm_load_dtb if it ma= y be * pointing into RAM, otherwise pass '0' (no limit) */ if (elf_low_addr < info->loader_start) { @@ -1132,7 +1140,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_inf= o *info) fixupcontext[FIXUP_BOARDID] =3D info->board_id; fixupcontext[FIXUP_BOARD_SETUP] =3D info->board_setup_addr; =20 - /* for device tree boot, we pass the DTB directly in r2. Otherwise + /* + * for device tree boot, we pass the DTB directly in r2. Otherwise * we point to the kernel args. */ if (have_dtb(info)) { @@ -1185,7 +1194,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_inf= o *info) info->write_board_setup(cpu, info); } =20 - /* Notify devices which need to fake up firmware initialization + /* + * Notify devices which need to fake up firmware initialization * that we're doing a direct kernel boot. */ object_child_foreach_recursive(object_get_root(), --=20 2.20.1 From nobody Mon Apr 29 10:19:27 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548934011087647.7059617591406; Thu, 31 Jan 2019 03:26:51 -0800 (PST) Received: from localhost ([127.0.0.1]:53108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpAUR-00051s-UC for importer@patchew.org; Thu, 31 Jan 2019 06:26:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpAQi-0002EF-Gb for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpAQh-0008Cf-CT for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:48 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45685) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpAQh-0008C4-3w for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:47 -0500 Received: by mail-wr1-x444.google.com with SMTP id t6so2790372wrr.12 for ; Thu, 31 Jan 2019 03:22:46 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c8sm4078173wrx.42.2019.01.31.03.22.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 03:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Uf2xXVsV8siTL/MtqH6ndfNY6VKPGQ2YyqgRRm1aW8A=; b=d7djuK8ox30oz+t1QKSL+1T70rgc4OgBvGBkeayI4kQqqt5OF67q0gDfGNUEv8kIz6 cbuuMOvFyp5qQ4pWe1ovUc9nxinp5RnN0NpR+O1fH59UdW5IV0CZlLaq9BVl8rd3bLsK 8E/sGA350DwCwQHi4pw4fp30syM3RwmKYlbv8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Uf2xXVsV8siTL/MtqH6ndfNY6VKPGQ2YyqgRRm1aW8A=; b=sTv+NCvtNwZUJVQ2e04++j4aKduRxwBiIn0WLqRKWRGgmYHTmxYnRGMRokbE85CegZ FNuZYs73A1IQRc+zZMlofz3M766qhwfdKN8yugPbNu495gzzKd3KnTd2WZagFeR8o0lw /gXsykhVDAwN4gjRoN+sJ8zb5J2ABxqOgLUMI6TkQwQTil9Zd88THkP0nfQVrWCAnPTY DKLBsUCnNnl0SReH036eu3Rda3hs1d9u31d81bQfi+3F1t/4/LN2cQFPVNviFtHm29OR 5A9yNbQCrstu+euF/HBUX6wxtUf/JI8VjX2j+kNV44+3LnjI5Rj/99IP9D9hu55AngY2 2Fhg== X-Gm-Message-State: AJcUuke4S1y00SnqPQcm4bL62my56+tkgxyXgKTwnJvZ2PgbHANRTlIE bwd5Y66E0CltCP0uEsDE3ZTXkw== X-Google-Smtp-Source: ALg8bN6FGe8VJWUcXBY9MQhH4yyKOlK/Arsmo5qaambvXPQPn6GsC9VUiXBjBUB9HFDz8jtjWvSI1A== X-Received: by 2002:adf:ec83:: with SMTP id z3mr34998886wrn.264.1548933765895; Thu, 31 Jan 2019 03:22:45 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 11:22:37 +0000 Message-Id: <20190131112240.8395-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190131112240.8395-1-peter.maydell@linaro.org> References: <20190131112240.8395-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH 2/5] hw/arm/boot: Factor out "direct kernel boot" code into its own function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hongbo Zhang , Igor Mammedov , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Factor out the "direct kernel boot" code path from arm_load_kernel() into its own function; this function is getting long enough that the code flow is a bit confusing. This commit only moves code around; no semantic changes. We leave the "load the dtb" code in arm_load_kernel() -- this is currently only used by the "direct kernel boot" path, but this is a bug which we will fix shortly. Signed-off-by: Peter Maydell Reviewed-by: Igor Mammedov Reviewed-by: Richard Henderson --- hw/arm/boot.c | 150 +++++++++++++++++++++++++++----------------------- 1 file changed, 80 insertions(+), 70 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 6f9ceeb0e89..108e9b979f8 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -953,9 +953,12 @@ static uint64_t load_aarch64_image(const char *filenam= e, hwaddr mem_base, return size; } =20 -void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) +static void arm_setup_direct_kernel_boot(ARMCPU *cpu, + struct arm_boot_info *info) { + /* Set up for a direct boot of a kernel image file. */ CPUState *cs; + AddressSpace *as =3D arm_boot_address_space(cpu, info); int kernel_size; int initrd_size; int is_linux =3D 0; @@ -963,75 +966,6 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info= *info) int elf_machine; hwaddr entry; static const ARMInsnFixup *primary_loader; - AddressSpace *as =3D arm_boot_address_space(cpu, info); - - /* - * CPU objects (unlike devices) are not automatically reset on system - * reset, so we must always register a handler to do so. If we're - * actually loading a kernel, the handler is also responsible for - * arranging that we start it correctly. - */ - for (cs =3D first_cpu; cs; cs =3D CPU_NEXT(cs)) { - qemu_register_reset(do_cpu_reset, ARM_CPU(cs)); - } - - /* - * The board code is not supposed to set secure_board_setup unless - * running its code in secure mode is actually possible, and KVM - * doesn't support secure. - */ - assert(!(info->secure_board_setup && kvm_enabled())); - - info->dtb_filename =3D qemu_opt_get(qemu_get_machine_opts(), "dtb"); - info->dtb_limit =3D 0; - - /* Load the kernel. */ - if (!info->kernel_filename || info->firmware_loaded) { - - if (have_dtb(info)) { - /* - * If we have a device tree blob, but no kernel to supply it t= o (or - * the kernel is supposed to be loaded by the bootloader), cop= y the - * DTB to the base of RAM for the bootloader to pick up. - */ - info->dtb_start =3D info->loader_start; - } - - if (info->kernel_filename) { - FWCfgState *fw_cfg; - bool try_decompressing_kernel; - - fw_cfg =3D fw_cfg_find(); - try_decompressing_kernel =3D arm_feature(&cpu->env, - ARM_FEATURE_AARCH64); - - /* - * Expose the kernel, the command line, and the initrd in fw_c= fg. - * We don't process them here at all, it's all left to the - * firmware. - */ - load_image_to_fw_cfg(fw_cfg, - FW_CFG_KERNEL_SIZE, FW_CFG_KERNEL_DATA, - info->kernel_filename, - try_decompressing_kernel); - load_image_to_fw_cfg(fw_cfg, - FW_CFG_INITRD_SIZE, FW_CFG_INITRD_DATA, - info->initrd_filename, false); - - if (info->kernel_cmdline) { - fw_cfg_add_i32(fw_cfg, FW_CFG_CMDLINE_SIZE, - strlen(info->kernel_cmdline) + 1); - fw_cfg_add_string(fw_cfg, FW_CFG_CMDLINE_DATA, - info->kernel_cmdline); - } - } - - /* - * We will start from address 0 (typically a boot ROM image) in the - * same way as hardware. - */ - return; - } =20 if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { primary_loader =3D bootloader_aarch64; @@ -1206,6 +1140,82 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_in= fo *info) for (cs =3D first_cpu; cs; cs =3D CPU_NEXT(cs)) { ARM_CPU(cs)->env.boot_info =3D info; } +} + +void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) +{ + CPUState *cs; + AddressSpace *as =3D arm_boot_address_space(cpu, info); + + /* + * CPU objects (unlike devices) are not automatically reset on system + * reset, so we must always register a handler to do so. If we're + * actually loading a kernel, the handler is also responsible for + * arranging that we start it correctly. + */ + for (cs =3D first_cpu; cs; cs =3D CPU_NEXT(cs)) { + qemu_register_reset(do_cpu_reset, ARM_CPU(cs)); + } + + /* + * The board code is not supposed to set secure_board_setup unless + * running its code in secure mode is actually possible, and KVM + * doesn't support secure. + */ + assert(!(info->secure_board_setup && kvm_enabled())); + + info->dtb_filename =3D qemu_opt_get(qemu_get_machine_opts(), "dtb"); + info->dtb_limit =3D 0; + + /* Load the kernel. */ + if (!info->kernel_filename || info->firmware_loaded) { + + if (have_dtb(info)) { + /* + * If we have a device tree blob, but no kernel to supply it t= o (or + * the kernel is supposed to be loaded by the bootloader), cop= y the + * DTB to the base of RAM for the bootloader to pick up. + */ + info->dtb_start =3D info->loader_start; + } + + if (info->kernel_filename) { + FWCfgState *fw_cfg; + bool try_decompressing_kernel; + + fw_cfg =3D fw_cfg_find(); + try_decompressing_kernel =3D arm_feature(&cpu->env, + ARM_FEATURE_AARCH64); + + /* + * Expose the kernel, the command line, and the initrd in fw_c= fg. + * We don't process them here at all, it's all left to the + * firmware. + */ + load_image_to_fw_cfg(fw_cfg, + FW_CFG_KERNEL_SIZE, FW_CFG_KERNEL_DATA, + info->kernel_filename, + try_decompressing_kernel); + load_image_to_fw_cfg(fw_cfg, + FW_CFG_INITRD_SIZE, FW_CFG_INITRD_DATA, + info->initrd_filename, false); + + if (info->kernel_cmdline) { + fw_cfg_add_i32(fw_cfg, FW_CFG_CMDLINE_SIZE, + strlen(info->kernel_cmdline) + 1); + fw_cfg_add_string(fw_cfg, FW_CFG_CMDLINE_DATA, + info->kernel_cmdline); + } + } + + /* + * We will start from address 0 (typically a boot ROM image) in the + * same way as hardware. + */ + return; + } else { + arm_setup_direct_kernel_boot(cpu, info); + } =20 if (!info->skip_dtb_autoload && have_dtb(info)) { if (arm_load_dtb(info->dtb_start, info, info->dtb_limit, as) < 0) { --=20 2.20.1 From nobody Mon Apr 29 10:19:27 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 15489340251721013.9269854342122; Thu, 31 Jan 2019 03:27:05 -0800 (PST) Received: from localhost ([127.0.0.1]:53110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpAUg-0005Ch-1v for importer@patchew.org; Thu, 31 Jan 2019 06:26:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpAQj-0002Em-Bo for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpAQi-0008DY-H6 for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:49 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:34094) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpAQi-0008D3-Ac for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:48 -0500 Received: by mail-wm1-x341.google.com with SMTP id y185so1866735wmd.1 for ; Thu, 31 Jan 2019 03:22:48 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c8sm4078173wrx.42.2019.01.31.03.22.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 03:22:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JZc4mzY6BBahixnef7uoEzgPeqRX5DM7n3dLcUh9HJI=; b=QMRTsi3TgcYgWepaE5Z6kPYRCz6uSV8Ge0pI7DslM0/rfpxMNwGZ3/kT5IOk0WqwGs Q2IDvSt0zhvB551jHJFnk+nFyv1lT1QcTGo6uBaZQ4jpjVnHfacsHD+BooxDj9WtgVYn H5UiY1newIHrzVytdMPkK9NmKYXQGxRpBF8Q4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JZc4mzY6BBahixnef7uoEzgPeqRX5DM7n3dLcUh9HJI=; b=erPX0DutU2cmVzntsyxsO7fgvpOsUbIDEbFd24xdPHO1q7fnif3ivYKhRIW0d6IBVn rYy0/gxowQ4CN3E5ukzfUWeVvNUojt2btxqYcYJzeIIHvSjAz/t+F/Waier9ORugrHvd iCMOHw98N5gqC5D2ClBsUgjZyumfrXCJvLm6PYVrPnLXroaFTI/aToPpHyXGfXtug5jv cT9MAjuXIL2+GfRBjHb3r9FLXfzpZtXWSk8iFbfja+TOe1319ND2XurwdXA99houc0AF PbiFTVcEWYGOmykQginik+9zPV6e+mZEGrpT6f8qQjhbzR+U5VvZk0cD+xb/LPsIdlZ9 kR1w== X-Gm-Message-State: AJcUuke3ADnDusf9ckX0iWZHtodxAZBzzXuHXEeu77xOKrvGzMD6zyHM /efIQLdz6h1BOegrMqD3rvNXYg== X-Google-Smtp-Source: ALg8bN57FPRGjsXaX3VXswQxccNRvbcDA7gsizlc7dwJ5Et0DdrNwFVcWNiYSoN2cFTWgSFaC6tkyg== X-Received: by 2002:a1c:47:: with SMTP id 68mr27850125wma.89.1548933767383; Thu, 31 Jan 2019 03:22:47 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 11:22:38 +0000 Message-Id: <20190131112240.8395-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190131112240.8395-1-peter.maydell@linaro.org> References: <20190131112240.8395-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH 3/5] hw/arm/boot: Factor out "set up firmware boot" code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hongbo Zhang , Igor Mammedov , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Factor out the "boot via firmware" code path from arm_load_kernel() into its own function. This commit only moves code around; no semantic changes. Signed-off-by: Peter Maydell Reviewed-by: Igor Mammedov Reviewed-by: Richard Henderson --- hw/arm/boot.c | 92 +++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 108e9b979f8..a2e724ac68a 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -1142,6 +1142,54 @@ static void arm_setup_direct_kernel_boot(ARMCPU *cpu, } } =20 +static void arm_setup_firmware_boot(ARMCPU *cpu, struct arm_boot_info *inf= o) +{ + /* Set up for booting firmware (which might load a kernel via fw_cfg) = */ + + 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 + * DTB to the base of RAM for the bootloader to pick up. + */ + info->dtb_start =3D info->loader_start; + } + + if (info->kernel_filename) { + FWCfgState *fw_cfg; + bool try_decompressing_kernel; + + fw_cfg =3D fw_cfg_find(); + try_decompressing_kernel =3D arm_feature(&cpu->env, + ARM_FEATURE_AARCH64); + + /* + * Expose the kernel, the command line, and the initrd in fw_cfg. + * We don't process them here at all, it's all left to the + * firmware. + */ + load_image_to_fw_cfg(fw_cfg, + FW_CFG_KERNEL_SIZE, FW_CFG_KERNEL_DATA, + info->kernel_filename, + try_decompressing_kernel); + load_image_to_fw_cfg(fw_cfg, + FW_CFG_INITRD_SIZE, FW_CFG_INITRD_DATA, + info->initrd_filename, false); + + if (info->kernel_cmdline) { + fw_cfg_add_i32(fw_cfg, FW_CFG_CMDLINE_SIZE, + strlen(info->kernel_cmdline) + 1); + fw_cfg_add_string(fw_cfg, FW_CFG_CMDLINE_DATA, + info->kernel_cmdline); + } + } + + /* + * We will start from address 0 (typically a boot ROM image) in the + * same way as hardware. + */ +} + void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) { CPUState *cs; @@ -1169,49 +1217,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_in= fo *info) =20 /* Load the kernel. */ if (!info->kernel_filename || info->firmware_loaded) { - - if (have_dtb(info)) { - /* - * If we have a device tree blob, but no kernel to supply it t= o (or - * the kernel is supposed to be loaded by the bootloader), cop= y the - * DTB to the base of RAM for the bootloader to pick up. - */ - info->dtb_start =3D info->loader_start; - } - - if (info->kernel_filename) { - FWCfgState *fw_cfg; - bool try_decompressing_kernel; - - fw_cfg =3D fw_cfg_find(); - try_decompressing_kernel =3D arm_feature(&cpu->env, - ARM_FEATURE_AARCH64); - - /* - * Expose the kernel, the command line, and the initrd in fw_c= fg. - * We don't process them here at all, it's all left to the - * firmware. - */ - load_image_to_fw_cfg(fw_cfg, - FW_CFG_KERNEL_SIZE, FW_CFG_KERNEL_DATA, - info->kernel_filename, - try_decompressing_kernel); - load_image_to_fw_cfg(fw_cfg, - FW_CFG_INITRD_SIZE, FW_CFG_INITRD_DATA, - info->initrd_filename, false); - - if (info->kernel_cmdline) { - fw_cfg_add_i32(fw_cfg, FW_CFG_CMDLINE_SIZE, - strlen(info->kernel_cmdline) + 1); - fw_cfg_add_string(fw_cfg, FW_CFG_CMDLINE_DATA, - info->kernel_cmdline); - } - } - - /* - * We will start from address 0 (typically a boot ROM image) in the - * same way as hardware. - */ + arm_setup_firmware_boot(cpu, info); return; } else { arm_setup_direct_kernel_boot(cpu, info); --=20 2.20.1 From nobody Mon Apr 29 10:19:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548934101770899.7618409709294; Thu, 31 Jan 2019 03:28:21 -0800 (PST) Received: from localhost ([127.0.0.1]:53137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpAVz-00068K-Ov for importer@patchew.org; Thu, 31 Jan 2019 06:28:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpAQk-0002G3-MX for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpAQj-0008F4-Ug for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:50 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:34786) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpAQj-0008E8-NY for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:49 -0500 Received: by mail-wr1-x444.google.com with SMTP id f7so2898380wrp.1 for ; Thu, 31 Jan 2019 03:22:49 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c8sm4078173wrx.42.2019.01.31.03.22.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 03:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gyxX1X6cDLYlEibagFDko7Cs/zrt8AkVbdYa/LmUQe4=; b=N0mk2ZCFvKLSO5H9Og2pO2fJxST75khTk9FfLt1KDNij3dsFzpgjOVzYNO4z2EYjx8 +bWeaRsDRBeIgEGSsxURkLYAardH165jZI4WnASVR7zf25zPxLbQA+7RLmWkEGsTvT6y 4Vq6xo9Vn8dwP1wAG25tpxZANbfJKxq4IULlg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gyxX1X6cDLYlEibagFDko7Cs/zrt8AkVbdYa/LmUQe4=; b=ZV6BXRH4FzPqqc6itMldxC6sYh7JY9UZiuM8MxOmLmSAnIutpntNEtTVMvxJNYbTDL auyWpI3sKXe5jVx3l9yh59e30x3rtyt4z3sMK9MAuXa5cm+7rr0yXNtIkSk3gBBASh/3 94/67wy2tf96TM9RxbrT/YZNRIIoRhrRbuRBNNxD5xOm59qTJrL2v2CtFqGh0aZot4WA no183R1xkAm3zGGq556BbytzOWH9lTnC+Q0T0IjA5vQq4np2f0rcNJMHoUUs5wHHEv5D N+ljN6dx8jSjwoJLcR8I0uHy7ZZNzyjgt2QIrRV3VO6acqBWbb60n/FqMeTREfmpgESv DRFQ== X-Gm-Message-State: AJcUukcRJ5iFJZaCFAeQKg+wov15KkvUM3RDw4nrs/USWXPuVGb1g6bR k2hIODlnsfyla/QfMwo4z5c+Iw== X-Google-Smtp-Source: ALg8bN5u1BdgtaBGVw22XWwMu8d0DSvyHW7k1JqlTqMw+ac5q2NOMtUEuABMT/QoMazq/X/I3tHI0w== X-Received: by 2002:adf:e911:: with SMTP id f17mr36025418wrm.126.1548933768789; Thu, 31 Jan 2019 03:22:48 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 11:22:39 +0000 Message-Id: <20190131112240.8395-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190131112240.8395-1-peter.maydell@linaro.org> References: <20190131112240.8395-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH 4/5] hw/arm/boot: Clarify why arm_setup_firmware_boot() doesn't set env->boot_info X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hongbo Zhang , Igor Mammedov , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The code path for booting firmware doesn't set env->boot_info. At first sight this looks odd, so add a comment saying why we don't. Signed-off-by: Peter Maydell Reviewed-by: Igor Mammedov Reviewed-by: Richard Henderson --- hw/arm/boot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index a2e724ac68a..cfcfdf421cf 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -1186,7 +1186,8 @@ static void arm_setup_firmware_boot(ARMCPU *cpu, stru= ct arm_boot_info *info) =20 /* * We will start from address 0 (typically a boot ROM image) in the - * same way as hardware. + * same way as hardware. Leave env->boot_info NULL, so that + * do_cpu_reset() knows it does not need to alter the PC on reset. */ } =20 --=20 2.20.1 From nobody Mon Apr 29 10:19:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 154893388019452.57269690239616; Thu, 31 Jan 2019 03:24:40 -0800 (PST) Received: from localhost ([127.0.0.1]:53046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpASO-0003DQ-1E for importer@patchew.org; Thu, 31 Jan 2019 06:24:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpAQm-0002H7-35 for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpAQl-0008G0-8D for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:52 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:51623) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpAQl-0008Fd-2G for qemu-devel@nongnu.org; Thu, 31 Jan 2019 06:22:51 -0500 Received: by mail-wm1-x342.google.com with SMTP id b11so2098280wmj.1 for ; Thu, 31 Jan 2019 03:22:50 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c8sm4078173wrx.42.2019.01.31.03.22.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 03:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EHYltQzbjdP9PXVUsQa2ZBGsmLHSOC9Kk9ZVMjL3noU=; b=WTIAGQTOaOF0X8Ot8qKFJaLeCnZEEd+aSniq8xo+TNCsgK5c+ceSMIBx2ItlgXfR+2 vLc/KmOtOUMQn3BUFUI/nWGPrkC46DgQ7WP9UqGBiU7OtBgtYssrL1EHR6P1/99CHV36 WLF5B1tedYF8f4GnyVSC5FN00+UW5mDLoUH6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EHYltQzbjdP9PXVUsQa2ZBGsmLHSOC9Kk9ZVMjL3noU=; b=hscYtxL1kB+k9PA7mgfTkX7nEuQfStpqpO2RynnlrkAaHHYbUHJ2WYIa++6dzThbPa /0FfYYZaOIKCf9jKog4LuV2W5HAwR+d0Dq4tktbQnsZEI52hGyzT3OGzVuGkCTRfu4Xv /5MHgyxNcofqbz/n7yGTRkiAfZa2mQeFhyxjCXoAdUfCfuAHUY3TeLNURolS9Pqvr74/ ZMQF9heke0pgczkEM6WdlxLP+tQ6Yozlz09Ci6nG7zD1x3hDdNP8Xdd5eFNj4at1gQQA 6Z28ubvEnJ/aBT95DFYpSsa1NXEnHhIBEN6IIiD1wmaOcIL7ybYJ+Yqm6nzBMe0BCxWG c/cQ== X-Gm-Message-State: AJcUukdSonvg5tD9R+0Vt/UYASyDB1+aesumnZUbV1ukOxYyGuuG790O tgB+Qs1c/lEKVu611QUmnj5Ehg== X-Google-Smtp-Source: ALg8bN4dcAls2jHqGalexITnPbhGFZK8najhb2Ad5iuQgTSnHcGS9dCT8bkL6Cp9Oypg0Y0W5t/qPg== X-Received: by 2002:a1c:342:: with SMTP id 63mr23470973wmd.34.1548933770150; Thu, 31 Jan 2019 03:22:50 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 11:22:40 +0000 Message-Id: <20190131112240.8395-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190131112240.8395-1-peter.maydell@linaro.org> References: <20190131112240.8395-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH 5/5] hw/arm/boot: Support DTB autoload for firmware-only boots X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hongbo Zhang , Igor Mammedov , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The arm_boot_info struct has a skip_dtb_autoload flag: if this is set to true by the board code then arm_load_kernel() will not load the DTB itself, but will leave this for the board code to do itself later. However, the check for this is done in a code path which is only executed for the case where we load a kernel image file. If we're taking the "boot via firmware" code path then the flag isn't honoured and the DTB is never loaded. We didn't notice this because the only real user of "boot via firmware" that cares about the DTB is the virt board (for UEFI boot), and that always wants skip_dtb_autoload anyway. But the SBSA reference board model we're planning to add will want the flag to behave correctly. Now we've refactored the arm_load_kernel() function, the fix is simple: drop the early 'return' so we fall into the same "load the DTB" code the boot-direct-kernel path uses. Signed-off-by: Peter Maydell Reviewed-by: Igor Mammedov Reviewed-by: Richard Henderson --- hw/arm/boot.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index cfcfdf421cf..8e792a911f9 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -1219,7 +1219,6 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_inf= o *info) /* Load the kernel. */ if (!info->kernel_filename || info->firmware_loaded) { arm_setup_firmware_boot(cpu, info); - return; } else { arm_setup_direct_kernel_boot(cpu, info); } --=20 2.20.1