audk/MdeModulePkg/Core/Dxe
Ard Biesheuvel e8668d2dee MdeModulePkg/DxeCore: Call BeforeExitBootServices event group only once
According to UEFI spec 2.10 errata A section 7.4.6

  "All events from the EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES and
  EFI_EVENT_GROUP_EXIT_BOOT_SERVICES event notification groups as well
  as events of type EVT_SIGNAL_EXIT_BOOT_SERVICES must be signaled
  before ExitBootServices() returns EFI_SUCCESS. The events are only
  signaled once even if ExitBootServices() is called multiple times."

So keep track of whether ExitBootServices() has been called, and signal
the event group EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES only the first
time around.

EFI_EVENT_GROUP_EXIT_BOOT_SERVICES will only be signalled if
ExitBootServices() is going to run to [successful] completion, after
which calling it a second time is not possible anyway. So for this case,
no special handling is needed.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-12-06 08:33:53 +08:00
..
Dispatcher MdeModulePkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
DxeMain MdeModulePkg/DxeCore: Call BeforeExitBootServices event group only once 2024-12-06 08:33:53 +08:00
Event MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FwVol MdeModulePkg/Core/Dxe: Fix memory leak issue in FwVol.c 2023-09-11 02:17:51 +00:00
FwVolBlock MdeModulePkg/Core/Dxe: Fix memory leak issue in FwVolBlock.c 2023-09-11 02:17:51 +00:00
Gcd MdeModulePkg: Gcd: Only Update gMemoryMap Attributes if Correct GCD Type 2024-08-29 12:30:12 +00:00
Hand MdeModulePkg: CoreValidateHandle Optimization 2024-08-30 11:42:41 +00:00
Image MdeModulePkg: Fix redundant call to RestoreTpl() 2024-09-04 00:53:54 +00:00
Library MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Mem MdeModulePkg: Remove EFI_MEMORY_* Defines 2024-07-26 03:08:20 +00:00
Misc MdeModulePkg: Fix buffer overflow in MergeMemoryMap 2024-09-13 07:53:57 +00:00
SectionExtraction MdeModulePkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
DxeCore.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DxeCoreExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
DxeMain.h MdeModulePkg: CoreValidateHandle Optimization 2024-08-30 11:42:41 +00:00
DxeMain.inf MdeModulePkg: CoreValidateHandle Optimization 2024-08-30 11:42:41 +00:00