audk/OvmfPkg/Library
Laszlo Ersek 9253c14d41 OvmfPkg: QemuBootOrderLib: expose QEMU's "-boot menu=on[,splash-time=N]"
The QEMU command line option

  -boot menu=on

is meant to have the guest firmware wait for a firmware-specific interval
for the user to enter the boot menu. During the wait, the user can opt to
enter the boot menu, or interrupt the wait and proceed to booting at once.
If the wait interval elapses, the firmware should boot as it normally
would.

The QEMU command line option

  -boot menu=on,splash-time=N

means the same, except the firmware should wait for cca. N milliseconds
instead of a firmware-specific interval.

We can approximate this behavior quite well for edk2's virtual platforms
because the Intel BDS front page already supports a progress bar, with
semantics similar to the above. Let's distill the fw_cfg bits underlying
"-boot menu=on,splash-time=N" for the BDS policies, in the form of a
timeout value they can pass to Intel's PlatformBdsEnterFrontPage().

If the boot menu is not requested, we return
"gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut", which
is what the virtual platforms use right now.

If the boot menu is requested without specifying the timeout, we return
the same PCD, unless it would cause us to skip the boot menu at once. In
the latter case, we return 3 seconds (as an approximation of the 2500 ms
SeaBIOS default.)

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1170507

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16610 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-14 16:25:54 +00:00
..
AcpiTimerLib OvmfPkg: AcpiTimerLib: Switch additional stages to PCD-based Dxe instance 2014-11-14 00:38:53 +00:00
EmuVariableFvbLib OvmfPkg EMU FVB: Add 2 functions to PlatformFvbLib 2011-01-09 03:51:16 +00:00
LoadLinuxLib OvmfPkg LoadLinuxLib: Convert X64/JumpToKernel.asm to NASM 2014-10-31 20:54:31 +00:00
LockBoxLib OvmfPkg: implement LockBoxLib 2014-03-04 08:03:23 +00:00
NvVarsFileLib Fix VS2013 build failure. 2014-08-13 06:31:08 +00:00
PlatformBdsLib OvmfPkg: extract QemuBootOrderLib 2015-01-02 12:07:57 +00:00
PlatformDebugLibIoPort OvmfPkg: add support for debug console on port 0x402 2012-07-26 16:36:39 +00:00
PlatformFvbLibNull OvmfPkg EMU FVB: Add 2 functions to PlatformFvbLib 2011-01-09 03:51:16 +00:00
PlatformSecureLib OvmfPkg: Add custom mode setup if the Secure Boot build option is specified. 2012-04-04 17:35:06 +00:00
QemuBootOrderLib OvmfPkg: QemuBootOrderLib: expose QEMU's "-boot menu=on[,splash-time=N]" 2015-01-14 16:25:54 +00:00
QemuFwCfgLib OvmfPkg QemuFwCfgLib: Convert X64/IoLibExAsm.asm to NASM 2014-10-31 20:54:54 +00:00
ResetSystemLib OvmfPkg ResetSystemLib: Fix VS build error 2013-08-19 04:15:26 +00:00
SerializeVariablesLib OvmfPkg/SerializeVariablesLib: ignore secure variable restore errors 2013-05-28 17:21:37 +00:00
VirtioLib OvmfPkg/Virtio: Removed VirtioReadDevice() / VirtIoWriteDevice() functions 2013-12-11 16:58:39 +00:00
VirtioMmioDeviceLib OvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over MMIO 2013-12-11 16:57:59 +00:00