diff options
Diffstat (limited to 'IntelFrameworkModulePkg')
8 files changed, 12 insertions, 65 deletions
diff --git a/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h b/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h index a57fe6c8b4..7d1077d713 100644 --- a/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h +++ b/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h @@ -197,18 +197,6 @@ BdsLibBuildOptionFromShell ( // Bds misc lib functions
//
/**
- Return the default value for system Timeout variable.
-
- @return Timeout value.
-
-**/
-UINT16
-EFIAPI
-BdsLibGetTimeout (
- VOID
- );
-
-/**
Get boot mode by looking up configuration table and parsing HOB list
@param BootMode Boot mode from PEI handoff HOB.
diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec index c6a7094e4c..3fe2e35d3a 100644 --- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec +++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec @@ -106,5 +106,8 @@ [PcdsPatchableInModule.common]
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|UINT16|0x00010025
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeRuntimeMemorySize|128|UINT16|0x0001002e
-
-
+
+[PcdsDynamic.common]
+ ## Timeout value for displaying progressing bar in before boot OS.
+ # According to UEFI 2.0 spec, it should treat the Timeout value as 0xffff.
+ gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0xffff|UINT16|0x40000001
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c index acf61ebcb6..f46efd8636 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c @@ -22,42 +22,6 @@ BOOLEAN mResetRequired = FALSE; extern UINT16 gPlatformBootTimeOutDefault;
-
-/**
- Return the default value for system Timeout variable.
-
- @return Timeout value.
-
-**/
-UINT16
-EFIAPI
-BdsLibGetTimeout (
- VOID
- )
-{
- UINT16 Timeout;
- UINTN Size;
- EFI_STATUS Status;
-
- //
- // Return Timeout variable or 0xffff if no valid
- // Timeout variable exists.
- //
- Size = sizeof (UINT16);
- Status = gRT->GetVariable (L"Timeout", &gEfiGlobalVariableGuid, NULL, &Size, &Timeout);
- if (EFI_ERROR (Status)) {
- //
- // According to UEFI 2.0 spec, it should treat the Timeout value as 0xffff
- // (default value PcdPlatformBootTimeOutDefault) when L"Timeout" variable is not present.
- // To make the current EFI Automatic-Test activity possible, platform can choose other value
- // for automatic boot when the variable is not present.
- //
- Timeout = PcdGet16 (PcdPlatformBootTimeOutDefault);
- }
-
- return Timeout;
-}
-
/**
The function will go through the driver option link list, load and start
every driver the driver option device path point to.
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf b/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf index 722573055c..baa777df2c 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf @@ -113,5 +113,4 @@ gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
[Pcd]
- gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformBootTimeOutDefault
gEfiMdeModulePkgTokenSpaceGuid.PcdDefaultBootFileName
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h index 8779573b38..077718a041 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h @@ -63,7 +63,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/CapsuleLib.h>
#include <Library/HiiLib.h>
#include <Library/ExtendedHiiLib.h>
-
+#include <Library/PcdLib.h>
#include <Library/GenericBdsLib.h>
#include <Library/PlatformBdsLib.h>
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf index 34c38ad682..cd89b77eab 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf @@ -111,7 +111,8 @@ UefiDriverEntryPoint
PlatformBdsLib
CapsuleLib
-
+ PcdLib
+
[Guids]
gEfiGlobalVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"BootNext" (The number of next boot option)
## SOMETIMES_PRODUCES ## Variable:L"BootXX" (Boot option variable)
@@ -170,7 +171,8 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
-
+ gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut
+
[Depex]
TRUE
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c index 4598d3d186..d935347487 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c @@ -610,16 +610,7 @@ ApplyChangeHandler ( break;
case FORM_TIME_OUT_ID:
- Status = gRT->SetVariable (
- L"Timeout",
- &gEfiGlobalVariableGuid,
- VAR_FLAG,
- sizeof (UINT16),
- &(CurrentFakeNVMap->BootTimeOut)
- );
- if (EFI_ERROR (Status)) {
- goto Error;
- }
+ PcdSet16 (PcdPlatformBootTimeOut, CurrentFakeNVMap->BootTimeOut);
Private->BmmOldFakeNVData.BootTimeOut = CurrentFakeNVMap->BootTimeOut;
break;
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c index be47ddfe1e..6831289add 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c @@ -651,7 +651,7 @@ UpdateTimeOutPage ( UpdatePageStart (CallbackData);
- BootTimeOut = BdsLibGetTimeout ();
+ BootTimeOut = PcdGet16 (PcdPlatformBootTimeOut);
CreateNumericOpCode (
(EFI_QUESTION_ID) BOOT_TIME_OUT_QUESTION_ID,
|