]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: notify when ExitBootServices is invoked
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 15 Sep 2017 08:06:18 +0000 (10:06 +0200)
committerAlexander Graf <agraf@suse.de>
Mon, 18 Sep 2017 21:53:57 +0000 (23:53 +0200)
All events of type EVT_SIGNAL_EXIT_BOOT_SERVICES have to be
notified when ExitBootServices is invoked.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_boottime.c

index 7c92a68bf46cf289de1f3273752ffae70953ee6c..0d234146d795bf735f0899f2a8978a1b64eec03e 100644 (file)
@@ -900,8 +900,19 @@ static void efi_exit_caches(void)
 static efi_status_t EFIAPI efi_exit_boot_services(void *image_handle,
                                                  unsigned long map_key)
 {
+       int i;
+
        EFI_ENTRY("%p, %ld", image_handle, map_key);
 
+       /* Notify that ExitBootServices is invoked. */
+       for (i = 0; i < ARRAY_SIZE(efi_events); ++i) {
+               if (efi_events[i].type != EVT_SIGNAL_EXIT_BOOT_SERVICES)
+                       continue;
+               efi_signal_event(&efi_events[i]);
+       }
+       /* Make sure that notification functions are not called anymore */
+       efi_tpl = TPL_HIGH_LEVEL;
+
        board_quiesce_devices();
 
        /* Fix up caches for EFI payloads if necessary */