]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: add __noreturn attribute to spl_invoke_atf function
authorChanho Park <chanho61.park@samsung.com>
Fri, 8 Sep 2023 08:08:56 +0000 (17:08 +0900)
committerTom Rini <trini@konsulko.com>
Mon, 9 Oct 2023 19:24:31 +0000 (15:24 -0400)
spl_invoke_atf function will not be returned to SPL. Thus, we need to
set __noreturn function attribute to the function.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
common/spl/spl_atf.c
include/spl.h

index 2c10252834f6f0182733230e092fa3deb2da26e5..3bdd013a35fe138e43cf4d2bf8bfd27f6ceb0c87 100644 (file)
@@ -187,10 +187,10 @@ static inline void raw_write_daif(unsigned int daif)
        __asm__ __volatile__("msr DAIF, %x0\n\t" : : "r" (daif) : "memory");
 }
 
-typedef void (*atf_entry_t)(struct bl31_params *params, void *plat_params);
+typedef void __noreturn (*atf_entry_t)(struct bl31_params *params, void *plat_params);
 
-static void bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry,
-                      uintptr_t bl33_entry, uintptr_t fdt_addr)
+static void __noreturn bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry,
+                                 uintptr_t bl33_entry, uintptr_t fdt_addr)
 {
        atf_entry_t  atf_entry = (atf_entry_t)bl31_entry;
        void *bl31_params;
@@ -251,7 +251,7 @@ uintptr_t spl_fit_images_get_entry(void *blob, int node)
        return val;
 }
 
-void spl_invoke_atf(struct spl_image_info *spl_image)
+void __noreturn spl_invoke_atf(struct spl_image_info *spl_image)
 {
        uintptr_t  bl32_entry = 0;
        uintptr_t  bl33_entry = CONFIG_TEXT_BASE;
index f713363f8cd5b556f2205954703dcc38449f296e..7d30fb57dac957bc39ea6941b10bc8b25abb27d7 100644 (file)
@@ -793,7 +793,7 @@ int spl_ymodem_load_image(struct spl_image_info *spl_image,
 /**
  * spl_invoke_atf - boot using an ARM trusted firmware image
  */
-void spl_invoke_atf(struct spl_image_info *spl_image);
+void __noreturn spl_invoke_atf(struct spl_image_info *spl_image);
 
 /**
  * bl2_plat_get_bl31_params() - return params for bl31.