From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: u-boot@lists.denx.de, Alexander Graf <agraf@csgraf.de>,
Sughosh Ganu <sughosh.ganu@linaro.org>
Subject: Re: [PATCH] efi_loader: move asm/setjmp.h to efi_loader.h
Date: Tue, 20 Jul 2021 11:29:04 +0900 [thread overview]
Message-ID: <20210720022904.GD77259@laputa> (raw)
In-Reply-To: <548923bc-317c-2bc0-57b8-351c4d64374b@gmx.de>
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 <takahiro.akashi@linaro.org>
> > ---
> > 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 <init.h>
> > #include <net.h>
> > #include <version.h>
> > +#ifdef CONFIG_EFI_LOADER
> > +/*
> > + * Unfortunately, efi_loader requires setjmp.h, but there are
> > + * some architectures which have no support for setjmp.
> > + */
> > #include <efi_loader.h>
>
> 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 <asm/setjmp.h>
> | ^~~~~~~~~~~~~~
>
> 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 <charset.h>
> > #include <pe.h>
> >
> > -#ifdef CONFIG_EFI_LOADER
> > -#include <asm/setjmp.h>
> > -#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 <efi_api.h>
> > #include <image.h>
> > #include <pe.h>
> > +#include <asm/setjmp.h>
> >
> > struct blk_desc;
> >
> >
>
prev parent reply other threads:[~2021-07-20 2:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 8:21 [PATCH] efi_loader: move asm/setjmp.h to efi_loader.h AKASHI Takahiro
2021-05-20 2:48 ` Heinrich Schuchardt
2021-07-20 2:29 ` AKASHI Takahiro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210720022904.GD77259@laputa \
--to=takahiro.akashi@linaro.org \
--cc=agraf@csgraf.de \
--cc=sughosh.ganu@linaro.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.