summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-24 14:39:46 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-24 14:39:46 +0000
commit0ef93eb7b4605cea75df45e02cdb234b78e2ae43 (patch)
tree6830ccedb1bc2a7a2fe930ab3d2713738a5c511e /MdeModulePkg
parent1fe74953c037509ef01eceed3d886c1ba99e4a20 (diff)
downloadedk2-platforms-0ef93eb7b4605cea75df45e02cdb234b78e2ae43.tar.xz
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')
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsMisc.c27
-rw-r--r--MdeModulePkg/MdeModulePkg.dec6
2 files changed, 11 insertions, 22 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
index 56b9f8537e..9482cbe119 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;
}
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 7dcb1f133b..c21a2a0323 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -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