On 2015-02-16 08:17:57, Laszlo Ersek wrote: > On 02/16/15 03:06, Jordan Justen wrote: > > Before we launch the QEMU kernel, we should signal the ReadyToBoot > > event. > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Jordan Justen <[email protected]> > > --- > > OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf | 1 + > > OvmfPkg/Library/PlatformBdsLib/QemuKernel.c | 6 ++++++ > > 2 files changed, 7 insertions(+) > > > > diff --git a/OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf > > b/OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf > > index d4f5faf..f0c3fb4 100644 > > --- a/OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf > > +++ b/OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf > > @@ -51,6 +51,7 @@ > > QemuFwCfgLib > > LoadLinuxLib > > QemuBootOrderLib > > + UefiLib > > > > [Pcd] > > gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile > > diff --git a/OvmfPkg/Library/PlatformBdsLib/QemuKernel.c > > b/OvmfPkg/Library/PlatformBdsLib/QemuKernel.c > > index 47ebed9..41a786a 100644 > > --- a/OvmfPkg/Library/PlatformBdsLib/QemuKernel.c > > +++ b/OvmfPkg/Library/PlatformBdsLib/QemuKernel.c > > @@ -19,6 +19,7 @@ > > #include <Library/MemoryAllocationLib.h> > > #include <Library/QemuFwCfgLib.h> > > #include <Library/UefiBootServicesTableLib.h> > > +#include <Library/UefiLib.h> > > > > > > EFI_STATUS > > @@ -143,6 +144,11 @@ TryRunningQemuKernel ( > > goto FreeAndReturn; > > } > > > > + // > > + // Signal the EVT_SIGNAL_READY_TO_BOOT event > > + // > > + EfiSignalEventReadyToBoot(); > > + > > Status = LoadLinux (KernelBuf, SetupBuf); > > > > FreeAndReturn: > > > > I've been thinking about where to signal the event group actually. I > would have preferred to signal it more closely to the actual deed, > somewhere inside LoadLinuxLib, when fewer things could fail after signaling.
I thought it would be better keep LoadLinuxLib more focused on Linux, and less on UEFI. I guess it might be possible to rework the LoadLinuxLib interface to allow for a final callback just before jumping into the kernel. > But "IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c" also does > some other stuff between signaling and LoadImage(). (And, it uses, the > exact same function to signal the event group; even the comment is > identical.) Hmm, I wonder why. :) This discussion reminded my of a long lost series of mine for running UEFI executables with QEMU's -kernel: http://thread.gmane.org/gmane.comp.bios.tianocore.devel/925/focus=1046 Somehow I had it in my head that this made it upstream. Whoops. -Jordan > So I guess it's okay. > > Reviewed-by: Laszlo Ersek <[email protected]> ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
