[PATCH 02/10] efi: Make use of bootm_final()

Simon Glass sjg at chromium.org
Wed Jan 7 01:31:19 CET 2026


From: Simon Glass <sjg at chromium.org>

Call this function from the EFI code. Add the required call to
dm_remove_devices_active() there.

Signed-off-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Simon Glass <simon.glass at canonical.com>
---

 boot/bootm_final.c            | 2 ++
 lib/efi_loader/efi_boottime.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/boot/bootm_final.c b/boot/bootm_final.c
index 15ddbbe5e74..263cd95dcb3 100644
--- a/boot/bootm_final.c
+++ b/boot/bootm_final.c
@@ -6,7 +6,9 @@
  */
 
 #include <bootm.h>
+#include <dm/root.h>
 
 void bootm_final(enum bootm_final_t flags)
 {
+	dm_remove_devices_active();
 }
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index ddc935d2240..13d0d4dbe88 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -2241,7 +2241,7 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
 		if (IS_ENABLED(CONFIG_DM_ETH))
 			eth_halt();
 		board_quiesce_devices();
-		dm_remove_devices_active();
+		bootm_final(0);
 	}
 
 	/* Patch out unsupported runtime function */
-- 
2.43.0



More information about the U-Boot mailing list