diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-24 14:39:46 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-24 14:39:46 +0000 |
commit | 0ef93eb7b4605cea75df45e02cdb234b78e2ae43 (patch) | |
tree | 6830ccedb1bc2a7a2fe930ab3d2713738a5c511e /MdeModulePkg/Library | |
parent | 1fe74953c037509ef01eceed3d886c1ba99e4a20 (diff) | |
download | edk2-0ef93eb7b4605cea75df45e02cdb234b78e2ae43.zip edk2-0ef93eb7b4605cea75df45e02cdb234b78e2ae43.tar.gz edk2-0ef93eb7b4605cea75df45e02cdb234b78e2ae43.tar.bz2 |
Update the default value of PcdPlatformBootTimeOutDefault to be 0xffff to be compliant to UEFI spec: If L"Timeout" variable is absent, we treat it as if it were 0xffff and wait for user key.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5963 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r-- | MdeModulePkg/Library/GenericBdsLib/BdsMisc.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c index 56b9f85..9482cbe 100644 --- a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c +++ b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c @@ -45,27 +45,16 @@ BdsLibGetTimeout ( //
Size = sizeof (UINT16);
Status = gRT->GetVariable (L"Timeout", &gEfiGlobalVariableGuid, NULL, &Size, &Timeout);
- if (!EFI_ERROR (Status)) {
- return 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);
}
- //
- // To make the current EFI Automatic-Test activity possible, just add
- // following code to make AutoBoot enabled when this variable is not
- // present.
- // This code should be removed later.
- //
- Timeout = PcdGet16 (PcdPlatformBootTimeOutDefault);
- //
- // Notes: Platform should set default variable if non exists on all error cases!!!
- //
- Status = gRT->SetVariable (
- L"Timeout",
- &gEfiGlobalVariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
- sizeof (UINT16),
- &Timeout
- );
return Timeout;
}
|