From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F3D0C433F5 for ; Sat, 19 Mar 2022 09:02:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F03CE829FF; Sat, 19 Mar 2022 10:02:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="FWL3s8Fl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2C9FC83025; Sat, 19 Mar 2022 10:02:08 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5AFE280FEC for ; Sat, 19 Mar 2022 10:02:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647680518; bh=Ih9kSFsJp0b40H8Van9ktPBHCYdkclbF9xvkm/CbdrE=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=FWL3s8FlUj5obSRIU4MC+lgtojVJDWXuP4fqEzzzMNHq5TAasQVFwiUJkZGVp8uto MPxDVOO3irOPKaGDoURRafs192xaHEhMjEhSrLdXdIFIYx+i5DmyUffhrO4TKtPIU4 Tjqgy4VbraVIgiwpsHf2WJqqR/eXsNTcJbX7Y6ec= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.94] ([88.152.144.107]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N49hB-1oDBjz2e9Z-0108XQ; Sat, 19 Mar 2022 10:01:58 +0100 Message-ID: <135f1f8a-eefd-e3a9-75dc-a7ad56fae0d9@gmx.de> Date: Sat, 19 Mar 2022 10:01:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2] efi_loader: Use sysreset instead of reset command Content-Language: en-US To: Masami Hiramatsu Cc: Patrick Delaunay , Patrice Chotard , Alexander Graf , AKASHI Takahiro , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu , U-Boot Mailing List , Simon Glass References: <164741778621.309780.13612431059777970603.stgit@localhost> From: Heinrich Schuchardt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:I0JjKyPLwHn4t6+0tAdHw4727H0g73aj+Pu0bAQmoha5b8ynWM2 IXX/HR3REhOYCWz3ThvTLyUm9gIbe1q6FKa6JvD3Yfs1uOmUcOtA+q4Eqdhvj3+aLmHKTN2 /jGO1fEfLd+xSIAm0xqLTN/peYZZrPay0adSe7q1YOfR5KOSzd1cqs8sHUnnwXIpq4kChhd L6mL/OQAcxv9BZi+oX9dg== X-UI-Out-Filterresults: notjunk:1;V03:K0:CZzyoX/19YA=:WMJPP2F454M1vIX/yhVjqC LyIaldYfQH8aXRBdmCNZOaXXW532SJ57G8qI0/0c1WmBb05USHh5F5mx3GUH3J5DuAYCsIQzd AIM30NXXuj24p58BvqDca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boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 3/16/22 20:23, Simon Glass wrote: > On Wed, 16 Mar 2022 at 06:35, Heinrich Schuchardt w= rote: >> >> On 3/16/22 09:03, Masami Hiramatsu wrote: >>> Use sysreset_walk_halt() directly from reset-after-capsule-on-disk >>> feature to reboot (cold reset) machine instead of using reset command >>> interface, since this is not a command. >>> Note that this will make CONFIG_EFI_CAPSULE_ON_DISK depending on >>> the CONFIG_SYSRESET. >>> >>> Signed-off-by: Masami Hiramatsu >> >> Reviewed-by: Heinrich Schuchardt >> >>> --- >>> Changes in v2: >>> - Add CONFIG_SYSRESET dependency. >>> - Fix to add #include >>> --- >>> lib/efi_loader/Kconfig | 1 + >>> lib/efi_loader/efi_capsule.c | 5 +++-- >>> 2 files changed, 4 insertions(+), 2 deletions(-) > > Reviewed-by: Simon Glass > > >>> >>> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig >>> index e5e35fe51f..33138237cc 100644 >>> --- a/lib/efi_loader/Kconfig >>> +++ b/lib/efi_loader/Kconfig >>> @@ -130,6 +130,7 @@ config EFI_RUNTIME_UPDATE_CAPSULE >>> >>> config EFI_CAPSULE_ON_DISK >>> bool "Enable capsule-on-disk support" >>> + depends on SYSRESET With this change xilinx_zynq_virt_defconfig fails to build: arm-linux-gnueabi-ld.bfd: cmd/efidebug.o: in function `do_efi_capsule_on_disk_update': /home/zfsdt/workspace/u-boot-build/denx/cmd/efidebug.c:92: undefined reference to `efi_launch_capsules' Command 'efi capsule disk-update' should only be enabled if CONFIG_EFI_CAPSULE_ON_DISK=3Dy. arm-linux-gnueabi-ld.bfd: lib/efi_loader/efi_setup.o: in function `efi_init_obj_list': /home/zfsdt/workspace/u-boot-build/denx/lib/efi_loader/efi_setup.c:272: undefined reference to `efi_load_capsule_drivers' make: *** [Makefile:1801: u-boot] Error 1 efi_load_capsule_drivers() must be available even if EFI_CAPSULE_ON_DISK is not enabled to make CapsuleUpdate() work. Please, add the missing changes. Best regards Heinrich >>> select EFI_HAVE_CAPSULE_SUPPORT >>> help >>> Select this option if you want to use capsule-on-disk feature= , >>> diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule= .c >>> index 613b531b82..a3d1d7e95a 100644 >>> --- a/lib/efi_loader/efi_capsule.c >>> +++ b/lib/efi_loader/efi_capsule.c >>> @@ -18,6 +18,7 @@ >>> #include >>> #include >>> #include >>> +#include >>> #include >>> >>> #include >>> @@ -1150,9 +1151,9 @@ efi_status_t efi_launch_capsules(void) >>> * UEFI spec requires to reset system after complete processing= capsule >>> * update on the storage. >>> */ >>> - log_info("Reboot after firmware update"); >>> + log_info("Reboot after firmware update.\n"); >>> /* Cold reset is required for loading the new firmware. */ >>> - do_reset(NULL, 0, 0, NULL); >>> + sysreset_walk_halt(SYSRESET_COLD); >>> hang(); >>> /* not reach here */ >>> >>> >>