]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Fix compilation error in BlockIoCrypto.h
authorFeng Tian <feng.tian@intel.com>
Mon, 25 May 2015 02:01:09 +0000 (02:01 +0000)
committererictian <erictian@Edk2>
Mon, 25 May 2015 02:01:09 +0000 (02:01 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17499 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Protocol/BlockIoCrypto.h

index 40124010bc3b835612dc1a9d1d2cf5ac3d2d8194..77931e7e4648e4dd4c68a967285f7386f75402f0 100644 (file)
@@ -42,6 +42,118 @@ typedef struct {
   EFI_STATUS              TransactionStatus;\r
 } EFI_BLOCK_IO_CRYPTO_TOKEN;\r
 \r
+typedef struct {\r
+  //\r
+  // GUID of the algorithm.\r
+  //\r
+  EFI_GUID       Algorithm;\r
+  //\r
+  // Specifies KeySizein bits used with this Algorithm.\r
+  //\r
+  UINT64         KeySize;\r
+  //\r
+  // Specifies bitmask of block sizes supported by this algorithm.\r
+  // Bit j being set means that 2^j bytes crypto block size is supported.\r
+  //\r
+  UINT64         CryptoBlockSizeBitMask;\r
+} EFI_BLOCK_IO_CRYPTO_CAPABILITY;\r
+\r
+///\r
+/// EFI_BLOCK_IO_CRYPTO_IV_INPUT structure is used as a common header in CryptoIvInput\r
+/// parameters passed to the ReadExtended and WriteExtended methods for Inline\r
+/// Cryptographic Interface.\r
+/// Its purpose is to pass size of the entire CryptoIvInputparameter memory buffer to\r
+/// the Inline Cryptographic Interface.\r
+///\r
+typedef struct {\r
+  UINT64         InputSize;\r
+} EFI_BLOCK_IO_CRYPTO_IV_INPUT;\r
+\r
+#define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_XTS \\r
+    { \\r
+      0x2f87ba6a, 0x5c04, 0x4385, {0xa7, 0x80, 0xf3, 0xbf, 0x78, 0xa9, 0x7b, 0xec} \\r
+    }\r
+\r
+extern EFI_GUID gEfiBlockIoCryptoAlgoAesXtsGuid;\r
+\r
+typedef struct {\r
+  EFI_BLOCK_IO_CRYPTO_IV_INPUT Header;\r
+  UINT64                       CryptoBlockNumber;\r
+  UINT64                       CryptoBlockByteSize;\r
+} EFI_BLOCK_IO_CRYPTO_IV_INPUT_AES_XTS;\r
+\r
+#define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_CBC_MICROSOFT_BITLOCKER \\r
+    { \\r
+      0x689e4c62, 0x70bf, 0x4cf3, {0x88, 0xbb, 0x33, 0xb3, 0x18, 0x26, 0x86, 0x70} \\r
+    }\r
+\r
+extern EFI_GUID gEfiBlockIoCryptoAlgoAesCbcMsBitlockerGuid;\r
+\r
+typedef struct {\r
+  EFI_BLOCK_IO_CRYPTO_IV_INPUT  Header;\r
+  UINT64                        CryptoBlockByteOffset;\r
+  UINT64                        CryptoBlockByteSize;\r
+} EFI_BLOCK_IO_CRYPTO_IV_INPUT_AES_CBC_MICROSOFT_BITLOCKER;\r
+\r
+#define EFI_BLOCK_IO_CRYPTO_INDEX_ANY 0xFFFFFFFFFFFFFFFF\r
+\r
+typedef struct {\r
+  //\r
+  // Is inline cryptographic capability supported on this device.\r
+  //\r
+  BOOLEAN                         Supported;\r
+  //\r
+  // Maximum number of keys that can be configured at the same time.\r
+  //\r
+  UINT64                          KeyCount;\r
+  //\r
+  // Number of supported capabilities.\r
+  //\r
+  UINT64                          CapabilityCount;\r
+  //\r
+  // Array of supported capabilities.\r
+  //\r
+  EFI_BLOCK_IO_CRYPTO_CAPABILITY  Capabilities[1];\r
+} EFI_BLOCK_IO_CRYPTO_CAPABILITIES;\r
+\r
+typedef struct {\r
+  //\r
+  // Configuration table index. A special Index EFI_BLOCK_IO_CRYPTO_INDEX_ANY can be\r
+  // used to set any available entry in the configuration table.\r
+  //\r
+  UINT64                          Index;\r
+  //\r
+  // Identifies the owner of the configuration table entry. Entry can also be used\r
+  // with the Nil value to clear key from the configuration table index.\r
+  //\r
+  EFI_GUID                        KeyOwnerGuid;\r
+  //\r
+  // A supported capability to be used. The CryptoBlockSizeBitMask field of the\r
+  // structure should have only one bit set from the supported mask.\r
+  //\r
+  EFI_BLOCK_IO_CRYPTO_CAPABILITY  Capability;\r
+  //\r
+  // Pointer to the key. The size of the key is defined by the KeySize field of\r
+  // the capability specified by the Capability parameter.\r
+  //\r
+  VOID                            *CryptoKey;\r
+} EFI_BLOCK_IO_CRYPTO_CONFIGURATION_TABLE_ENTRY;\r
+\r
+typedef struct {\r
+  //\r
+  // Configuration table index.\r
+  //\r
+  UINT64                          Index;\r
+  //\r
+  // Identifies the current owner of the entry.\r
+  //\r
+  EFI_GUID                        KeyOwnerGuid;\r
+  //\r
+  // The capability to be used. The CryptoBlockSizeBitMask field of the structure\r
+  // has only one bit set from the supported mask.\r
+  //\r
+  EFI_BLOCK_IO_CRYPTO_CAPABILITY  Capability;\r
+} EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY;\r
 \r
 /**\r
   Reset the block device hardware.\r
@@ -179,7 +291,6 @@ EFI_STATUS
      OUT EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY *ResultingTable OPTIONAL\r
   );\r
 \r
-\r
 /**\r
   Get the configuration of the underlying inline cryptographic interface.\r
 \r
@@ -395,120 +506,6 @@ EFI_STATUS
   IN OUT EFI_BLOCK_IO_CRYPTO_TOKEN     *Token\r
   );\r
 \r
-typedef struct {\r
-  //\r
-  // GUID of the algorithm.\r
-  //\r
-  EFI_GUID       Algorithm;\r
-  //\r
-  // Specifies KeySizein bits used with this Algorithm.\r
-  //\r
-  UINT64         KeySize;\r
-  //\r
-  // Specifies bitmask of block sizes supported by this algorithm.\r
-  // Bit j being set means that 2^j bytes crypto block size is supported.\r
-  //\r
-  UINT64         CryptoBlockSizeBitMask;\r
-} EFI_BLOCK_IO_CRYPTO_CAPABILITY;\r
-\r
-///\r
-/// EFI_BLOCK_IO_CRYPTO_IV_INPUT structure is used as a common header in CryptoIvInput\r
-/// parameters passed to the ReadExtended and WriteExtended methods for Inline\r
-/// Cryptographic Interface.\r
-/// Its purpose is to pass size of the entire CryptoIvInputparameter memory buffer to\r
-/// the Inline Cryptographic Interface.\r
-///\r
-typedef struct {\r
-  UINT64         InputSize;\r
-} EFI_BLOCK_IO_CRYPTO_IV_INPUT;\r
-\r
-#define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_XTS \\r
-    { \\r
-      0x2f87ba6a, 0x5c04, 0x4385, {0xa7, 0x80, 0xf3, 0xbf, 0x78, 0xa9, 0x7b, 0xec} \\r
-    }\r
-\r
-extern EFI_GUID gEfiBlockIoCryptoAlgoAesXtsGuid;\r
-\r
-typedef struct {\r
-  EFI_BLOCK_IO_CRYPTO_IV_INPUT Header;\r
-  UINT64                       CryptoBlockNumber;\r
-  UINT64                       CryptoBlockByteSize;\r
-} EFI_BLOCK_IO_CRYPTO_IV_INPUT_AES_XTS;\r
-\r
-#define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_CBC_MICROSOFT_BITLOCKER \\r
-    { \\r
-      0x689e4c62, 0x70bf, 0x4cf3, {0x88, 0xbb, 0x33, 0xb3, 0x18, 0x26, 0x86, 0x70} \\r
-    }\r
-\r
-extern EFI_GUID gEfiBlockIoCryptoAlgoAesCbcMsBitlockerGuid;\r
-\r
-typedef struct {\r
-  EFI_BLOCK_IO_CRYPTO_IV_INPUT  Header;\r
-  UINT64                        CryptoBlockByteOffset;\r
-  UINT64                        CryptoBlockByteSize;\r
-} EFI_BLOCK_IO_CRYPTO_IV_INPUT_AES_CBC_MICROSOFT_BITLOCKER;\r
-\r
-#define EFI_BLOCK_IO_CRYPTO_INDEX_ANY 0xFFFFFFFFFFFFFFFF\r
-\r
-typedef struct {\r
-  //\r
-  // Is inline cryptographic capability supported on this device.\r
-  //\r
-  BOOLEAN                         Supported;\r
-  //\r
-  // Maximum number of keys that can be configured at the same time.\r
-  //\r
-  UINT64                          KeyCount;\r
-  //\r
-  // Number of supported capabilities.\r
-  //\r
-  UINT64                          CapabilityCount;\r
-  //\r
-  // Array of supported capabilities.\r
-  //\r
-  EFI_BLOCK_IO_CRYPTO_CAPABILITY  Capabilities[1];\r
-} EFI_BLOCK_IO_CRYPTO_CAPABILITIES;\r
-\r
-typedef struct {\r
-  //\r
-  // Configuration table index. A special Index EFI_BLOCK_IO_CRYPTO_INDEX_ANY can be\r
-  // used to set any available entry in the configuration table.\r
-  //\r
-  UINT64                          Index;\r
-  //\r
-  // Identifies the owner of the configuration table entry. Entry can also be used\r
-  // with the Nil value to clear key from the configuration table index.\r
-  //\r
-  EFI_GUID                        KeyOwnerGuid;\r
-  //\r
-  // A supported capability to be used. The CryptoBlockSizeBitMask field of the\r
-  // structure should have only one bit set from the supported mask.\r
-  //\r
-  EFI_BLOCK_IO_CRYPTO_CAPABILITY  Capability;\r
-  //\r
-  // Pointer to the key. The size of the key is defined by the KeySize field of\r
-  // the capability specified by the Capability parameter.\r
-  //\r
-  VOID                            *CryptoKey;\r
-} EFI_BLOCK_IO_CRYPTO_CONFIGURATION_TABLE_ENTRY;\r
-\r
-typedef struct {\r
-  //\r
-  // Configuration table index.\r
-  //\r
-  UINT64                          Index;\r
-  //\r
-  // Identifies the current owner of the entry.\r
-  //\r
-  EFI_GUID                        KeyOwnerGuid;\r
-  //\r
-  // The capability to be used. The CryptoBlockSizeBitMask field of the structure\r
-  // has only one bit set from the supported mask.\r
-  //\r
-  EFI_BLOCK_IO_CRYPTO_CAPABILITY  Capability;\r
-} EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY;\r
-\r
-\r
 ///\r
 /// The EFI_BLOCK_IO_CRYPTO_PROTOCOL defines a UEFI protocol that can be used by UEFI\r
 /// drivers and applications to perform block encryption on a storage device, such as UFS.\r