From nobody Sun Nov 24 08:39:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1725372416; cv=none; d=zohomail.com; s=zohoarc; b=Cp4ahsPfa2jBHULYZ5qw3gKJdvJ3M3QIM4W+KYNigUg4gPIX9XhPvXNBls8DMTQ7PLrNHOCoYLj2J7XYnd6GM8GlPOkM7+CsjQ30loOPlRQ/dAQUJ07zaxds08WyZGSFdX52n6VLYQlbicuLo80CWxKgXZf1qaDAWYEki3BcguA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725372416; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Sender:Subject:Subject:To:To:Message-Id; bh=70npNyQGsscjqUJK0DhG/hYJnnopW1Cv/YSYC+TsObs=; b=PXebPcwfurmOTc6pksMskzRp8frXPMVURer0a7kiYIQAnMGMCIVEvdNLGCAEj7Vow17UtCufQD/uKhq/1VvHxOpp/x7lCzwHyBuy5hbKCDUubn2Y0qj0Yr1P28KDFOJDN0D2L9wXRjMJf4y8DY4vkrD+v/piWuz/Y2c7RgIyORY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1725372415781151.92411236084536; Tue, 3 Sep 2024 07:06:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slU5i-0000kc-RH; Tue, 03 Sep 2024 10:01:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slU5L-0000bJ-4A for qemu-devel@nongnu.org; Tue, 03 Sep 2024 10:00:43 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slU4c-0006ob-Ca for qemu-devel@nongnu.org; Tue, 03 Sep 2024 10:00:33 -0400 Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4WymsH5K8mzgYmH; Tue, 3 Sep 2024 21:37:55 +0800 (CST) Received: from kwepemd100011.china.huawei.com (unknown [7.221.188.204]) by mail.maildlp.com (Postfix) with ESMTPS id 829031800FE; Tue, 3 Sep 2024 21:40:02 +0800 (CST) Received: from M910t.huawei.com (10.110.54.157) by kwepemd100011.china.huawei.com (7.221.188.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Tue, 3 Sep 2024 21:40:01 +0800 To: Peter Maydell CC: , , Changbin Du , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3] hw/arm/boot: Report error msg if loading elf/dtb failed Date: Tue, 3 Sep 2024 21:39:40 +0800 Message-ID: <20240903133940.3447430-1-changbin.du@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.110.54.157] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemd100011.china.huawei.com (7.221.188.204) Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=45.249.212.188; envelope-from=changbin.du@huawei.com; helo=szxga02-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Changbin Du From: Changbin Du via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1725372417730116600 Print errors before exit. Do not exit silently. Cc: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Changbin Du Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v3: use load_elf_strerror() to format errno. v2: remove msg for arm_load_dtb. --- hw/arm/boot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index d480a7da02cf..6c895e05cbc0 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -839,6 +839,8 @@ static ssize_t arm_load_elf(struct arm_boot_info *info,= uint64_t *pentry, 1, data_swab, as); if (ret <=3D 0) { /* The header loaded but the image didn't */ + error_report("Couldn't load elf '%s': %s", + info->kernel_filename, load_elf_strerror(ret)); exit(1); } =20 --=20 2.34.1