Follow UEFI spec, set TimeOut and HwErrRecSupport variable by EFI variable service instead of PcdSet().

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14162 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lzeng14
2013-03-05 12:20:53 +00:00
parent fa9bebd8f9
commit e1e91b73d1
4 changed files with 48 additions and 12 deletions

View File

@@ -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