]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg: PlatformIntelBdsLib: signal ReadyToBoot on direct kernel boot
authorLaszlo Ersek <lersek@redhat.com>
Fri, 18 Sep 2015 13:58:35 +0000 (13:58 +0000)
committerlersek <lersek@Edk2>
Fri, 18 Sep 2015 13:58:35 +0000 (13:58 +0000)
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 <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18513 6f19259b-4bc3-4df7-8a09-765794883524

ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c

index 9a3cfcd9553ec18a0e822813fbc875eff01ee610..79ba7b2afbf70f735f30b4fe6585c855a8b67549 100644 (file)
@@ -53,6 +53,7 @@
   QemuBootOrderLib\r
   QemuFwCfgLib\r
   UefiBootServicesTableLib\r
+  UefiLib\r
   UefiRuntimeServicesTableLib\r
 \r
 [FixedPcd]\r
index 21545f066e6e2e4617b0af0fd68a1ee55940de34..b882dd2713c15a11051481d020be1b63f171b47f 100644 (file)
@@ -20,6 +20,7 @@
 #include <Guid/FileSystemVolumeLabelInfo.h>\r
 #include <Library/PrintLib.h>\r
 #include <Library/QemuFwCfgLib.h>\r
+#include <Library/UefiLib.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 #include <Protocol/SimpleFileSystem.h>\r
@@ -1065,6 +1066,11 @@ TryRunningQemuKernel (
       (CHAR16 *)KernelLoadedImage->LoadOptions));\r
   }\r
 \r
+  //\r
+  // Signal the EFI_EVENT_GROUP_READY_TO_BOOT event.\r
+  //\r
+  EfiSignalEventReadyToBoot();\r
+\r
   //\r
   // Start the image.\r
   //\r