@@ -246,13 +246,6 @@ efi_status_t efi_init_obj_list(void)
/* Set up console modes */
efi_setup_console_size();
- /* Install EFI_RNG_PROTOCOL */
- if (IS_ENABLED(CONFIG_EFI_RNG_PROTOCOL)) {
- ret = efi_rng_register();
- if (ret != EFI_SUCCESS)
- goto out;
- }
-
/* Initialize variable services */
ret = efi_init_variables();
if (ret != EFI_SUCCESS)
@@ -289,6 +282,13 @@ efi_status_t efi_init_obj_list(void)
goto out;
}
+ /* Install EFI_RNG_PROTOCOL */
+ if (IS_ENABLED(CONFIG_EFI_RNG_PROTOCOL)) {
+ ret = efi_rng_register();
+ if (ret != EFI_SUCCESS)
+ goto out;
+ }
+
if (IS_ENABLED(CONFIG_EFI_RISCV_BOOT_PROTOCOL)) {
ret = efi_riscv_register();
if (ret != EFI_SUCCESS)