EFI_STATUS Status;\r
UINT16 Timeout;\r
EFI_EVENT UserInputDurationTime;\r
- LIST_ENTRY *Link;\r
- BDS_COMMON_OPTION *BootOption;\r
UINTN Index;\r
EFI_INPUT_KEY Key;\r
- EFI_TPL OldTpl;\r
EFI_BOOT_MODE BootMode;\r
\r
//\r
//\r
// To give the User a chance to enter Setup here, if user set TimeOut is 0.\r
// BDS should still give user a chance to enter Setup\r
- //\r
- // Connect first boot option, and then check user input before exit \r
- //\r
- for (Link = BootOptionList->ForwardLink; Link != BootOptionList;Link = Link->ForwardLink) {\r
- BootOption = CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATURE);\r
- if (!IS_LOAD_OPTION_TYPE (BootOption->Attribute, LOAD_OPTION_ACTIVE)) {\r
- //\r
- // skip the header of the link list, becuase it has no boot option\r
- //\r
- continue;\r
- } else {\r
- //\r
- // Make sure the boot option device path connected, but ignore the BBS device path\r
- //\r
- if (DevicePathType (BootOption->DevicePath) != BBS_DEVICE_PATH) {\r
- BdsLibConnectDevicePath (BootOption->DevicePath);\r
- } \r
- break; \r
- }\r
- } \r
-\r
- //\r
// Check whether the user input after the duration time has expired \r
//\r
- OldTpl = EfiGetCurrentTpl();\r
- gBS->RestoreTPL (TPL_APPLICATION); \r
gBS->WaitForEvent (1, &UserInputDurationTime, &Index);\r
gBS->CloseEvent (UserInputDurationTime);\r
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
- gBS->RaiseTPL (OldTpl); \r
\r
if (!EFI_ERROR (Status)) {\r
//\r