mirror of
https://github.com/Dasharo/edk2.git
synced 2026-06-13 10:16:24 -07:00
MdeModulePkg/Universal/BdsDxe: fix setting autoboot timeout
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This commit is contained in:
@@ -377,9 +377,6 @@ PlatformBootManagerBeforeConsole (
|
||||
EFI_INPUT_KEY F12;
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
|
||||
UINTN OptionNumber;
|
||||
EFI_STATUS Status;
|
||||
UINT16 BootTimeOut;
|
||||
UINTN VarSize;
|
||||
|
||||
VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid,
|
||||
ConnectRootBridge, NULL);
|
||||
@@ -408,17 +405,6 @@ PlatformBootManagerBeforeConsole (
|
||||
OptionNumber = GetBootManagerMenuAppOption ();
|
||||
EfiBootManagerAddKeyOptionVariable (NULL, (UINT16)OptionNumber, 0, &F12, NULL);
|
||||
|
||||
Status = gRT->GetVariable(
|
||||
L"Timeout",
|
||||
&gEfiGlobalVariableGuid,
|
||||
NULL,
|
||||
&VarSize,
|
||||
&BootTimeOut
|
||||
);
|
||||
if (!EFI_ERROR (Status) && BootTimeOut != 0) {
|
||||
PcdSet16S (PcdPlatformBootTimeOut, BootTimeOut);
|
||||
}
|
||||
|
||||
//
|
||||
// Install ready to lock.
|
||||
// This needs to be done before option rom dispatched.
|
||||
@@ -501,7 +487,7 @@ PlatformBootManagerWaitCallback (
|
||||
BootLogoUpdateProgress (
|
||||
White.Pixel,
|
||||
Black.Pixel,
|
||||
L"Start boot option",
|
||||
L"",
|
||||
White.Pixel,
|
||||
(Timeout - TimeoutRemain) * 100 / Timeout,
|
||||
0
|
||||
|
||||
@@ -894,6 +894,7 @@ BootMaintRouteConfig (
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
PcdSet16S (PcdPlatformBootTimeOut, NewBmmData->BootTimeOut);
|
||||
Private->BmmOldFakeNVData.BootTimeOut = NewBmmData->BootTimeOut;
|
||||
}
|
||||
|
||||
|
||||
@@ -746,10 +746,19 @@ BdsEntry (
|
||||
|
||||
InitializeHwErrRecSupport ();
|
||||
|
||||
//
|
||||
// Initialize L"Timeout" EFI global variable.
|
||||
//
|
||||
BootTimeOut = PcdGet16 (PcdPlatformBootTimeOut);
|
||||
Status = gRT->GetVariable(
|
||||
L"Timeout",
|
||||
&gEfiGlobalVariableGuid,
|
||||
NULL,
|
||||
&DataSize,
|
||||
&BootTimeOut
|
||||
);
|
||||
if (!EFI_ERROR (Status) && BootTimeOut != 0 && BootTimeOut != 0xFFFF) {
|
||||
PcdSet16S (PcdPlatformBootTimeOut, BootTimeOut);
|
||||
} else {
|
||||
BootTimeOut = PcdGet16 (PcdPlatformBootTimeOut);
|
||||
}
|
||||
|
||||
if (BootTimeOut != 0xFFFF) {
|
||||
//
|
||||
// If time out value equal 0xFFFF, no need set to 0xFFFF to variable area because UEFI specification
|
||||
|
||||
Reference in New Issue
Block a user