]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
fwu: Move boottime checks to EVT_POST_PREBOOT
authorMichal Simek <michal.simek@amd.com>
Thu, 2 Apr 2026 15:37:00 +0000 (17:37 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 17 Apr 2026 06:02:42 +0000 (08:02 +0200)
Switch fwu_boottime_checks() from EVT_MAIN_LOOP to EVT_POST_PREBOOT
because there is no reason to call FWU so early. FWU triggers EFI
stack initialization before all devices are visible which prevents
the EFI stack from scanning these devices and adding them to EFI
variables.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
lib/fwu_updates/fwu.c
test/dm/fwu_mdata.c

index 37c613014d18b5ecdec9671943614569edfd75c6..e82600a29a40060923dab4e1c3d24bbc3ed4fc94 100644 (file)
@@ -796,4 +796,4 @@ static int fwu_boottime_checks(void)
 
        return 0;
 }
-EVENT_SPY_SIMPLE(EVT_MAIN_LOOP, fwu_boottime_checks);
+EVENT_SPY_SIMPLE(EVT_POST_PREBOOT, fwu_boottime_checks);
index 643b647af0a9aab7293e5437cb5efd00a846ffdb..cfe543d8a236de940dd4acc44cff21f5fed4fcac 100644 (file)
@@ -100,7 +100,7 @@ static int dm_test_fwu_mdata_read(struct unit_test_state *uts)
         * Trigger lib/fwu_updates/fwu.c fwu_boottime_checks()
         * to populate g_dev global pointer in that library.
         */
-       ut_assertok(event_notify_null(EVT_MAIN_LOOP));
+       ut_assertok(event_notify_null(EVT_POST_PREBOOT));
 
        ut_assertok(uclass_first_device_err(UCLASS_FWU_MDATA, &dev));
        ut_assertok(fwu_init());
@@ -127,7 +127,7 @@ static int dm_test_fwu_mdata_write(struct unit_test_state *uts)
         * Trigger lib/fwu_updates/fwu.c fwu_boottime_checks()
         * to populate g_dev global pointer in that library.
         */
-       ut_assertok(event_notify_null(EVT_MAIN_LOOP));
+       ut_assertok(event_notify_null(EVT_POST_PREBOOT));
 
        ut_assertok(uclass_first_device_err(UCLASS_FWU_MDATA, &dev));