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
This commit is contained in:
qhuang8 2008-09-24 14:39:46 +00:00
parent 1fe74953c0
commit 0ef93eb7b4
2 changed files with 11 additions and 22 deletions

View File

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

View File

@ -365,7 +365,7 @@
## Default timeout value for displaying progressing bar in before boot OS.
# This value can be changed in BDS.
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformBootTimeOutDefault|10|UINT16|0x40000001
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformBootTimeOutDefault|0xffff|UINT16|0x40000001
## Error level for hardware recorder.
gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|1|UINT16|0x40000002
@ -423,7 +423,7 @@
## Default timeout value for displaying progressing bar in before boot OS.
# This value can be changed in BDS.
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformBootTimeOutDefault|10|UINT16|0x40000001
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformBootTimeOutDefault|0xffff|UINT16|0x40000001
## Error level for hardware recorder.
gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|1|UINT16|0x40000002
@ -464,7 +464,7 @@
## Default timeout value for displaying progressing bar in before boot OS.
# This value can be changed in BDS.
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformBootTimeOutDefault|10|UINT16|0x40000001
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformBootTimeOutDefault|0xffff|UINT16|0x40000001
## Error level for hardware recorder.
gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|1|UINT16|0x40000002