public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] efi_loader: move asm/setjmp.h to efi_loader.h
@ 2021-05-10  8:21 AKASHI Takahiro
  2021-05-20  2:48 ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: AKASHI Takahiro @ 2021-05-10  8:21 UTC (permalink / raw)
  To: u-boot

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>
+#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;
 
-- 
2.31.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-20  2:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox