13#ifndef __BLOCK_IO_CRYPTO_H__
14#define __BLOCK_IO_CRYPTO_H__
18#define EFI_BLOCK_IO_CRYPTO_PROTOCOL_GUID \
20 0xa00490ba, 0x3f1a, 0x4b4c, {0xab, 0x90, 0x4f, 0xa9, 0x97, 0x26, 0xa1, 0xe8} \
55 UINT64 CryptoBlockSizeBitMask;
69#define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_XTS \
71 0x2f87ba6a, 0x5c04, 0x4385, {0xa7, 0x80, 0xf3, 0xbf, 0x78, 0xa9, 0x7b, 0xec} \
74extern EFI_GUID gEfiBlockIoCryptoAlgoAesXtsGuid;
78 UINT64 CryptoBlockNumber;
79 UINT64 CryptoBlockByteSize;
82#define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_CBC_MICROSOFT_BITLOCKER \
84 0x689e4c62, 0x70bf, 0x4cf3, {0x88, 0xbb, 0x33, 0xb3, 0x18, 0x26, 0x86, 0x70} \
87extern EFI_GUID gEfiBlockIoCryptoAlgoAesCbcMsBitlockerGuid;
91 UINT64 CryptoBlockByteOffset;
92 UINT64 CryptoBlockByteSize;
95#define EFI_BLOCK_IO_CRYPTO_INDEX_ANY 0xFFFFFFFFFFFFFFFF
109 UINT64 CapabilityCount;
184 IN BOOLEAN ExtendedVerification
286 IN UINT64 ConfigurationCount,
327 IN UINT64 StartIndex,
328 IN UINT64 ConfigurationCount,
395 IN UINT64 BufferSize,
461 IN UINT64 BufferSize,
521extern EFI_GUID gEfiBlockIoCryptoProtocolGuid;
EFI_STATUS(EFIAPI * EFI_BLOCK_IO_CRYPTO_WRITE_EXTENDED)(IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, IN OUT EFI_BLOCK_IO_CRYPTO_TOKEN *Token, IN UINT64 BufferSize, IN VOID *Buffer, IN UINT64 *Index OPTIONAL, IN VOID *CryptoIvInput OPTIONAL)
EFI_STATUS(EFIAPI * EFI_BLOCK_IO_CRYPTO_GET_CAPABILITIES)(IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, OUT EFI_BLOCK_IO_CRYPTO_CAPABILITIES *Capabilities)
EFI_STATUS(EFIAPI * EFI_BLOCK_IO_CRYPTO_RESET)(IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS(EFIAPI * EFI_BLOCK_IO_CRYPTO_READ_EXTENDED)(IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, IN OUT EFI_BLOCK_IO_CRYPTO_TOKEN *Token, IN UINT64 BufferSize, OUT VOID *Buffer, IN UINT64 *Index OPTIONAL, IN VOID *CryptoIvInput OPTIONAL)
EFI_STATUS(EFIAPI * EFI_BLOCK_IO_CRYPTO_SET_CONFIGURATION)(IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN UINT64 ConfigurationCount, IN EFI_BLOCK_IO_CRYPTO_CONFIGURATION_TABLE_ENTRY *ConfigurationTable, OUT EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY *ResultingTable OPTIONAL)
EFI_STATUS(EFIAPI * EFI_BLOCK_IO_CRYPTO_GET_CONFIGURATION)(IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN UINT64 StartIndex, IN UINT64 ConfigurationCount, IN EFI_GUID *KeyOwnerGuid OPTIONAL, OUT EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY *ConfigurationTable)
EFI_STATUS(EFIAPI * EFI_BLOCK_IO_CRYPTO_FLUSH)(IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN OUT EFI_BLOCK_IO_CRYPTO_TOKEN *Token)