]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: change setup sequence
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 19 Mar 2020 18:21:58 +0000 (18:21 +0000)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 4 May 2020 10:26:12 +0000 (12:26 +0200)
If we want to restore variables from disk, we need to initialize block
devices before variables.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_setup.c

index 65739aca49334203b81128bccb19f112fe037179..26a7423203626d429aabdb515849afb060ee72f9 100644 (file)
@@ -135,6 +135,11 @@ efi_status_t efi_init_obj_list(void)
        /* On ARM switch from EL3 or secure mode to EL2 or non-secure mode */
        switch_to_non_secure_mode();
 
+#ifdef CONFIG_PARTITIONS
+       ret = efi_disk_register();
+       if (ret != EFI_SUCCESS)
+               goto out;
+#endif
        /* Initialize variable services */
        ret = efi_init_variables();
        if (ret != EFI_SUCCESS)
@@ -183,11 +188,6 @@ efi_status_t efi_init_obj_list(void)
        ret = efi_console_register();
        if (ret != EFI_SUCCESS)
                goto out;
-#ifdef CONFIG_PARTITIONS
-       ret = efi_disk_register();
-       if (ret != EFI_SUCCESS)
-               goto out;
-#endif
 #if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
        ret = efi_gop_register();
        if (ret != EFI_SUCCESS)