According to the UEFI spec, EFI_EVENT_GROUP_READY_TO_BOOT "is notified by the system when the Boot Manager is about to load and execute a boot option". ArmVirtPkg doesn't do this currently when launching a kernel from the QEMU command line. OvmfPkg does (see git commit 28a34033ee).
At least two edk2-wide callbacks are worth mentioning: - OnReadyToBoot() in "MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c" performs variable reclaim and (optionally) installs variable usage statistics as a vendor config table; - OnReadyToBoot() in "SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c" installs the image execution info table if it doesn't exist yet, in SecureBoot-enabled builds. Cc: Ard Biesheuvel <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <[email protected]> --- ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf | 1 + ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf index 9a3cfcd..79ba7b2 100644 --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf @@ -53,6 +53,7 @@ [LibraryClasses] QemuBootOrderLib QemuFwCfgLib UefiBootServicesTableLib + UefiLib UefiRuntimeServicesTableLib [FixedPcd] diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c index 21545f0..b882dd2 100644 --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c @@ -20,6 +20,7 @@ #include <Guid/FileSystemVolumeLabelInfo.h> #include <Library/PrintLib.h> #include <Library/QemuFwCfgLib.h> +#include <Library/UefiLib.h> #include <Protocol/DevicePath.h> #include <Protocol/LoadedImage.h> #include <Protocol/SimpleFileSystem.h> @@ -1066,6 +1067,11 @@ TryRunningQemuKernel ( } // + // Signal the EFI_EVENT_GROUP_READY_TO_BOOT event. + // + EfiSignalEventReadyToBoot(); + + // // Start the image. // Status = gBS->StartImage ( -- 1.8.3.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

