10#define _OPAL_DRIVER_H_
48#define EFI_DRIVER_NAME_UNICODE L"1.0 UEFI Opal Driver"
51#define LANGUAGE_RFC_3066_ENGLISH ((CHAR8*)"en")
54#define LANGUAGE_ISO_639_2_ENGLISH ((CHAR8*)"eng")
56#define CONCAT_(x, y) x ## y
57#define CONCAT(x, y) CONCAT_(x, y)
59#define UNICODE_STR(x) CONCAT( L, x )
65#define OPAL_MSID_LENGTH 128
67#define MAX_PASSWORD_TRY_COUNT 5
70#define PSID_CHARACTER_LENGTH 0x20
71#define MAX_PSID_TRY_COUNT 5
78#define MAX_ACCEPTABLE_REVERTING_TIME 10
91 UINT16 PsidRevert : 1;
101 UINT16 RevertKeepDataForced : 1;
106 UINT16 AdminPass : 1;
122 UINT16 SecureErase : 1;
127 UINT16 DisableUser : 1;
135 UINT8 Msid[OPAL_MSID_LENGTH];
139 UINT16 OpalBaseComId;
140 OPAL_OWNER_SHIP Owner;
143 UINT8 PasswordLength;
144 UINT8 Password[OPAL_MAX_PASSWORD_SIZE];
146 UINT32 EstimateTimeCost;
147 BOOLEAN SentBlockSID;
180#define DRIVER_DEVICE_FROM_OPALDISK(OpalDiskPointer) (OPAL_DRIVER_DEVICE*)(BASE_CR(OpalDiskPointer, OPAL_DRIVER_DEVICE, OpalDisk))
228 IN UINT32 PasswordLength
265 IN UINT32 MsidLength,
362 UINTN NumberOfChildren,
488 CHAR16 **ControllerName
613 CHAR16 **ControllerName
EFI_STATUS EFIAPI OpalEfiDriverComponentName2GetControllerName(EFI_COMPONENT_NAME2_PROTOCOL *This, EFI_HANDLE ControllerHandle, EFI_HANDLE ChildHandle, CHAR8 *Language, CHAR16 **ControllerName)
VOID OpalSupportUpdatePassword(IN OUT OPAL_DISK *OpalDisk, IN VOID *Password, IN UINT32 PasswordLength)
EFI_STATUS EFIAPI EfiDriverUnload(EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI OpalEfiDriverComponentNameGetControllerName(EFI_COMPONENT_NAME_PROTOCOL *This, EFI_HANDLE ControllerHandle, EFI_HANDLE ChildHandle, CHAR8 *Language, CHAR16 **ControllerName)
EFI_STATUS EFIAPI OpalEfiDriverComponentName2GetDriverName(EFI_COMPONENT_NAME2_PROTOCOL *This, CHAR8 *Language, CHAR16 **DriverName)
EFI_STATUS EFIAPI OpalEfiDriverBindingStop(EFI_DRIVER_BINDING_PROTOCOL *This, EFI_HANDLE Controller, UINTN NumberOfChildren, EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI OpalEfiDriverBindingStart(EFI_DRIVER_BINDING_PROTOCOL *This, EFI_HANDLE Controller, EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
UINT8 GetDeviceCount(VOID)
EFI_STATUS EFIAPI OpalEfiDriverBindingSupported(EFI_DRIVER_BINDING_PROTOCOL *This, EFI_HANDLE Controller, EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI OpalEfiDriverComponentNameGetDriverName(EFI_COMPONENT_NAME_PROTOCOL *This, CHAR8 *Language, CHAR16 **DriverName)
OPAL_DRIVER_DEVICE * OpalDriverGetDeviceList(VOID)
BOOLEAN OpalDriverGetDriverDeviceName(OPAL_DRIVER_DEVICE *Dev)
TCG_RESULT EFIAPI OpalSupportEnableOpalFeature(IN OPAL_SESSION *Session, IN VOID *Msid, IN UINT32 MsidLength, IN VOID *Password, IN UINT32 PassLength)
TCG_RESULT EFIAPI OpalSupportGetAvailableActions(IN OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes, IN TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature, IN UINT16 OwnerShip, OUT OPAL_DISK_ACTIONS *AvalDiskActions)
CHAR8 * NameZ
Allocated/freed by UEFI Filter Driver at device creation/removal.
EFI_HANDLE Handle
Device handle.
EFI_DEVICE_PATH_PROTOCOL * OpalDevicePath
Device protocols consumed.
CHAR16 * Name16
Allocated/freed by UEFI Filter Driver at device creation/removal.
UINT32 MediaId
Required parameter for EFI_STORAGE_SECURITY_COMMAND_PROTOCOL, from BLOCK_IO_MEDIA.
OPAL_DISK OpalDisk
User context.
OPAL_DRIVER_DEVICE * Next
Linked list pointer.
EFI_HANDLE Handle
Driver image handle.
OPAL_DRIVER_DEVICE * DeviceList
Linked list of controllers owned by this Driver.