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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1400EC07E95 for ; Tue, 20 Jul 2021 02:29:39 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3C8C060FF3 for ; Tue, 20 Jul 2021 02:29:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C8C060FF3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 85FD181BC0; Tue, 20 Jul 2021 04:29:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="YhiaSKag"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1AC3181BC8; Tue, 20 Jul 2021 04:29:34 +0200 (CEST) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8D05C81280 for ; Tue, 20 Jul 2021 04:29:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x62f.google.com with SMTP id d1so10747208plg.0 for ; Mon, 19 Jul 2021 19:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=eVoCPZKPbzs+cHTW+jHtr6jdRA/nx8SS9zEBWBUHnow=; b=YhiaSKagC9s4Mb8BOKOiVT7jZgVOJIrN2NelnhSMMesrb6e7/XY/XDD2q2In2f9tH3 mv90dFV4SVoVGX6gualJ9207xUf7pWyCnwvU5Ea7NpAkpwXaxbdFrZoqXb30ax33gXwk 84TmkBJVMbBr7H7OqEZ5m1mDIzayurhCV7O27kR6HOLZ8IXccmn3sB8v9qXKUzrx8lTJ hmP65dv9hM1CC5pCjpi8Ry21b7tfZya6DvVtLGWkKWBX2OmbnXLBFxqJzwpDy0gdFUBK /g2lyYtPkJaJUZMokB9caUCawOJVF0k7tQ5DcpUXHnPUDYbWLZ3viHWzx/ZHAHaGSqvF +V1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=eVoCPZKPbzs+cHTW+jHtr6jdRA/nx8SS9zEBWBUHnow=; b=oxz9WjCX1GzVfaeQfNi8AkaH3j1su52YqFu8ejvIL6o3+8ThVLN136EZCuh6J4cEm0 b2sRXHL9Rw3VXQ/e8IOTnRQ3LPJeDuDOR/p6oLzjhhxGzhkZy9lUDl8trgxYgOJXEo+G 3Ai2SPMLGYU3G5EndHwZYVTxFdLuyXkgme8aiBqoBYLPErDTCKS5F/PaLR7OBhMA+4UP hbcDgCxk42HmKIDsTwVZSHG3c+4/VBOmVOGGA6dHNen8pEYCC/doSRUEZuWuNIgE5AcQ NoXZWCJDXSxOCg5Nsfr46wdaeEXa/5XFhs76I+OaziHxcWIBfGfgs2r1ltdihqAXylcr gKlw== X-Gm-Message-State: AOAM5303h0wOnE6IWlgHnBymu8Qv128YnQ1PJuvH7D4KsWhs0L+Jsy9W 9qm8xyUaNysr/mYq1xHhKSyHc8LlDuLSdg== X-Google-Smtp-Source: ABdhPJwwWoJqOMPYWgr557KaAxmRroZJFivkmekNuZ+z7shciLepkGP1tRa+oXD6hO71GijrQonXxA== X-Received: by 2002:a17:903:2284:b029:12b:329:651e with SMTP id b4-20020a1709032284b029012b0329651emr21793034plh.44.1626748168701; Mon, 19 Jul 2021 19:29:28 -0700 (PDT) Received: from laputa (p784a236a.tkyea130.ap.so-net.ne.jp. [120.74.35.106]) by smtp.gmail.com with ESMTPSA id 33sm10318557pgs.59.2021.07.19.19.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 19:29:28 -0700 (PDT) Date: Tue, 20 Jul 2021 11:29:04 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: u-boot@lists.denx.de, Alexander Graf , Sughosh Ganu Subject: Re: [PATCH] efi_loader: move asm/setjmp.h to efi_loader.h Message-ID: <20210720022904.GD77259@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , u-boot@lists.denx.de, Alexander Graf , Sughosh Ganu References: <20210510082103.44159-1-takahiro.akashi@linaro.org> <548923bc-317c-2bc0-57b8-351c4d64374b@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <548923bc-317c-2bc0-57b8-351c4d64374b@gmx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-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.2 at phobos.denx.de X-Virus-Status: Clean On Thu, May 20, 2021 at 04:48:23AM +0200, Heinrich Schuchardt wrote: > On 5/10/21 10:21 AM, AKASHI Takahiro wrote: > > In the commit c982874e930d ("efi_loader: refactor > > efi_setup_loaded_image()"), setjmp-related definitions were moved to > > efi_loaded_image_obj in efi_loader.h. So setjmp.h is no longer > > refererenced in efi_api.h. > > > > This also fixes some error when efi_api.h will be included in > > mkeficapsule.c. > > > > On the other hand, a tweak will be necessary in common/main.c as > > some architectures have no setjmp support. > > > > Fixes: c982874e930d ("efi_loader: refactor efi_setup_loaded_image()") > > Signed-off-by: AKASHI Takahiro > > --- > > common/main.c | 6 ++++++ > > include/efi_api.h | 4 ---- > > include/efi_loader.h | 1 + > > 3 files changed, 7 insertions(+), 4 deletions(-) > > > > diff --git a/common/main.c b/common/main.c > > index ae5bcdb32f8b..a41c57c26611 100644 > > --- a/common/main.c > > +++ b/common/main.c > > @@ -16,7 +16,13 @@ > > #include > > #include > > #include > > +#ifdef CONFIG_EFI_LOADER > > +/* > > + * Unfortunately, efi_loader requires setjmp.h, but there are > > + * some architectures which have no support for setjmp. > > + */ > > #include > > Your patch results in build failures for qemu_mips64_defconfig like: > > In file included from cmd/load.c:14: > include/efi_loader.h:18:10: fatal error: asm/setjmp.h: No such file or > directory > 18 | #include > | ^~~~~~~~~~~~~~ > > If there is a problem with mkeficapsule, you can fix it there. My whole intent is to remove asm/setjmp.h from efi_api.h as it doesn't make sense to include it there. In efi_loader.h, we need asm/setjmp.h only for the definition of struct jmp_buf_data. We can remove the include file here by adding "struct jmp_buf_data;" line. Will repost the patch. -Takahiro Akashi > Best regards > > Heinrich > > > +#endif > > > > static void run_preboot_environment_command(void) > > { > > diff --git a/include/efi_api.h b/include/efi_api.h > > index 18a1adf02390..e854a8b3a112 100644 > > --- a/include/efi_api.h > > +++ b/include/efi_api.h > > @@ -20,10 +20,6 @@ > > #include > > #include > > > > -#ifdef CONFIG_EFI_LOADER > > -#include > > -#endif > > - > > /* UEFI spec version 2.8 */ > > #define EFI_SPECIFICATION_VERSION (2 << 16 | 80) > > > > diff --git a/include/efi_loader.h b/include/efi_loader.h > > index de1a496a9726..6994a951bc19 100644 > > --- a/include/efi_loader.h > > +++ b/include/efi_loader.h > > @@ -15,6 +15,7 @@ > > #include > > #include > > #include > > +#include > > > > struct blk_desc; > > > > >