mirror of https://github.com/acidanthera/audk.git
SecurityPkg OpalPasswordDxe: Install menu without device dependency.
Change design to always install opal menu. Current implementation only install menu when device connect. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
parent
12087ff6d6
commit
f14307489f
|
@ -24,10 +24,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
OPAL_DRIVER mOpalDriver;
|
OPAL_DRIVER mOpalDriver;
|
||||||
|
|
||||||
// flag to track hii installation
|
|
||||||
BOOLEAN gHiiInstalled = FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_PASSWORD_SIZE 32
|
#define MAX_PASSWORD_SIZE 32
|
||||||
#define MAX_PASSWORD_TRY_COUNT 5
|
#define MAX_PASSWORD_TRY_COUNT 5
|
||||||
|
|
||||||
|
@ -732,6 +728,11 @@ EfiDriverEntryPoint(
|
||||||
&ReadyToBootEvent
|
&ReadyToBootEvent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Install Hii packages.
|
||||||
|
//
|
||||||
|
HiiInstall();
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -965,14 +966,6 @@ OpalEfiDriverBindingStart(
|
||||||
|
|
||||||
AddDeviceToTail(Dev);
|
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
|
// check if device is locked and prompt for password
|
||||||
//
|
//
|
||||||
|
|
|
@ -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.
|
Install the HII related resources.
|
||||||
|
|
||||||
|
@ -158,15 +121,6 @@ HiiInstall(
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_HANDLE DriverHandle;
|
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.
|
// Clear the global configuration.
|
||||||
//
|
//
|
||||||
|
|
|
@ -78,4 +78,4 @@
|
||||||
gOpalExtraInfoVariableGuid ## PRODUCES ## GUID
|
gOpalExtraInfoVariableGuid ## PRODUCES ## GUID
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiSmmCommunicationProtocolGuid
|
gEfiSmmCommunicationProtocolGuid AND gEfiHiiStringProtocolGuid AND gEfiHiiDatabaseProtocolGuid
|
||||||
|
|
Loading…
Reference in New Issue