diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2021-11-16 18:46:27 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2021-11-20 10:53:00 +0100 |
commit | 43eaf5b13f31395afbef3ff89d99a4f6c1a2ba63 (patch) | |
tree | fbf01e5fde05dd039df77e64d1a0efa178168cb1 /lib | |
parent | 5d49b32f0a34cc4c23da8060ac18345984c9b96c (diff) | |
download | u-boot-43eaf5b13f31395afbef3ff89d99a4f6c1a2ba63.tar.gz u-boot-43eaf5b13f31395afbef3ff89d99a4f6c1a2ba63.tar.bz2 u-boot-43eaf5b13f31395afbef3ff89d99a4f6c1a2ba63.zip |
efi_loader: EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES
Implement the EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES event group
handling.
Add the definition of EFI_EVENT_GROUP_AFTER_READY_TO_BOOT.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 1823990d9b..6fdd0ef77a 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -71,6 +71,9 @@ const efi_guid_t efi_guid_driver_binding_protocol = /* event group ExitBootServices() invoked */ const efi_guid_t efi_guid_event_group_exit_boot_services = EFI_EVENT_GROUP_EXIT_BOOT_SERVICES; +/* event group before ExitBootServices() invoked */ +const efi_guid_t efi_guid_event_group_before_exit_boot_services = + EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES; /* event group SetVirtualAddressMap() invoked */ const efi_guid_t efi_guid_event_group_virtual_address_change = EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE; @@ -2123,6 +2126,16 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle, if (!systab.boottime) goto out; + /* Notify EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES event group. */ + list_for_each_entry(evt, &efi_events, link) { + if (evt->group && + !guidcmp(evt->group, + &efi_guid_event_group_before_exit_boot_services)) { + efi_signal_event(evt); + break; + } + } + /* Stop all timer related activities */ timers_enabled = false; |