diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c index e06ce4a6a1..4a4fa6a56d 100644 --- a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c @@ -24,10 +24,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. OPAL_DRIVER mOpalDriver; -// flag to track hii installation -BOOLEAN gHiiInstalled = FALSE; - - #define MAX_PASSWORD_SIZE 32 #define MAX_PASSWORD_TRY_COUNT 5 @@ -732,6 +728,11 @@ EfiDriverEntryPoint( &ReadyToBootEvent ); + // + // Install Hii packages. + // + HiiInstall(); + return Status; } @@ -965,14 +966,6 @@ OpalEfiDriverBindingStart( AddDeviceToTail(Dev); - // - // Install Hii if it hasn't already been installed - // - if (!gHiiInstalled) { - HiiInstall(); - gHiiInstalled = TRUE; - } - // // check if device is locked and prompt for password // diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c index 75ff9fcfff..0a4453a356 100644 --- a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c +++ b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c @@ -107,43 +107,6 @@ HiiSetCurrentConfiguration( } } -/** - Check that all required protocols for HII are available. - - @retval EFI_SUCCESS All required protocols are installed. - @retval EFI_NOT_FOUND One or more protocol are not installed. -**/ -EFI_STATUS -HiiCheckForRequiredProtocols ( - VOID - ) -{ - VOID* TempProtocol; - EFI_STATUS Status; - - Status = gBS->LocateProtocol(&gEfiHiiStringProtocolGuid, NULL, (VOID**)&TempProtocol ); - if (EFI_ERROR (Status)) { - return EFI_NOT_FOUND; - } - - Status = gBS->LocateProtocol(&gEfiHiiDatabaseProtocolGuid, NULL, (VOID**)&TempProtocol ); - if (EFI_ERROR (Status)) { - return EFI_NOT_FOUND; - } - - Status = gBS->LocateProtocol(&gEfiHiiConfigRoutingProtocolGuid, NULL, (VOID**)&TempProtocol ); - if (EFI_ERROR (Status)) { - return EFI_NOT_FOUND; - } - - Status = gBS->LocateProtocol(&gEfiFormBrowser2ProtocolGuid, NULL, (VOID**)&TempProtocol ); - if (EFI_ERROR (Status)) { - return EFI_NOT_FOUND; - } - - return EFI_SUCCESS; -} - /** Install the HII related resources. @@ -158,15 +121,6 @@ HiiInstall( EFI_STATUS Status; EFI_HANDLE DriverHandle; - // - // Check that all required protocols are available for HII. - // If not, fail the install - // - Status = HiiCheckForRequiredProtocols(); - if (EFI_ERROR(Status)) { - return Status; - } - // // Clear the global configuration. // diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalPasswordDxe.inf b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalPasswordDxe.inf index bae8885134..703c1b6039 100644 --- a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalPasswordDxe.inf +++ b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalPasswordDxe.inf @@ -78,4 +78,4 @@ gOpalExtraInfoVariableGuid ## PRODUCES ## GUID [Depex] - gEfiSmmCommunicationProtocolGuid + gEfiSmmCommunicationProtocolGuid AND gEfiHiiStringProtocolGuid AND gEfiHiiDatabaseProtocolGuid