From e1e91b73d12cb87cac0472b86a6df167db0a057f Mon Sep 17 00:00:00 2001 From: lzeng14 Date: Tue, 5 Mar 2013 12:20:53 +0000 Subject: Follow UEFI spec, set TimeOut and HwErrRecSupport variable by EFI variable service instead of PcdSet(). Signed-off-by: Star Zeng Reviewed-by: Liming Gao git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14162 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c') diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c index f9b83a4499..6eaec886f2 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c @@ -457,6 +457,8 @@ BdsEntry ( LIST_ENTRY BootOptionList; UINTN BootNextSize; CHAR16 *FirmwareVendor; + EFI_STATUS Status; + UINT16 BootTimeOut; // // Insert the performance probe @@ -510,6 +512,25 @@ BdsEntry ( InitializeHwErrRecSupport(); + // + // Initialize L"Timeout" EFI global variable. + // + BootTimeOut = PcdGet16 (PcdPlatformBootTimeOut); + if (BootTimeOut != 0xFFFF) { + // + // If time out value equal 0xFFFF, no need set to 0xFFFF to variable area because UEFI specification + // define same behavior between no value or 0xFFFF value for L"Timeout". + // + Status = gRT->SetVariable ( + L"Timeout", + &gEfiGlobalVariableGuid, + EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE, + sizeof (UINT16), + &BootTimeOut + ); + ASSERT_EFI_ERROR(Status); + } + // // bugbug: platform specific code // Initialize the platform specific string and language -- cgit v1.2.3