From 9a470dae60ed0c57afdf61342616dd1768ba5ec8 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Fri, 18 Sep 2015 13:58:35 +0000 Subject: [PATCH] ArmVirtPkg: PlatformIntelBdsLib: signal ReadyToBoot on direct kernel boot 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18513 6f19259b-4bc3-4df7-8a09-765794883524 --- .../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 9a3cfcd955..79ba7b2afb 100644 --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf @@ -53,6 +53,7 @@ QemuBootOrderLib QemuFwCfgLib UefiBootServicesTableLib + UefiLib UefiRuntimeServicesTableLib [FixedPcd] diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c index 21545f066e..b882dd2713 100644 --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1065,6 +1066,11 @@ TryRunningQemuKernel ( (CHAR16 *)KernelLoadedImage->LoadOptions)); } + // + // Signal the EFI_EVENT_GROUP_READY_TO_BOOT event. + // + EfiSignalEventReadyToBoot(); + // // Start the image. //