13#define UPPER_LOWER_CASE_OFFSET 0x20
20extern UINT8 OpalPasswordFormBin[];
27extern UINT8 OpalPasswordDxeStrings[];
29CHAR16 OpalPasswordStorageName[] = L
"OpalHiiConfig";
41const EFI_GUID gHiiPackageListGuid = PACKAGE_LIST_GUID;
42const EFI_GUID gHiiSetupVariableGuid = SETUP_VARIABLE_GUID;
43const EFI_GUID gOpalSetupFormSetGuid = SETUP_FORMSET_GUID;
65 OPAL_PASSWORD_CONFIG_GUID
69 END_ENTIRE_DEVICE_PATH_SUBTYPE,
71 (UINT8)(END_DEVICE_PATH_LENGTH),
72 (UINT8)((END_DEVICE_PATH_LENGTH) >> 8)
95 UINTN DevicePathSizeInVariable;
99 DEBUG ((DEBUG_INFO,
"%a() - enter\n", __func__));
105 OPAL_REQUEST_VARIABLE_NAME,
106 &gHiiSetupVariableGuid,
110 if (EFI_ERROR (Status) || (Variable ==
NULL)) {
114 TempVariable = Variable;
116 (VariableSize >= TempVariable->Length) &&
121 DevicePath = OpalDisk->OpalDevicePath;
123 if ((DevicePathSize == DevicePathSizeInVariable) &&
124 (
CompareMem (DevicePath, DevicePathInVariable, DevicePathSize) == 0))
133 "OpalRequest got: 0x%x\n",
139 VariableSize -= TempVariable->Length;
145 DEBUG ((DEBUG_INFO,
"%a() - exit\n", __func__));
163 UINTN TempVariableSize;
167 UINTN NewVariableSize;
169 UINTN DevicePathSizeInVariable;
171 UINTN DevicePathSize;
173 DEBUG ((DEBUG_INFO,
"%a() - enter\n", __func__));
177 "OpalRequest to save: 0x%x\n",
187 OPAL_REQUEST_VARIABLE_NAME,
188 &gHiiSetupVariableGuid,
192 if (!EFI_ERROR (Status) && (Variable !=
NULL)) {
193 TempVariable = Variable;
194 TempVariableSize = VariableSize;
196 (TempVariableSize >= TempVariable->Length) &&
201 DevicePath = OpalDisk->OpalDevicePath;
203 if ((DevicePathSize == DevicePathSizeInVariable) &&
204 (
CompareMem (DevicePath, DevicePathInVariable, DevicePathSize) == 0))
211 NewVariable = Variable;
212 NewVariableSize = VariableSize;
216 TempVariableSize -= TempVariable->Length;
220 if (NewVariable ==
NULL) {
225 DevicePath = OpalDisk->OpalDevicePath;
229 ASSERT (NewVariable !=
NULL);
230 CopyMem (NewVariable, Variable, VariableSize);
235 CopyMem (DevicePathInVariable, DevicePath, DevicePathSize);
238 DevicePath = OpalDisk->OpalDevicePath;
242 ASSERT (NewVariable !=
NULL);
246 CopyMem (DevicePathInVariable, DevicePath, DevicePathSize);
249 Status =
gRT->SetVariable (
250 OPAL_REQUEST_VARIABLE_NAME,
256 if (EFI_ERROR (Status)) {
257 DEBUG ((DEBUG_INFO,
"OpalRequest variable set failed (%r)\n", Status));
260 if (NewVariable != Variable) {
264 if (Variable !=
NULL) {
268 DEBUG ((DEBUG_INFO,
"%a() - exit\n", __func__));
280 UINT32 PpStorageFlag;
290 if ((PpStorageFlag & TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID) != 0) {
293 DEBUG ((DEBUG_INFO,
"HiiSetCurrentConfiguration: HiiGetString( ) failed\n"));
299 DEBUG ((DEBUG_INFO,
"HiiSetCurrentConfiguration: HiiGetString( ) failed\n"));
307 if ((PpStorageFlag & TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID) != 0) {
310 DEBUG ((DEBUG_INFO,
"HiiSetCurrentConfiguration: HiiGetString( ) failed\n"));
316 DEBUG ((DEBUG_INFO,
"HiiSetCurrentConfiguration: HiiGetString( ) failed\n"));
324 if ((PpStorageFlag & TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID) != 0) {
327 DEBUG ((DEBUG_INFO,
"HiiSetCurrentConfiguration: HiiGetString( ) failed\n"));
333 DEBUG ((DEBUG_INFO,
"HiiSetCurrentConfiguration: HiiGetString( ) failed\n"));
359 ZeroMem (&gHiiConfiguration,
sizeof (gHiiConfiguration));
370 gHiiConfigAccessProtocol.RouteConfig =
RouteConfig;
376 Status =
gBS->InstallMultipleProtocolInterfaces (
378 &gEfiHiiConfigAccessProtocolGuid,
379 &gHiiConfigAccessProtocol,
380 &gEfiDevicePathProtocolGuid,
381 &gHiiVendorDevicePath,
385 if (EFI_ERROR (Status)) {
411 &gHiiPackageListGuid,
413 OpalPasswordDxeStrings,
421 if (gHiiPackageListHandle ==
NULL) {
422 DEBUG ((DEBUG_INFO,
"OpalHiiAddPackages failed\n"));
423 return EFI_OUT_OF_RESOURCES;
450 Status =
gBS->UninstallMultipleProtocolInterfaces (
452 &gEfiHiiConfigAccessProtocolGuid,
453 &gHiiConfigAccessProtocol,
454 &gEfiDevicePathProtocolGuid,
455 &gHiiVendorDevicePath,
458 if (EFI_ERROR (Status)) {
459 DEBUG ((DEBUG_INFO,
"Cannot uninstall Hii Protocols: %r\n", Status));
477 EFI_STRING_ID DiskNameId;
482 gHiiConfiguration.SupportedDisks = 0;
484 for (Index = 0; Index < gHiiConfiguration.NumDisks; Index++) {
487 gHiiConfiguration.SupportedDisks |= (1 << Index);
490 if ((DiskName ==
NULL) || (DiskNameId == 0)) {
491 return EFI_UNSUPPORTED;
516 case 0:
return STRING_TOKEN (STR_MAIN_GOTO_DISK_INFO_0);
517 case 1:
return STRING_TOKEN (STR_MAIN_GOTO_DISK_INFO_1);
518 case 2:
return STRING_TOKEN (STR_MAIN_GOTO_DISK_INFO_2);
519 case 3:
return STRING_TOKEN (STR_MAIN_GOTO_DISK_INFO_3);
520 case 4:
return STRING_TOKEN (STR_MAIN_GOTO_DISK_INFO_4);
521 case 5:
return STRING_TOKEN (STR_MAIN_GOTO_DISK_INFO_5);
538 IN CHAR16 *ActionString
544 CHAR16 ApproveResponse;
545 CHAR16 RejectResponse;
551 if (OpalDisk->EstimateTimeCost < MAX_ACCEPTABLE_REVERTING_TIME) {
555 ApproveResponse = L
'Y';
556 RejectResponse = L
'N';
558 UnicodeSPrint (Unicode,
StrSize (L
"WARNING: ############# action needs about ####### seconds"), L
"WARNING: %s action needs about %d seconds", ActionString, OpalDisk->EstimateTimeCost);
562 EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
565 L
" System should not be powered off until action completion ",
567 L
" Press 'Y/y' to continue, press 'N/n' to cancel ",
571 ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (ApproveResponse | UPPER_LOWER_CASE_OFFSET)) &&
572 ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (RejectResponse | UPPER_LOWER_CASE_OFFSET))
575 if ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) == (RejectResponse | UPPER_LOWER_CASE_OFFSET)) {
608 EFI_BROWSER_ACTION Action,
609 EFI_QUESTION_ID QuestionId,
612 EFI_BROWSER_ACTION_REQUEST *ActionRequest
620 VOID *StartOpCodeHandle;
621 VOID *EndOpCodeHandle;
625 if (ActionRequest !=
NULL) {
626 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
628 return EFI_INVALID_PARAMETER;
634 if ((QuestionId & HII_KEY_FLAG) == 0) {
638 HiiKey.Raw = QuestionId;
639 HiiKeyId = (UINT8)HiiKey.KeyBits.Id;
641 if (Action == EFI_BROWSER_ACTION_RETRIEVE) {
642 if ((HiiKeyId == HII_KEY_ID_VAR_SUPPORTED_DISKS) || (HiiKeyId == HII_KEY_ID_VAR_SELECTED_DISK_AVAILABLE_ACTIONS)) {
647 if (StartOpCodeHandle ==
NULL) {
648 return EFI_OUT_OF_RESOURCES;
652 if (EndOpCodeHandle ==
NULL) {
653 return EFI_OUT_OF_RESOURCES;
669 case HII_KEY_ID_VAR_SUPPORTED_DISKS:
670 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_VAR_SUPPORTED_DISKS\n"));
673 StartLabel->
Number = OPAL_MAIN_MENU_LABEL_START;
674 EndLabel->
Number = OPAL_MAIN_MENU_LABEL_END;
676 gHiiPackageListHandle,
678 FORMID_VALUE_MAIN_MENU,
684 case HII_KEY_ID_VAR_SELECTED_DISK_AVAILABLE_ACTIONS:
685 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_VAR_SELECTED_DISK_AVAILABLE_ACTIONS\n"));
688 StartLabel->
Number = OPAL_DISK_INFO_LABEL_START;
689 EndLabel->
Number = OPAL_DISK_INFO_LABEL_END;
691 gHiiPackageListHandle,
693 FORMID_VALUE_DISK_INFO_FORM_MAIN,
705 }
else if (Action == EFI_BROWSER_ACTION_CHANGING) {
707 case HII_KEY_ID_GOTO_DISK_INFO:
710 case HII_KEY_ID_REVERT:
711 case HII_KEY_ID_PSID_REVERT:
713 if (OpalDisk !=
NULL) {
720 case HII_KEY_ID_SECURE_ERASE:
722 if (OpalDisk !=
NULL) {
729 }
else if (Action == EFI_BROWSER_ACTION_CHANGED) {
731 case HII_KEY_ID_BLOCKSID:
734 PpRequest = TCG2_PHYSICAL_PRESENCE_NO_ACTION;
738 PpRequest = TCG2_PHYSICAL_PRESENCE_ENABLE_BLOCK_SID;
742 PpRequest = TCG2_PHYSICAL_PRESENCE_DISABLE_BLOCK_SID;
746 PpRequest = TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_ENABLE_BLOCK_SID_FUNC_TRUE;
750 PpRequest = TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_ENABLE_BLOCK_SID_FUNC_FALSE;
754 PpRequest = TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_DISABLE_BLOCK_SID_FUNC_TRUE;
758 PpRequest = TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_DISABLE_BLOCK_SID_FUNC_FALSE;
762 PpRequest = TCG2_PHYSICAL_PRESENCE_NO_ACTION;
763 DEBUG ((DEBUG_ERROR,
"Invalid value input!\n"));
769 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
772 case HII_KEY_ID_SET_ADMIN_PWD:
773 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_SET_ADMIN_PWD\n"));
774 gHiiConfiguration.OpalRequest.SetAdminPwd = Value->b;
776 if (OpalDisk !=
NULL) {
780 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
783 case HII_KEY_ID_SET_USER_PWD:
784 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_SET_USER_PWD\n"));
785 gHiiConfiguration.OpalRequest.SetUserPwd = Value->b;
787 if (OpalDisk !=
NULL) {
791 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
794 case HII_KEY_ID_SECURE_ERASE:
795 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_SECURE_ERASE\n"));
796 gHiiConfiguration.OpalRequest.SecureErase = Value->b;
798 if (OpalDisk !=
NULL) {
802 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
805 case HII_KEY_ID_REVERT:
806 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_REVERT\n"));
807 gHiiConfiguration.OpalRequest.Revert = Value->b;
809 if (OpalDisk !=
NULL) {
813 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
815 case HII_KEY_ID_KEEP_USER_DATA:
816 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_KEEP_USER_DATA\n"));
817 gHiiConfiguration.OpalRequest.KeepUserData = Value->b;
819 if (OpalDisk !=
NULL) {
823 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
826 case HII_KEY_ID_PSID_REVERT:
827 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_PSID_REVERT\n"));
828 gHiiConfiguration.OpalRequest.PsidRevert = Value->b;
830 if (OpalDisk !=
NULL) {
834 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
837 case HII_KEY_ID_DISABLE_USER:
838 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_DISABLE_USER\n"));
839 gHiiConfiguration.OpalRequest.DisableUser = Value->b;
841 if (OpalDisk !=
NULL) {
845 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
848 case HII_KEY_ID_ENABLE_FEATURE:
849 DEBUG ((DEBUG_INFO,
"HII_KEY_ID_ENABLE_FEATURE\n"));
850 gHiiConfiguration.OpalRequest.EnableFeature = Value->b;
852 if (OpalDisk !=
NULL) {
856 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
864 return EFI_UNSUPPORTED;
881 gHiiConfiguration.SelectedDiskIndex = Index;
906 if (DiskName ==
NULL) {
907 return EFI_UNSUPPORTED;
912 gHiiConfiguration.SelectedDiskAvailableActions = HII_ACTION_NONE;
914 gHiiConfiguration.KeepUserDataForced =
FALSE;
918 if (OpalDisk !=
NULL) {
921 if (Ret == TcgResultSuccess) {
925 gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.PsidRevert == 1) ? HII_ACTION_PSID_REVERT : HII_ACTION_NONE;
930 gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.Unlock == 1) ? HII_ACTION_UNLOCK : HII_ACTION_NONE;
932 if (!
OpalFeatureEnabled (&OpalDisk->SupportedAttributes, &OpalDisk->LockingFeature)) {
933 if (OpalDisk->Owner == OpalOwnershipNobody) {
934 gHiiConfiguration.SelectedDiskAvailableActions |= HII_ACTION_ENABLE_FEATURE;
941 DEBUG ((DEBUG_INFO,
"Feature disabled but ownership != nobody\n"));
944 gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.Revert == 1) ? HII_ACTION_REVERT : HII_ACTION_NONE;
945 gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.AdminPass == 1) ? HII_ACTION_SET_ADMIN_PWD : HII_ACTION_NONE;
946 gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.UserPass == 1) ? HII_ACTION_SET_USER_PWD : HII_ACTION_NONE;
947 gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.SecureErase == 1) ? HII_ACTION_SECURE_ERASE : HII_ACTION_NONE;
948 gHiiConfiguration.SelectedDiskAvailableActions |= (AvailActions.DisableUser == 1) ? HII_ACTION_DISABLE_USER : HII_ACTION_NONE;
956 gHiiConfiguration.OpalRequest.KeepUserData = 1;
957 if (AvailActions.RevertKeepDataForced) {
958 gHiiConfiguration.KeepUserDataForced =
TRUE;
992 if (ReturnCode == TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS) {
994 }
else if (ReturnCode == TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE) {
995 Status = EFI_OUT_OF_RESOURCES;
996 }
else if (ReturnCode == TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED) {
997 Status = EFI_UNSUPPORTED;
999 Status = EFI_DEVICE_ERROR;
1027 CONST EFI_STRING Configuration,
1028 EFI_STRING *Progress
1031 if ((Configuration ==
NULL) || (Progress ==
NULL)) {
1032 return (EFI_INVALID_PARAMETER);
1035 *Progress = Configuration;
1036 if (!
HiiIsConfigHdrMatch (Configuration, &gHiiSetupVariableGuid, OpalPasswordStorageName)) {
1037 return EFI_NOT_FOUND;
1040 *Progress = Configuration +
StrLen (Configuration);
1075 CONST EFI_STRING Request,
1076 EFI_STRING *Progress,
1081 EFI_STRING ConfigRequest;
1082 EFI_STRING ConfigRequestHdr;
1085 BOOLEAN AllocatedRequest;
1091 if ((Progress ==
NULL) || (Results ==
NULL)) {
1092 return (EFI_INVALID_PARAMETER);
1095 *Progress = Request;
1096 if ((Request !=
NULL) &&
1099 return EFI_NOT_FOUND;
1102 AllocatedRequest =
FALSE;
1104 ConfigRequest = Request;
1105 if ((Request ==
NULL) || (
StrStr (Request, L
"OFFSET") ==
NULL)) {
1112 ConfigRequestHdr =
HiiConstructConfigHdr (&gHiiSetupVariableGuid, OpalPasswordStorageName, DriverHandle);
1113 Size = (
StrLen (ConfigRequestHdr) + 32 + 1) *
sizeof (CHAR16);
1115 if (ConfigRequest ==
NULL) {
1116 return EFI_OUT_OF_RESOURCES;
1119 AllocatedRequest =
TRUE;
1120 UnicodeSPrint (ConfigRequest, Size, L
"%s&OFFSET=0&WIDTH=%016LX", ConfigRequestHdr, (UINT64)BufferSize);
1130 (UINT8 *)&gHiiConfiguration,
1139 if (AllocatedRequest) {
1141 ConfigRequest =
NULL;
1147 if (Request ==
NULL) {
1149 }
else if (
StrStr (Request, L
"OFFSET") ==
NULL) {
1150 *Progress = Request +
StrLen (Request);
1167 &gHiiSetupVariableGuid,
1168 (CHAR16 *)L
"OpalHiiConfig",
1169 sizeof (gHiiConfiguration),
1170 (UINT8 *)&gHiiConfiguration,
1186 &gHiiSetupVariableGuid,
1187 (CHAR16 *)L
"OpalHiiConfig",
1188 sizeof (gHiiConfiguration),
1189 (UINT8 *)&gHiiConfiguration
1205 EFI_STRING_ID DestStringId,
1221 UniSize = (Len + 1) *
sizeof (CHAR16);
1232 if (
HiiSetString (gHiiPackageListHandle, DestStringId, UniStr,
NULL) == 0) {
1233 DEBUG ((DEBUG_INFO,
"HiiSetFormString( ) failed\n"));
1235 return (EFI_OUT_OF_RESOURCES);
1262 UINT8 ActiveDataRemovalMechanism;
1263 UINT32 RemovalMechanishLists[ResearvedMechanism];
1266 Dev->OpalDisk.Sscp = Dev->Sscp;
1267 Dev->OpalDisk.MediaId = Dev->MediaId;
1268 Dev->OpalDisk.OpalDevicePath = Dev->OpalDevicePath;
1270 ZeroMem (&Session,
sizeof (Session));
1271 Session.Sscp = Dev->Sscp;
1272 Session.MediaId = Dev->MediaId;
1275 if (TcgResult != TcgResultSuccess) {
1276 return EFI_DEVICE_ERROR;
1279 Session.OpalBaseComId = Dev->OpalDisk.OpalBaseComId;
1281 TcgResult =
OpalUtilGetMsid (&Session, Dev->OpalDisk.Msid, OPAL_MSID_LENGTH, &Dev->OpalDisk.MsidLength);
1282 if (TcgResult != TcgResultSuccess) {
1283 return EFI_DEVICE_ERROR;
1286 if (Dev->OpalDisk.SupportedAttributes.DataRemoval) {
1288 if (TcgResult != TcgResultSuccess) {
1289 return EFI_DEVICE_ERROR;
1293 if (TcgResult != TcgResultSuccess) {
1294 return EFI_DEVICE_ERROR;
1297 Dev->OpalDisk.EstimateTimeCost = RemovalMechanishLists[ActiveDataRemovalMechanism];
1320 if (OpalDisk->MsidLength == 0) {
1321 return EFI_INVALID_PARAMETER;
1324 if (OpalDisk->SentBlockSID) {
1325 return EFI_ACCESS_DENIED;
1328 ZeroMem (&Session,
sizeof (Session));
1329 Session.Sscp = OpalDisk->Sscp;
1330 Session.MediaId = OpalDisk->MediaId;
1331 Session.OpalBaseComId = OpalDisk->OpalBaseComId;
1356 ZeroMem (&Session,
sizeof (Session));
1357 Session.Sscp = OpalDisk->Sscp;
1358 Session.MediaId = OpalDisk->MediaId;
1359 Session.OpalBaseComId = OpalDisk->OpalBaseComId;
1362 if (TcgResult != TcgResultSuccess) {
1363 return EFI_DEVICE_ERROR;
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
CHAR16 *EFIAPI StrStr(IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define HARDWARE_DEVICE_PATH
UINTN EFIAPI GetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STRING EFIAPI HiiConstructConfigHdr(IN CONST EFI_GUID *Guid OPTIONAL, IN CONST CHAR16 *Name OPTIONAL, IN EFI_HANDLE DriverHandle)
BOOLEAN EFIAPI HiiGetBrowserData(IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL, IN UINTN BufferSize, OUT UINT8 *Buffer)
VOID *EFIAPI HiiAllocateOpCodeHandle(VOID)
VOID EFIAPI HiiFreeOpCodeHandle(VOID *OpCodeHandle)
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
UINT8 *EFIAPI HiiCreateGuidOpCode(IN VOID *OpCodeHandle, IN CONST EFI_GUID *Guid, IN CONST VOID *GuidOpCode OPTIONAL, IN UINTN OpCodeSize)
BOOLEAN EFIAPI HiiSetBrowserData(IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL, IN UINTN BufferSize, IN CONST UINT8 *Buffer, IN CONST CHAR16 *RequestElement OPTIONAL)
EFI_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
EFI_STATUS EFIAPI HiiUpdateForm(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid OPTIONAL, IN EFI_FORM_ID FormId, IN VOID *StartOpCodeHandle, IN VOID *EndOpCodeHandle OPTIONAL)
BOOLEAN EFIAPI HiiIsConfigHdrMatch(IN CONST EFI_STRING ConfigHdr, IN CONST EFI_GUID *Guid OPTIONAL, IN CONST CHAR16 *Name OPTIONAL)
EFI_STRING_ID EFIAPI HiiSetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId OPTIONAL, IN CONST EFI_STRING String, IN CONST CHAR8 *SupportedLanguages OPTIONAL)
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
#define EFI_IFR_EXTEND_OP_LABEL
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
EFI_RUNTIME_SERVICES * gRT
#define DEBUG(Expression)
UINT8 GetDeviceCount(VOID)
TCG_RESULT EFIAPI OpalSupportGetAvailableActions(IN OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes, IN TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature, IN UINT16 OwnerShip, OUT OPAL_DISK_ACTIONS *AvalDiskActions)
EFI_STATUS EFIAPI ExtractConfig(CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, CONST EFI_STRING Request, EFI_STRING *Progress, EFI_STRING *Results)
VOID OpalHiiGetBrowserData(VOID)
EFI_STATUS HiiPopulateMainMenuForm(VOID)
EFI_STATUS OpalDiskUpdateOwnerShip(OPAL_DISK *OpalDisk)
EFI_STATUS HiiConfirmDataRemovalAction(IN OPAL_DISK *OpalDisk, IN CHAR16 *ActionString)
EFI_STATUS EFIAPI RouteConfig(CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, CONST EFI_STRING Configuration, EFI_STRING *Progress)
EFI_STATUS HiiSelectDisk(UINT8 Index)
EFI_STATUS OpalDiskUpdateStatus(OPAL_DISK *OpalDisk)
EFI_STATUS HiiUninstall(VOID)
EFI_STATUS HiiPopulateDiskInfoForm(VOID)
EFI_STATUS HiiInstall(VOID)
EFI_STRING_ID GetDiskNameStringId(UINT8 DiskIndex)
EFI_STATUS HiiSetFormString(EFI_STRING_ID DestStringId, CHAR8 *SrcAsciiStr)
VOID HiiSetCurrentConfiguration(VOID)
VOID OpalHiiSetBrowserData(VOID)
EFI_STATUS OpalDiskInitialize(IN OPAL_DRIVER_DEVICE *Dev)
VOID SaveOpalRequest(IN OPAL_DISK *OpalDisk, IN OPAL_REQUEST OpalRequest)
EFI_STATUS HiiSetBlockSidAction(IN UINT32 PpRequest)
VOID GetSavedOpalRequest(IN OPAL_DISK *OpalDisk, OUT OPAL_REQUEST *OpalRequest)
EFI_STATUS EFIAPI DriverCallback(CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, EFI_BROWSER_ACTION Action, EFI_QUESTION_ID QuestionId, UINT8 Type, EFI_IFR_TYPE_VALUE *Value, EFI_BROWSER_ACTION_REQUEST *ActionRequest)
EFI_STATUS OpalHiiAddPackages(VOID)
EFI_HANDLE HiiGetDriverImageHandleCB(VOID)
OPAL_DISK * HiiGetOpalDiskCB(UINT8 DiskIndex)
CHAR8 * HiiDiskGetNameCB(UINT8 DiskIndex)
UINT32 EFIAPI Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction(IN UINT32 OperationRequest, IN UINT32 RequestParameter)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STRING_ID NewString(IN CHAR16 *String, IN EFI_HII_HANDLE HiiHandle)
UINT32 EFIAPI Tcg2PhysicalPresenceLibGetManagementFlags(VOID)
TCG_RESULT EFIAPI OpalGetSupportedAttributesInfo(OPAL_SESSION *Session, OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes, UINT16 *OpalBaseComId)
BOOLEAN EFIAPI OpalFeatureSupported(OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes)
TCG_RESULT EFIAPI OpalUtilGetActiveDataRemovalMechanism(OPAL_SESSION *Session, const VOID *GeneratedSid, UINT32 SidLength, UINT8 *ActiveDataRemovalMechanism)
TCG_RESULT EFIAPI OpalGetLockingInfo(OPAL_SESSION *Session, TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature)
OPAL_OWNER_SHIP EFIAPI OpalUtilDetermineOwnership(OPAL_SESSION *Session, UINT8 *Msid, UINT32 MsidLength)
TCG_RESULT EFIAPI OpalUtilGetDataRemovalMechanismLists(IN OPAL_SESSION *Session, OUT UINT32 *RemovalMechanismLists)
TCG_RESULT EFIAPI OpalUtilGetMsid(OPAL_SESSION *Session, UINT8 *Msid, UINT32 MsidBufferLength, UINT32 *MsidLength)
BOOLEAN EFIAPI OpalFeatureEnabled(OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes, TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature)
EFI_HII_CONFIG_ROUTING_PROTOCOL * gHiiConfigRouting
EFI_STATUS EFIAPI GetVariable2(IN CONST CHAR16 *Name, IN CONST EFI_GUID *Guid, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
VOID EFIAPI CreatePopUp(IN UINTN Attribute, OUT EFI_INPUT_KEY *Key OPTIONAL,...)
#define EFI_VARIABLE_NON_VOLATILE