\r
//\r
// 1. Handle device which already set password.\r
- // 2. When request to send freeze comamnd, driver also needs to handle device\r
+ // 2. When request to send freeze command, driver also needs to handle device\r
// which support security feature.\r
//\r
if ((!PasswordIsFullZero (ConfigFormEntry->Password)) ||\r
//\r
if ((ConfigFormEntry->IfrData.SecurityStatus.Supported) &&\r
(ConfigFormEntry->IfrData.SecurityStatus.Enabled)) {\r
+\r
+ //\r
+ // Add PcdSkipHddPasswordPrompt to determin whether to skip password prompt.\r
+ // Due to board design, device may not power off during system warm boot, which result in\r
+ // security status remain unlocked status, hence we add device security status check here.\r
+ //\r
+ // If device is in the locked status, device keeps locked and system continues booting.\r
+ // If device is in the unlocked status, system is forced shutdown for security concern.\r
+ //\r
+ if (PcdGetBool (PcdSkipHddPasswordPrompt)) {\r
+ if (ConfigFormEntry->IfrData.SecurityStatus.Locked) {\r
+ return;\r
+ } else {\r
+ gRT->ResetSystem (EfiResetShutdown, EFI_SUCCESS, 0, NULL);\r
+ }\r
+ }\r
//\r
// As soon as the HDD password is in enabled state, we pop up a window to unlock hdd\r
// no matter it's really in locked or unlocked state.\r
}\r
\r
/**\r
- Get the HDD Password configuration form entry by the index of the goto opcode actived.\r
+ Get the HDD Password configuration form entry by the index of the goto opcode activated.\r
\r
- @param[in] Index The 0-based index of the goto opcode actived.\r
+ @param[in] Index The 0-based index of the goto opcode activated.\r
\r
@return The HDD Password configuration form entry found.\r
**/\r
@param ImageHandle Image handle this driver.\r
@param SystemTable Pointer to SystemTable.\r
\r
- @retval EFI_SUCESS This function always complete successfully.\r
+ @retval EFI_SUCCESS This function always complete successfully.\r
\r
**/\r
EFI_STATUS\r
{\r
EFI_STATUS Status;\r
HDD_PASSWORD_DXE_PRIVATE_DATA *Private;\r
- EFI_EVENT Registration;\r
+ VOID *Registration;\r
EFI_EVENT EndOfDxeEvent;\r
EDKII_VARIABLE_LOCK_PROTOCOL *VariableLock;\r
\r
ASSERT_EFI_ERROR (Status);\r
\r
//\r
- // Make HDD_PASSWORD_VARIABLE_NAME varible read-only.\r
+ // Make HDD_PASSWORD_VARIABLE_NAME variable read-only.\r
//\r
Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);\r
if (!EFI_ERROR (Status)) {\r