mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 07:04:28 +02:00
ArmVirtPkg/PlatformBootManagerLib: sync Timeout with PcdPlatformBootTimeOut
Set the Timeout global variable to the same value as PcdPlatformBootTimeOut. This way the "setvar" command in the UEFI shell, and the "efibootmgr" command in a Linux guest, can report the front page timeout that was requested on the QEMU command line (see GetFrontPageTimeoutFromQemu()). A DEBUG_VERBOSE message is logged on success too, for our QE team's sake. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20200304094413.19462-3-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
This commit is contained in:
parent
9b08c655ff
commit
7288ff4095
@ -25,6 +25,7 @@
|
|||||||
#include <Protocol/PciRootBridgeIo.h>
|
#include <Protocol/PciRootBridgeIo.h>
|
||||||
#include <Protocol/VirtioDevice.h>
|
#include <Protocol/VirtioDevice.h>
|
||||||
#include <Guid/EventGroup.h>
|
#include <Guid/EventGroup.h>
|
||||||
|
#include <Guid/GlobalVariable.h>
|
||||||
#include <Guid/RootBridgesConnectedEventGroup.h>
|
#include <Guid/RootBridgesConnectedEventGroup.h>
|
||||||
#include <Guid/SerialPortLibVendor.h>
|
#include <Guid/SerialPortLibVendor.h>
|
||||||
|
|
||||||
@ -686,7 +687,9 @@ PlatformBootManagerBeforeConsole (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
UINT16 FrontPageTimeout;
|
||||||
RETURN_STATUS PcdStatus;
|
RETURN_STATUS PcdStatus;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Signal EndOfDxe PI Event
|
// Signal EndOfDxe PI Event
|
||||||
@ -744,9 +747,29 @@ PlatformBootManagerBeforeConsole (
|
|||||||
//
|
//
|
||||||
// Set the front page timeout from the QEMU configuration.
|
// Set the front page timeout from the QEMU configuration.
|
||||||
//
|
//
|
||||||
PcdStatus = PcdSet16S (PcdPlatformBootTimeOut,
|
FrontPageTimeout = GetFrontPageTimeoutFromQemu ();
|
||||||
GetFrontPageTimeoutFromQemu ());
|
PcdStatus = PcdSet16S (PcdPlatformBootTimeOut, FrontPageTimeout);
|
||||||
ASSERT_RETURN_ERROR (PcdStatus);
|
ASSERT_RETURN_ERROR (PcdStatus);
|
||||||
|
//
|
||||||
|
// Reflect the PCD in the standard Timeout variable.
|
||||||
|
//
|
||||||
|
Status = gRT->SetVariable (
|
||||||
|
EFI_TIME_OUT_VARIABLE_NAME,
|
||||||
|
&gEfiGlobalVariableGuid,
|
||||||
|
(EFI_VARIABLE_NON_VOLATILE |
|
||||||
|
EFI_VARIABLE_BOOTSERVICE_ACCESS |
|
||||||
|
EFI_VARIABLE_RUNTIME_ACCESS),
|
||||||
|
sizeof FrontPageTimeout,
|
||||||
|
&FrontPageTimeout
|
||||||
|
);
|
||||||
|
DEBUG ((
|
||||||
|
EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,
|
||||||
|
"%a: SetVariable(%s, %u): %r\n",
|
||||||
|
__FUNCTION__,
|
||||||
|
EFI_TIME_OUT_VARIABLE_NAME,
|
||||||
|
FrontPageTimeout,
|
||||||
|
Status
|
||||||
|
));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Register platform-specific boot options and keyboard shortcuts.
|
// Register platform-specific boot options and keyboard shortcuts.
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
gEfiFileSystemInfoGuid
|
gEfiFileSystemInfoGuid
|
||||||
gEfiFileSystemVolumeLabelInfoIdGuid
|
gEfiFileSystemVolumeLabelInfoIdGuid
|
||||||
gEfiEndOfDxeEventGroupGuid
|
gEfiEndOfDxeEventGroupGuid
|
||||||
|
gEfiGlobalVariableGuid
|
||||||
gRootBridgesConnectedEventGroupGuid
|
gRootBridgesConnectedEventGroupGuid
|
||||||
gUefiShellFileGuid
|
gUefiShellFileGuid
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user