summaryrefslogtreecommitdiff
path: root/SecurityPkg/Include
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:12 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commitc411b485b63a671a1e276700cff025c73997233c (patch)
treee7a57ca51b659161ab4bc9da95e988760ec57e7a /SecurityPkg/Include
parent39de741e2dcb8f11e9b4438e37224797643d8451 (diff)
downloadedk2-c411b485b63a671a1e276700cff025c73997233c.zip
edk2-c411b485b63a671a1e276700cff025c73997233c.tar.gz
edk2-c411b485b63a671a1e276700cff025c73997233c.tar.bz2
SecurityPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the SecurityPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'SecurityPkg/Include')
-rw-r--r--SecurityPkg/Include/Guid/AuthenticatedVariableFormat.h26
-rw-r--r--SecurityPkg/Include/Guid/MeasuredFvHob.h6
-rw-r--r--SecurityPkg/Include/Guid/PhysicalPresenceData.h63
-rw-r--r--SecurityPkg/Include/Guid/PwdCredentialProviderHii.h2
-rw-r--r--SecurityPkg/Include/Guid/SecureBootConfigHii.h3
-rw-r--r--SecurityPkg/Include/Guid/SecurityPkgTokenSpace.h2
-rw-r--r--SecurityPkg/Include/Guid/Tcg2ConfigHii.h2
-rw-r--r--SecurityPkg/Include/Guid/Tcg2PhysicalPresenceData.h11
-rw-r--r--SecurityPkg/Include/Guid/TcgConfigHii.h2
-rw-r--r--SecurityPkg/Include/Guid/TcgEventHob.h10
-rw-r--r--SecurityPkg/Include/Guid/TpmInstance.h2
-rw-r--r--SecurityPkg/Include/Guid/TpmNvsMm.h60
-rw-r--r--SecurityPkg/Include/Library/HashLib.h44
-rw-r--r--SecurityPkg/Include/Library/PlatformSecureLib.h1
-rw-r--r--SecurityPkg/Include/Library/RpmcLib.h1
-rw-r--r--SecurityPkg/Include/Library/SecureBootVariableLib.h31
-rw-r--r--SecurityPkg/Include/Library/SecureBootVariableProvisionLib.h11
-rw-r--r--SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h28
-rw-r--r--SecurityPkg/Include/Library/Tcg2PpVendorLib.h24
-rw-r--r--SecurityPkg/Include/Library/TcgEventLogRecordLib.h40
-rw-r--r--SecurityPkg/Include/Library/TcgPhysicalPresenceLib.h2
-rw-r--r--SecurityPkg/Include/Library/TcgPpVendorLib.h54
-rw-r--r--SecurityPkg/Include/Library/TcgStorageCoreLib.h476
-rw-r--r--SecurityPkg/Include/Library/TcgStorageOpalLib.h515
-rw-r--r--SecurityPkg/Include/Library/Tpm12CommandLib.h51
-rw-r--r--SecurityPkg/Include/Library/Tpm12DeviceLib.h8
-rw-r--r--SecurityPkg/Include/Library/Tpm2CommandLib.h322
-rw-r--r--SecurityPkg/Include/Library/Tpm2DeviceLib.h20
-rw-r--r--SecurityPkg/Include/Library/TpmCommLib.h86
-rw-r--r--SecurityPkg/Include/Library/VariableKeyLib.h5
-rw-r--r--SecurityPkg/Include/Ppi/FirmwareVolumeInfoMeasurementExcluded.h11
-rw-r--r--SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h17
-rw-r--r--SecurityPkg/Include/Ppi/FirmwareVolumeInfoStoredHashFv.h37
-rw-r--r--SecurityPkg/Include/Ppi/LockPhysicalPresence.h6
-rw-r--r--SecurityPkg/Include/Ppi/Tcg.h4
-rw-r--r--SecurityPkg/Include/Ppi/TpmInitialized.h4
36 files changed, 973 insertions, 1014 deletions
diff --git a/SecurityPkg/Include/Guid/AuthenticatedVariableFormat.h b/SecurityPkg/Include/Guid/AuthenticatedVariableFormat.h
index 44ceebc..9d58ad5 100644
--- a/SecurityPkg/Include/Guid/AuthenticatedVariableFormat.h
+++ b/SecurityPkg/Include/Guid/AuthenticatedVariableFormat.h
@@ -18,10 +18,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define EFI_SECURE_BOOT_ENABLE_DISABLE \
{ 0xf0a30bc7, 0xaf08, 0x4556, { 0x99, 0xc4, 0x0, 0x10, 0x9, 0xc9, 0x3a, 0x44 } }
-extern EFI_GUID gEfiSecureBootEnableDisableGuid;
-extern EFI_GUID gEfiCertDbGuid;
-extern EFI_GUID gEfiCustomModeEnableGuid;
-extern EFI_GUID gEfiVendorKeysNvGuid;
+extern EFI_GUID gEfiSecureBootEnableDisableGuid;
+extern EFI_GUID gEfiCertDbGuid;
+extern EFI_GUID gEfiCustomModeEnableGuid;
+extern EFI_GUID gEfiVendorKeysNvGuid;
///
/// "SecureBootEnable" variable for the Secure Boot feature enable/disable.
@@ -32,9 +32,9 @@ extern EFI_GUID gEfiVendorKeysNvGuid;
///
/// Format: UINT8
///
-#define EFI_SECURE_BOOT_ENABLE_NAME L"SecureBootEnable"
-#define SECURE_BOOT_ENABLE 1
-#define SECURE_BOOT_DISABLE 0
+#define EFI_SECURE_BOOT_ENABLE_NAME L"SecureBootEnable"
+#define SECURE_BOOT_ENABLE 1
+#define SECURE_BOOT_DISABLE 0
///
/// "CustomMode" variable for two Secure Boot modes feature: "Custom" and "Standard".
@@ -48,9 +48,9 @@ extern EFI_GUID gEfiVendorKeysNvGuid;
///
/// Format: UINT8
///
-#define EFI_CUSTOM_MODE_NAME L"CustomMode"
-#define CUSTOM_SECURE_BOOT_MODE 1
-#define STANDARD_SECURE_BOOT_MODE 0
+#define EFI_CUSTOM_MODE_NAME L"CustomMode"
+#define CUSTOM_SECURE_BOOT_MODE 1
+#define STANDARD_SECURE_BOOT_MODE 0
///
/// "VendorKeysNv" variable to record the out of band secure boot keys modification.
@@ -62,8 +62,8 @@ extern EFI_GUID gEfiVendorKeysNvGuid;
///
/// Format: UINT8
///
-#define EFI_VENDOR_KEYS_NV_VARIABLE_NAME L"VendorKeysNv"
-#define VENDOR_KEYS_VALID 1
-#define VENDOR_KEYS_MODIFIED 0
+#define EFI_VENDOR_KEYS_NV_VARIABLE_NAME L"VendorKeysNv"
+#define VENDOR_KEYS_VALID 1
+#define VENDOR_KEYS_MODIFIED 0
#endif // __AUTHENTICATED_VARIABLE_FORMAT_H__
diff --git a/SecurityPkg/Include/Guid/MeasuredFvHob.h b/SecurityPkg/Include/Guid/MeasuredFvHob.h
index 2c542db..3a3bc44 100644
--- a/SecurityPkg/Include/Guid/MeasuredFvHob.h
+++ b/SecurityPkg/Include/Guid/MeasuredFvHob.h
@@ -20,11 +20,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
0xb2360b42, 0x7173, 0x420a, { 0x86, 0x96, 0x46, 0xca, 0x6b, 0xab, 0x10, 0x60 } \
}
-extern EFI_GUID gMeasuredFvHobGuid;
+extern EFI_GUID gMeasuredFvHobGuid;
typedef struct {
- UINT32 Num;
- EFI_PLATFORM_FIRMWARE_BLOB MeasuredFvBuf[1];
+ UINT32 Num;
+ EFI_PLATFORM_FIRMWARE_BLOB MeasuredFvBuf[1];
} MEASURED_HOB_DATA;
#endif
diff --git a/SecurityPkg/Include/Guid/PhysicalPresenceData.h b/SecurityPkg/Include/Guid/PhysicalPresenceData.h
index 3dcb4dd..93b68eb 100644
--- a/SecurityPkg/Include/Guid/PhysicalPresenceData.h
+++ b/SecurityPkg/Include/Guid/PhysicalPresenceData.h
@@ -20,37 +20,37 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define PHYSICAL_PRESENCE_VARIABLE L"PhysicalPresence"
typedef struct {
- UINT8 PPRequest; ///< Physical Presence request command.
- UINT8 LastPPRequest;
- UINT32 PPResponse;
+ UINT8 PPRequest; ///< Physical Presence request command.
+ UINT8 LastPPRequest;
+ UINT32 PPResponse;
} EFI_PHYSICAL_PRESENCE;
//
// The definition of physical presence operation actions
//
-#define PHYSICAL_PRESENCE_NO_ACTION 0
-#define PHYSICAL_PRESENCE_ENABLE 1
-#define PHYSICAL_PRESENCE_DISABLE 2
-#define PHYSICAL_PRESENCE_ACTIVATE 3
-#define PHYSICAL_PRESENCE_DEACTIVATE 4
-#define PHYSICAL_PRESENCE_CLEAR 5
-#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE 6
-#define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE 7
-#define PHYSICAL_PRESENCE_SET_OWNER_INSTALL_TRUE 8
-#define PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE 9
-#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_OWNER_TRUE 10
-#define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE 11
-#define PHYSICAL_PRESENCE_DEFERRED_PP_UNOWNERED_FIELD_UPGRADE 12
-#define PHYSICAL_PRESENCE_SET_OPERATOR_AUTH 13
-#define PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE 14
-#define PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE 15
-#define PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_TRUE 16
-#define PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE 17
-#define PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_TRUE 18
-#define PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_FALSE 19
-#define PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_TRUE 20
-#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR 21
-#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE 22
+#define PHYSICAL_PRESENCE_NO_ACTION 0
+#define PHYSICAL_PRESENCE_ENABLE 1
+#define PHYSICAL_PRESENCE_DISABLE 2
+#define PHYSICAL_PRESENCE_ACTIVATE 3
+#define PHYSICAL_PRESENCE_DEACTIVATE 4
+#define PHYSICAL_PRESENCE_CLEAR 5
+#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE 6
+#define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE 7
+#define PHYSICAL_PRESENCE_SET_OWNER_INSTALL_TRUE 8
+#define PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE 9
+#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_OWNER_TRUE 10
+#define PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE 11
+#define PHYSICAL_PRESENCE_DEFERRED_PP_UNOWNERED_FIELD_UPGRADE 12
+#define PHYSICAL_PRESENCE_SET_OPERATOR_AUTH 13
+#define PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE 14
+#define PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE 15
+#define PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_TRUE 16
+#define PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE 17
+#define PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_TRUE 18
+#define PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_FALSE 19
+#define PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_TRUE 20
+#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR 21
+#define PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE 22
//
// This variable is used to save TPM Management Flags and corresponding operations.
@@ -58,18 +58,17 @@ typedef struct {
//
#define PHYSICAL_PRESENCE_FLAGS_VARIABLE L"PhysicalPresenceFlags"
typedef struct {
- UINT8 PPFlags;
+ UINT8 PPFlags;
} EFI_PHYSICAL_PRESENCE_FLAGS;
//
// The definition bit of the TPM Management Flags
//
-#define FLAG_NO_PPI_PROVISION BIT0
-#define FLAG_NO_PPI_CLEAR BIT1
-#define FLAG_NO_PPI_MAINTENANCE BIT2
-#define FLAG_RESET_TRACK BIT3
+#define FLAG_NO_PPI_PROVISION BIT0
+#define FLAG_NO_PPI_CLEAR BIT1
+#define FLAG_NO_PPI_MAINTENANCE BIT2
+#define FLAG_RESET_TRACK BIT3
extern EFI_GUID gEfiPhysicalPresenceGuid;
#endif
-
diff --git a/SecurityPkg/Include/Guid/PwdCredentialProviderHii.h b/SecurityPkg/Include/Guid/PwdCredentialProviderHii.h
index 556b88b..ca96f91 100644
--- a/SecurityPkg/Include/Guid/PwdCredentialProviderHii.h
+++ b/SecurityPkg/Include/Guid/PwdCredentialProviderHii.h
@@ -18,6 +18,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
0x78b9ec8b, 0xc000, 0x46c5, { 0xac, 0x93, 0x24, 0xa0, 0xc1, 0xbb, 0x0, 0xce } \
}
-extern EFI_GUID gPwdCredentialProviderGuid;
+extern EFI_GUID gPwdCredentialProviderGuid;
#endif
diff --git a/SecurityPkg/Include/Guid/SecureBootConfigHii.h b/SecurityPkg/Include/Guid/SecureBootConfigHii.h
index d84368f..07311d5 100644
--- a/SecurityPkg/Include/Guid/SecureBootConfigHii.h
+++ b/SecurityPkg/Include/Guid/SecureBootConfigHii.h
@@ -14,7 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
0x5daf50a5, 0xea81, 0x4de2, {0x8f, 0x9b, 0xca, 0xbd, 0xa9, 0xcf, 0x5c, 0x14} \
}
-
-extern EFI_GUID gSecureBootConfigFormSetGuid;
+extern EFI_GUID gSecureBootConfigFormSetGuid;
#endif
diff --git a/SecurityPkg/Include/Guid/SecurityPkgTokenSpace.h b/SecurityPkg/Include/Guid/SecurityPkgTokenSpace.h
index fabfba0..bd9f2c4 100644
--- a/SecurityPkg/Include/Guid/SecurityPkgTokenSpace.h
+++ b/SecurityPkg/Include/Guid/SecurityPkgTokenSpace.h
@@ -14,6 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
0xd3fb176, 0x9569, 0x4d51, { 0xa3, 0xef, 0x7d, 0x61, 0xc6, 0x4f, 0xea, 0xba } \
}
-extern EFI_GUID gEfiSecurityPkgTokenSpaceGuid;
+extern EFI_GUID gEfiSecurityPkgTokenSpaceGuid;
#endif
diff --git a/SecurityPkg/Include/Guid/Tcg2ConfigHii.h b/SecurityPkg/Include/Guid/Tcg2ConfigHii.h
index b472ab1..51e58b3 100644
--- a/SecurityPkg/Include/Guid/Tcg2ConfigHii.h
+++ b/SecurityPkg/Include/Guid/Tcg2ConfigHii.h
@@ -14,6 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
0x6339d487, 0x26ba, 0x424b, { 0x9a, 0x5d, 0x68, 0x7e, 0x25, 0xd7, 0x40, 0xbc } \
}
-extern EFI_GUID gTcg2ConfigFormSetGuid;
+extern EFI_GUID gTcg2ConfigFormSetGuid;
#endif
diff --git a/SecurityPkg/Include/Guid/Tcg2PhysicalPresenceData.h b/SecurityPkg/Include/Guid/Tcg2PhysicalPresenceData.h
index 382b487..23c5cfe 100644
--- a/SecurityPkg/Include/Guid/Tcg2PhysicalPresenceData.h
+++ b/SecurityPkg/Include/Guid/Tcg2PhysicalPresenceData.h
@@ -20,10 +20,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define TCG2_PHYSICAL_PRESENCE_VARIABLE L"Tcg2PhysicalPresence"
typedef struct {
- UINT8 PPRequest; ///< Physical Presence request command.
- UINT32 PPRequestParameter; ///< Physical Presence request Parameter.
- UINT8 LastPPRequest;
- UINT32 PPResponse;
+ UINT8 PPRequest; ///< Physical Presence request command.
+ UINT32 PPRequestParameter; ///< Physical Presence request Parameter.
+ UINT8 LastPPRequest;
+ UINT32 PPResponse;
} EFI_TCG2_PHYSICAL_PRESENCE;
//
@@ -32,10 +32,9 @@ typedef struct {
//
#define TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE L"Tcg2PhysicalPresenceFlags"
typedef struct {
- UINT32 PPFlags;
+ UINT32 PPFlags;
} EFI_TCG2_PHYSICAL_PRESENCE_FLAGS;
extern EFI_GUID gEfiTcg2PhysicalPresenceGuid;
#endif
-
diff --git a/SecurityPkg/Include/Guid/TcgConfigHii.h b/SecurityPkg/Include/Guid/TcgConfigHii.h
index 4eecb57..ee87abf 100644
--- a/SecurityPkg/Include/Guid/TcgConfigHii.h
+++ b/SecurityPkg/Include/Guid/TcgConfigHii.h
@@ -14,6 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
0xb0f901e4, 0xc424, 0x45de, {0x90, 0x81, 0x95, 0xe2, 0xb, 0xde, 0x6f, 0xb5 } \
}
-extern EFI_GUID gTcgConfigFormSetGuid;
+extern EFI_GUID gTcgConfigFormSetGuid;
#endif
diff --git a/SecurityPkg/Include/Guid/TcgEventHob.h b/SecurityPkg/Include/Guid/TcgEventHob.h
index 97e40b4..7a7b606 100644
--- a/SecurityPkg/Include/Guid/TcgEventHob.h
+++ b/SecurityPkg/Include/Guid/TcgEventHob.h
@@ -19,14 +19,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
0x2b9ffb52, 0x1b13, 0x416f, { 0xa8, 0x7b, 0xbc, 0x93, 0xd, 0xef, 0x92, 0xa8 } \
}
-extern EFI_GUID gTcgEventEntryHobGuid;
+extern EFI_GUID gTcgEventEntryHobGuid;
#define EFI_TCG_EVENT2_HOB_GUID \
{ \
0xd26c221e, 0x2430, 0x4c8a, { 0x91, 0x70, 0x3f, 0xcb, 0x45, 0x0, 0x41, 0x3f } \
}
-extern EFI_GUID gTcgEvent2EntryHobGuid;
+extern EFI_GUID gTcgEvent2EntryHobGuid;
///
/// The Global ID of a GUIDed HOB used to record TPM device error.
@@ -36,7 +36,7 @@ extern EFI_GUID gTcgEvent2EntryHobGuid;
0xef598499, 0xb25e, 0x473a, { 0xbf, 0xaf, 0xe7, 0xe5, 0x7d, 0xce, 0x82, 0xc4 } \
}
-extern EFI_GUID gTpmErrorHobGuid;
+extern EFI_GUID gTpmErrorHobGuid;
///
/// The Global ID of a GUIDed HOB used to record TPM2 Startup Locality.
@@ -47,7 +47,7 @@ extern EFI_GUID gTpmErrorHobGuid;
0xef598499, 0xb25e, 0x473a, { 0xbf, 0xaf, 0xe7, 0xe5, 0x7d, 0xce, 0x82, 0xc4 } \
}
-extern EFI_GUID gTpm2StartupLocalityHobGuid;
+extern EFI_GUID gTpm2StartupLocalityHobGuid;
///
/// The Global ID of a GUIDed HOB used to record TCG 800-155 PlatformId Event.
@@ -58,6 +58,6 @@ extern EFI_GUID gTpm2StartupLocalityHobGuid;
0xe2c3bc69, 0x615c, 0x4b5b, { 0x8e, 0x5c, 0xa0, 0x33, 0xa9, 0xc2, 0x5e, 0xd6 } \
}
-extern EFI_GUID gTcg800155PlatformIdEventHobGuid;
+extern EFI_GUID gTcg800155PlatformIdEventHobGuid;
#endif
diff --git a/SecurityPkg/Include/Guid/TpmInstance.h b/SecurityPkg/Include/Guid/TpmInstance.h
index d5c9751..c9bcc67 100644
--- a/SecurityPkg/Include/Guid/TpmInstance.h
+++ b/SecurityPkg/Include/Guid/TpmInstance.h
@@ -22,11 +22,9 @@ extern EFI_GUID gEfiTpmDeviceInstanceNoneGuid;
extern EFI_GUID gEfiTpmDeviceInstanceTpm12Guid;
extern EFI_GUID gEfiTpmDeviceInstanceTpm20DtpmGuid;
-
#define TPM_DEVICE_SELECTED_GUID \
{ 0x7f4158d3, 0x74d, 0x456d, { 0x8c, 0xb2, 0x1, 0xf9, 0xc8, 0xf7, 0x9d, 0xaa } }
extern EFI_GUID gEfiTpmDeviceSelectedGuid;
#endif
-
diff --git a/SecurityPkg/Include/Guid/TpmNvsMm.h b/SecurityPkg/Include/Guid/TpmNvsMm.h
index 64c0f5c..1dfb568 100644
--- a/SecurityPkg/Include/Guid/TpmNvsMm.h
+++ b/SecurityPkg/Include/Guid/TpmNvsMm.h
@@ -14,50 +14,50 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define MM_TPM_NVS_HOB_GUID \
{ 0xc96c76eb, 0xbc78, 0x429c, { 0x9f, 0x4b, 0xda, 0x51, 0x78, 0xc2, 0x84, 0x57 }}
-extern EFI_GUID gTpmNvsMmGuid;
+extern EFI_GUID gTpmNvsMmGuid;
#pragma pack(1)
typedef struct {
- UINT8 SoftwareSmi;
- UINT32 Parameter;
- UINT32 Response;
- UINT32 Request;
- UINT32 RequestParameter;
- UINT32 LastRequest;
- UINT32 ReturnCode;
+ UINT8 SoftwareSmi;
+ UINT32 Parameter;
+ UINT32 Response;
+ UINT32 Request;
+ UINT32 RequestParameter;
+ UINT32 LastRequest;
+ UINT32 ReturnCode;
} PHYSICAL_PRESENCE_NVS;
typedef struct {
- UINT8 SoftwareSmi;
- UINT32 Parameter;
- UINT32 Request;
- UINT32 ReturnCode;
+ UINT8 SoftwareSmi;
+ UINT32 Parameter;
+ UINT32 Request;
+ UINT32 ReturnCode;
} MEMORY_CLEAR_NVS;
typedef struct {
- PHYSICAL_PRESENCE_NVS PhysicalPresence;
- MEMORY_CLEAR_NVS MemoryClear;
- UINT32 PPRequestUserConfirm;
- UINT32 TpmIrqNum;
- BOOLEAN IsShortFormPkgLength;
+ PHYSICAL_PRESENCE_NVS PhysicalPresence;
+ MEMORY_CLEAR_NVS MemoryClear;
+ UINT32 PPRequestUserConfirm;
+ UINT32 TpmIrqNum;
+ BOOLEAN IsShortFormPkgLength;
} TCG_NVS;
typedef struct {
- UINT8 OpRegionOp;
- UINT32 NameString;
- UINT8 RegionSpace;
- UINT8 DWordPrefix;
- UINT32 RegionOffset;
- UINT8 BytePrefix;
- UINT8 RegionLen;
+ UINT8 OpRegionOp;
+ UINT32 NameString;
+ UINT8 RegionSpace;
+ UINT8 DWordPrefix;
+ UINT32 RegionOffset;
+ UINT8 BytePrefix;
+ UINT8 RegionLen;
} AML_OP_REGION_32_8;
typedef struct {
- UINT64 Function;
- UINT64 ReturnStatus;
- EFI_PHYSICAL_ADDRESS TargetAddress;
- UINT64 RegisteredPpSwiValue;
- UINT64 RegisteredMcSwiValue;
+ UINT64 Function;
+ UINT64 ReturnStatus;
+ EFI_PHYSICAL_ADDRESS TargetAddress;
+ UINT64 RegisteredPpSwiValue;
+ UINT64 RegisteredMcSwiValue;
} TPM_NVS_MM_COMM_BUFFER;
#pragma pack()
@@ -65,4 +65,4 @@ typedef enum {
TpmNvsMmExchangeInfo,
} TPM_NVS_MM_FUNCTION;
-#endif // TCG2_NVS_MM_H_
+#endif // TCG2_NVS_MM_H_
diff --git a/SecurityPkg/Include/Library/HashLib.h b/SecurityPkg/Include/Library/HashLib.h
index 6ad960a..d5ee870 100644
--- a/SecurityPkg/Include/Library/HashLib.h
+++ b/SecurityPkg/Include/Library/HashLib.h
@@ -14,7 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Uefi.h>
#include <Protocol/Hash.h>
#include <IndustryStandard/Tpm20.h>
-typedef UINTN HASH_HANDLE;
+typedef UINTN HASH_HANDLE;
/**
Start hash sequence.
@@ -27,7 +27,7 @@ typedef UINTN HASH_HANDLE;
EFI_STATUS
EFIAPI
HashStart (
- OUT HASH_HANDLE *HashHandle
+ OUT HASH_HANDLE *HashHandle
);
/**
@@ -42,9 +42,9 @@ HashStart (
EFI_STATUS
EFIAPI
HashUpdate (
- IN HASH_HANDLE HashHandle,
- IN VOID *DataToHash,
- IN UINTN DataToHashLen
+ IN HASH_HANDLE HashHandle,
+ IN VOID *DataToHash,
+ IN UINTN DataToHashLen
);
/**
@@ -61,11 +61,11 @@ HashUpdate (
EFI_STATUS
EFIAPI
HashCompleteAndExtend (
- IN HASH_HANDLE HashHandle,
- IN TPMI_DH_PCR PcrIndex,
- IN VOID *DataToHash,
- IN UINTN DataToHashLen,
- OUT TPML_DIGEST_VALUES *DigestList
+ IN HASH_HANDLE HashHandle,
+ IN TPMI_DH_PCR PcrIndex,
+ IN VOID *DataToHash,
+ IN UINTN DataToHashLen,
+ OUT TPML_DIGEST_VALUES *DigestList
);
/**
@@ -81,10 +81,10 @@ HashCompleteAndExtend (
EFI_STATUS
EFIAPI
HashAndExtend (
- IN TPMI_DH_PCR PcrIndex,
- IN VOID *DataToHash,
- IN UINTN DataToHashLen,
- OUT TPML_DIGEST_VALUES *DigestList
+ IN TPMI_DH_PCR PcrIndex,
+ IN VOID *DataToHash,
+ IN UINTN DataToHashLen,
+ OUT TPML_DIGEST_VALUES *DigestList
);
/**
@@ -97,7 +97,7 @@ HashAndExtend (
**/
typedef
EFI_STATUS
-(EFIAPI *HASH_INIT) (
+(EFIAPI *HASH_INIT)(
OUT HASH_HANDLE *HashHandle
);
@@ -112,7 +112,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI *HASH_UPDATE) (
+(EFIAPI *HASH_UPDATE)(
IN HASH_HANDLE HashHandle,
IN VOID *DataToHash,
IN UINTN DataToHashLen
@@ -128,7 +128,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI *HASH_FINAL) (
+(EFIAPI *HASH_FINAL)(
IN HASH_HANDLE HashHandle,
OUT TPML_DIGEST_VALUES *DigestList
);
@@ -143,10 +143,10 @@ EFI_STATUS
}
typedef struct {
- EFI_GUID HashGuid;
- HASH_INIT HashInit;
- HASH_UPDATE HashUpdate;
- HASH_FINAL HashFinal;
+ EFI_GUID HashGuid;
+ HASH_INIT HashInit;
+ HASH_UPDATE HashUpdate;
+ HASH_FINAL HashFinal;
} HASH_INTERFACE;
/**
@@ -161,7 +161,7 @@ typedef struct {
EFI_STATUS
EFIAPI
RegisterHashInterfaceLib (
- IN HASH_INTERFACE *HashInterface
+ IN HASH_INTERFACE *HashInterface
);
#endif
diff --git a/SecurityPkg/Include/Library/PlatformSecureLib.h b/SecurityPkg/Include/Library/PlatformSecureLib.h
index c166b7a..420751a 100644
--- a/SecurityPkg/Include/Library/PlatformSecureLib.h
+++ b/SecurityPkg/Include/Library/PlatformSecureLib.h
@@ -9,7 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __PLATFORM_SECURE_LIB_H__
#define __PLATFORM_SECURE_LIB_H__
-
/**
This function provides a platform-specific method to detect whether the platform
diff --git a/SecurityPkg/Include/Library/RpmcLib.h b/SecurityPkg/Include/Library/RpmcLib.h
index 5882bfa..df4ba34 100644
--- a/SecurityPkg/Include/Library/RpmcLib.h
+++ b/SecurityPkg/Include/Library/RpmcLib.h
@@ -40,4 +40,3 @@ IncrementMonotonicCounter (
);
#endif
-
diff --git a/SecurityPkg/Include/Library/SecureBootVariableLib.h b/SecurityPkg/Include/Library/SecureBootVariableLib.h
index 6e6d624..7b7afd9 100644
--- a/SecurityPkg/Include/Library/SecureBootVariableLib.h
+++ b/SecurityPkg/Include/Library/SecureBootVariableLib.h
@@ -26,7 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
SetSecureBootMode (
IN UINT8 SecureBootMode
-);
+ );
/**
Fetches the value of SetupMode variable.
@@ -38,8 +38,8 @@ SetSecureBootMode (
EFI_STATUS
EFIAPI
GetSetupMode (
- OUT UINT8 *SetupMode
-);
+ OUT UINT8 *SetupMode
+ );
/**
Create a EFI Signature List with data fetched from section specified as a argument.
@@ -57,10 +57,10 @@ GetSetupMode (
--*/
EFI_STATUS
SecureBootFetchData (
- IN EFI_GUID *KeyFileGuid,
- OUT UINTN *SigListsSize,
- OUT EFI_SIGNATURE_LIST **SigListOut
-);
+ IN EFI_GUID *KeyFileGuid,
+ OUT UINTN *SigListsSize,
+ OUT EFI_SIGNATURE_LIST **SigListOut
+ );
/**
Create a time based data payload by concatenating the EFI_VARIABLE_AUTHENTICATION_2
@@ -82,9 +82,9 @@ SecureBootFetchData (
--*/
EFI_STATUS
CreateTimeBasedPayload (
- IN OUT UINTN *DataSize,
- IN OUT UINT8 **Data
-);
+ IN OUT UINTN *DataSize,
+ IN OUT UINT8 **Data
+ );
/**
Clears the content of the 'db' variable.
@@ -97,7 +97,7 @@ EFI_STATUS
EFIAPI
DeleteDb (
VOID
-);
+ );
/**
Clears the content of the 'dbx' variable.
@@ -110,7 +110,7 @@ EFI_STATUS
EFIAPI
DeleteDbx (
VOID
-);
+ );
/**
Clears the content of the 'dbt' variable.
@@ -123,7 +123,7 @@ EFI_STATUS
EFIAPI
DeleteDbt (
VOID
-);
+ );
/**
Clears the content of the 'KEK' variable.
@@ -136,7 +136,7 @@ EFI_STATUS
EFIAPI
DeleteKEK (
VOID
-);
+ );
/**
Clears the content of the 'PK' variable.
@@ -149,5 +149,6 @@ EFI_STATUS
EFIAPI
DeletePlatformKey (
VOID
-);
+ );
+
#endif
diff --git a/SecurityPkg/Include/Library/SecureBootVariableProvisionLib.h b/SecurityPkg/Include/Library/SecureBootVariableProvisionLib.h
index ba8009b..3dc1c37 100644
--- a/SecurityPkg/Include/Library/SecureBootVariableProvisionLib.h
+++ b/SecurityPkg/Include/Library/SecureBootVariableProvisionLib.h
@@ -23,7 +23,7 @@ EFI_STATUS
EFIAPI
EnrollDbFromDefault (
VOID
-);
+ );
/**
Sets the content of the 'dbx' variable based on 'dbxDefault' variable content.
@@ -36,7 +36,7 @@ EFI_STATUS
EFIAPI
EnrollDbxFromDefault (
VOID
-);
+ );
/**
Sets the content of the 'dbt' variable based on 'dbtDefault' variable content.
@@ -49,7 +49,7 @@ EFI_STATUS
EFIAPI
EnrollDbtFromDefault (
VOID
-);
+ );
/**
Sets the content of the 'KEK' variable based on 'KEKDefault' variable content.
@@ -62,7 +62,7 @@ EFI_STATUS
EFIAPI
EnrollKEKFromDefault (
VOID
-);
+ );
/**
Sets the content of the 'PK' variable based on 'PKDefault' variable content.
@@ -75,7 +75,7 @@ EFI_STATUS
EFIAPI
EnrollPKFromDefault (
VOID
-);
+ );
/**
Initializes PKDefault variable with data from FFS section.
@@ -131,4 +131,5 @@ EFI_STATUS
SecureBootInitDbxDefault (
IN VOID
);
+
#endif
diff --git a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
index e5ff3b1..daa0a8d 100644
--- a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
+++ b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
@@ -18,13 +18,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
// UEFI TCG2 library definition bit of the BIOS TPM Management Flags
//
// BIT0 is reserved
-#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_CLEAR BIT1
+#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_CLEAR BIT1
// BIT2 is reserved
-#define TCG2_LIB_PP_FLAG_RESET_TRACK BIT3
-#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_TURN_ON BIT4
-#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_TURN_OFF BIT5
-#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_CHANGE_EPS BIT6
-#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_CHANGE_PCRS BIT7
+#define TCG2_LIB_PP_FLAG_RESET_TRACK BIT3
+#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_TURN_ON BIT4
+#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_TURN_OFF BIT5
+#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_CHANGE_EPS BIT6
+#define TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_CHANGE_PCRS BIT7
//
// UEFI TCG2 library definition bit of the BIOS Information Flags
@@ -55,7 +55,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
VOID
EFIAPI
Tcg2PhysicalPresenceLibProcessRequest (
- IN TPM2B_AUTH *PlatformAuth OPTIONAL
+ IN TPM2B_AUTH *PlatformAuth OPTIONAL
);
/**
@@ -99,8 +99,8 @@ Tcg2PhysicalPresenceLibGetManagementFlags (
UINT32
EFIAPI
Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
- OUT UINT32 *MostRecentRequest,
- OUT UINT32 *Response
+ OUT UINT32 *MostRecentRequest,
+ OUT UINT32 *Response
);
/**
@@ -120,8 +120,8 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
**/
UINT32
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
- IN OUT UINT32 *OperationRequest,
- IN OUT UINT32 *RequestParameter
+ IN OUT UINT32 *OperationRequest,
+ IN OUT UINT32 *RequestParameter
);
/**
@@ -142,8 +142,8 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
UINT32
EFIAPI
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
- IN UINT32 OperationRequest,
- IN UINT32 RequestParameter
+ IN UINT32 OperationRequest,
+ IN UINT32 RequestParameter
);
/**
@@ -161,7 +161,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
UINT32
EFIAPI
Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (
- IN UINT32 OperationRequest
+ IN UINT32 OperationRequest
);
#endif
diff --git a/SecurityPkg/Include/Library/Tcg2PpVendorLib.h b/SecurityPkg/Include/Library/Tcg2PpVendorLib.h
index 914517f..e5e781a 100644
--- a/SecurityPkg/Include/Library/Tcg2PpVendorLib.h
+++ b/SecurityPkg/Include/Library/Tcg2PpVendorLib.h
@@ -40,10 +40,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
UINT32
EFIAPI
Tcg2PpVendorLibExecutePendingRequest (
- IN TPM2B_AUTH *PlatformAuth OPTIONAL,
- IN UINT32 OperationRequest,
- IN OUT UINT32 *ManagementFlags,
- OUT BOOLEAN *ResetRequired
+ IN TPM2B_AUTH *PlatformAuth OPTIONAL,
+ IN UINT32 OperationRequest,
+ IN OUT UINT32 *ManagementFlags,
+ OUT BOOLEAN *ResetRequired
);
/**
@@ -67,9 +67,9 @@ Tcg2PpVendorLibExecutePendingRequest (
BOOLEAN
EFIAPI
Tcg2PpVendorLibHasValidRequest (
- IN UINT32 OperationRequest,
- IN UINT32 ManagementFlags,
- OUT BOOLEAN *RequestConfirmed
+ IN UINT32 OperationRequest,
+ IN UINT32 ManagementFlags,
+ OUT BOOLEAN *RequestConfirmed
);
/**
@@ -93,9 +93,9 @@ Tcg2PpVendorLibHasValidRequest (
UINT32
EFIAPI
Tcg2PpVendorLibSubmitRequestToPreOSFunction (
- IN UINT32 OperationRequest,
- IN UINT32 ManagementFlags,
- IN UINT32 RequestParameter
+ IN UINT32 OperationRequest,
+ IN UINT32 ManagementFlags,
+ IN UINT32 RequestParameter
);
/**
@@ -116,8 +116,8 @@ Tcg2PpVendorLibSubmitRequestToPreOSFunction (
UINT32
EFIAPI
Tcg2PpVendorLibGetUserConfirmationStatusFunction (
- IN UINT32 OperationRequest,
- IN UINT32 ManagementFlags
+ IN UINT32 OperationRequest,
+ IN UINT32 ManagementFlags
);
#endif
diff --git a/SecurityPkg/Include/Library/TcgEventLogRecordLib.h b/SecurityPkg/Include/Library/TcgEventLogRecordLib.h
index 99d634c..c6b5520 100644
--- a/SecurityPkg/Include/Library/TcgEventLogRecordLib.h
+++ b/SecurityPkg/Include/Library/TcgEventLogRecordLib.h
@@ -13,20 +13,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#pragma pack (1)
-#define PLATFORM_FIRMWARE_BLOB_DESC "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)"
+#define PLATFORM_FIRMWARE_BLOB_DESC "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)"
typedef struct {
- UINT8 BlobDescriptionSize;
- UINT8 BlobDescription[sizeof(PLATFORM_FIRMWARE_BLOB_DESC)];
- EFI_PHYSICAL_ADDRESS BlobBase;
- UINT64 BlobLength;
+ UINT8 BlobDescriptionSize;
+ UINT8 BlobDescription[sizeof (PLATFORM_FIRMWARE_BLOB_DESC)];
+ EFI_PHYSICAL_ADDRESS BlobBase;
+ UINT64 BlobLength;
} PLATFORM_FIRMWARE_BLOB2_STRUCT;
#define HANDOFF_TABLE_POINTER_DESC "1234567890ABCDEF"
typedef struct {
- UINT8 TableDescriptionSize;
- UINT8 TableDescription[sizeof(HANDOFF_TABLE_POINTER_DESC)];
- UINT64 NumberOfTables;
- EFI_CONFIGURATION_TABLE TableEntry[1];
+ UINT8 TableDescriptionSize;
+ UINT8 TableDescription[sizeof (HANDOFF_TABLE_POINTER_DESC)];
+ UINT64 NumberOfTables;
+ EFI_CONFIGURATION_TABLE TableEntry[1];
} HANDOFF_TABLE_POINTERS2_STRUCT;
#pragma pack ()
@@ -44,8 +44,8 @@ typedef struct {
**/
VOID *
TpmMeasurementGetFvName (
- IN EFI_PHYSICAL_ADDRESS FvBase,
- IN UINT64 FvLength
+ IN EFI_PHYSICAL_ADDRESS FvBase,
+ IN UINT64 FvLength
);
/**
@@ -64,10 +64,10 @@ TpmMeasurementGetFvName (
EFI_STATUS
EFIAPI
MeasureFirmwareBlob (
- IN UINT32 PcrIndex,
- IN CHAR8 *Description OPTIONAL,
- IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase,
- IN UINT64 FirmwareBlobLength
+ IN UINT32 PcrIndex,
+ IN CHAR8 *Description OPTIONAL,
+ IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase,
+ IN UINT64 FirmwareBlobLength
);
/**
@@ -87,11 +87,11 @@ MeasureFirmwareBlob (
EFI_STATUS
EFIAPI
MeasureHandoffTable (
- IN UINT32 PcrIndex,
- IN CHAR8 *Description OPTIONAL,
- IN EFI_GUID *TableGuid,
- IN VOID *TableAddress,
- IN UINTN TableLength
+ IN UINT32 PcrIndex,
+ IN CHAR8 *Description OPTIONAL,
+ IN EFI_GUID *TableGuid,
+ IN VOID *TableAddress,
+ IN UINTN TableLength
);
#endif
diff --git a/SecurityPkg/Include/Library/TcgPhysicalPresenceLib.h b/SecurityPkg/Include/Library/TcgPhysicalPresenceLib.h
index 9826a79..db9645b 100644
--- a/SecurityPkg/Include/Library/TcgPhysicalPresenceLib.h
+++ b/SecurityPkg/Include/Library/TcgPhysicalPresenceLib.h
@@ -41,7 +41,7 @@ TcgPhysicalPresenceLibProcessRequest (
**/
BOOLEAN
EFIAPI
-TcgPhysicalPresenceLibNeedUserConfirm(
+TcgPhysicalPresenceLibNeedUserConfirm (
VOID
);
diff --git a/SecurityPkg/Include/Library/TcgPpVendorLib.h b/SecurityPkg/Include/Library/TcgPpVendorLib.h
index b6c573e..2e2a150 100644
--- a/SecurityPkg/Include/Library/TcgPpVendorLib.h
+++ b/SecurityPkg/Include/Library/TcgPpVendorLib.h
@@ -18,40 +18,40 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
// The definition of physical presence operation actions
//
-#define TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION 128
+#define TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION 128
//
// The definition bit of the BIOS TPM Management Flags
//
-#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_PROVISION BIT0
-#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_CLEAR BIT1
-#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_MAINTENANCE BIT2
-#define TCG_VENDOR_LIB_FLAG_RESET_TRACK BIT3
+#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_PROVISION BIT0
+#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_CLEAR BIT1
+#define TCG_BIOS_TPM_MANAGEMENT_FLAG_NO_PPI_MAINTENANCE BIT2
+#define TCG_VENDOR_LIB_FLAG_RESET_TRACK BIT3
//
// The definition for TPM Operation Response to OS Environment
//
-#define TCG_PP_OPERATION_RESPONSE_SUCCESS 0x0
-#define TCG_PP_OPERATION_RESPONSE_USER_ABORT 0xFFFFFFF0
-#define TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE 0xFFFFFFF1
+#define TCG_PP_OPERATION_RESPONSE_SUCCESS 0x0
+#define TCG_PP_OPERATION_RESPONSE_USER_ABORT 0xFFFFFFF0
+#define TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE 0xFFFFFFF1
//
// The return code for Submit TPM Request to Pre-OS Environment
// and Submit TPM Request to Pre-OS Environment 2
//
-#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS 0
-#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED 1
-#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE 2
-#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_BLOCKED_BY_BIOS_SETTINGS 3
+#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS 0
+#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED 1
+#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE 2
+#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_BLOCKED_BY_BIOS_SETTINGS 3
//
// The return code for Get User Confirmation Status for Operation
//
-#define TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED 0
-#define TCG_PP_GET_USER_CONFIRMATION_BIOS_ONLY 1
-#define TCG_PP_GET_USER_CONFIRMATION_BLOCKED_BY_BIOS_CONFIGURATION 2
-#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED 3
-#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED 4
+#define TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED 0
+#define TCG_PP_GET_USER_CONFIRMATION_BIOS_ONLY 1
+#define TCG_PP_GET_USER_CONFIRMATION_BLOCKED_BY_BIOS_CONFIGURATION 2
+#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED 3
+#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED 4
/**
Check and execute the requested physical presence command.
@@ -73,9 +73,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
UINT32
EFIAPI
TcgPpVendorLibExecutePendingRequest (
- IN UINT32 OperationRequest,
- IN OUT UINT32 *ManagementFlags,
- OUT BOOLEAN *ResetRequired
+ IN UINT32 OperationRequest,
+ IN OUT UINT32 *ManagementFlags,
+ OUT BOOLEAN *ResetRequired
);
/**
@@ -99,9 +99,9 @@ TcgPpVendorLibExecutePendingRequest (
BOOLEAN
EFIAPI
TcgPpVendorLibHasValidRequest (
- IN UINT32 OperationRequest,
- IN UINT32 ManagementFlags,
- OUT BOOLEAN *RequestConfirmed
+ IN UINT32 OperationRequest,
+ IN UINT32 ManagementFlags,
+ OUT BOOLEAN *RequestConfirmed
);
/**
@@ -124,8 +124,8 @@ TcgPpVendorLibHasValidRequest (
UINT32
EFIAPI
TcgPpVendorLibSubmitRequestToPreOSFunction (
- IN UINT32 OperationRequest,
- IN UINT32 ManagementFlags
+ IN UINT32 OperationRequest,
+ IN UINT32 ManagementFlags
);
/**
@@ -146,8 +146,8 @@ TcgPpVendorLibSubmitRequestToPreOSFunction (
UINT32
EFIAPI
TcgPpVendorLibGetUserConfirmationStatusFunction (
- IN UINT32 OperationRequest,
- IN UINT32 ManagementFlags
+ IN UINT32 OperationRequest,
+ IN UINT32 ManagementFlags
);
#endif
diff --git a/SecurityPkg/Include/Library/TcgStorageCoreLib.h b/SecurityPkg/Include/Library/TcgStorageCoreLib.h
index a426251..ff610d1 100644
--- a/SecurityPkg/Include/Library/TcgStorageCoreLib.h
+++ b/SecurityPkg/Include/Library/TcgStorageCoreLib.h
@@ -115,7 +115,7 @@ typedef struct {
UINT32 BufferSize;
//
- //Pointer to the start of the Tcg ComPacket. It should point to a location within Buffer.
+ // Pointer to the start of the Tcg ComPacket. It should point to a location within Buffer.
//
TCG_COM_PACKET *ComPacket;
@@ -136,7 +136,7 @@ typedef struct {
// Then the client can allocate the required Buffer Size and re-run the tcg calls.
// THIS MAY NOT BE IMPLEMENTED... REQUIRES MORE THOUGHT BECAUSE YOU CANNOT SOLVE ISSUE FOR RECEIVE
//
- BOOLEAN DryRun;
+ BOOLEAN DryRun;
} TCG_CREATE_STRUCT;
//
@@ -155,34 +155,33 @@ typedef struct {
// Buffer allocated and freed by the client of the Tcg library.
// This is the Buffer that contains the Tcg response to decode/parse.
//
- const VOID* Buffer;
+ const VOID *Buffer;
//
- //Size of the Buffer provided.
+ // Size of the Buffer provided.
//
- UINT32 BufferSize;
+ UINT32 BufferSize;
//
// Pointer to the start of the Tcg ComPacket. It should point to a location within Buffer.
//
- TCG_COM_PACKET *ComPacket;
+ TCG_COM_PACKET *ComPacket;
//
// Current Tcg Packet that is being created. It should point to a location within Buffer.
//
- TCG_PACKET *CurPacket;
+ TCG_PACKET *CurPacket;
//
// Current Tcg SubPacket that is being created. It should point to a location within Buffer.
//
- TCG_SUB_PACKET *CurSubPacket;
+ TCG_SUB_PACKET *CurSubPacket;
//
// Current pointer within the current subpacket payload.
//
- UINT8 *CurPtr;
-} TCG_PARSE_STRUCT ;
-
+ UINT8 *CurPtr;
+} TCG_PARSE_STRUCT;
//
// Structure that is used to represent a Tcg Token that is retrieved by Tcg parse functions.
@@ -197,7 +196,7 @@ typedef struct {
// Pointer to the beginning of the Header of the Tcg token
//
UINT8 *HdrStart;
-} TCG_TOKEN ;
+} TCG_TOKEN;
/**
@@ -211,13 +210,12 @@ typedef struct {
**/
TCG_RESULT
EFIAPI
-TcgInitTcgCreateStruct(
- TCG_CREATE_STRUCT *CreateStruct,
- VOID *Buffer,
- UINT32 BufferSize
+TcgInitTcgCreateStruct (
+ TCG_CREATE_STRUCT *CreateStruct,
+ VOID *Buffer,
+ UINT32 BufferSize
);
-
/**
Encodes the ComPacket header to the data structure.
@@ -229,13 +227,12 @@ TcgInitTcgCreateStruct(
**/
TCG_RESULT
EFIAPI
-TcgStartComPacket(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT16 ComId,
- UINT16 ComIdExtension
+TcgStartComPacket (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT16 ComId,
+ UINT16 ComIdExtension
);
-
/**
Starts a new ComPacket in the Data structure.
@@ -250,13 +247,13 @@ TcgStartComPacket(
**/
TCG_RESULT
EFIAPI
-TcgStartPacket(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 Tsn,
- UINT32 Hsn,
- UINT32 SeqNumber,
- UINT16 AckType,
- UINT32 Ack
+TcgStartPacket (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 Tsn,
+ UINT32 Hsn,
+ UINT32 SeqNumber,
+ UINT16 AckType,
+ UINT32 Ack
);
/**
@@ -269,12 +266,11 @@ TcgStartPacket(
**/
TCG_RESULT
EFIAPI
-TcgStartSubPacket(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT16 Kind
+TcgStartSubPacket (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT16 Kind
);
-
/**
Ends the current SubPacket in the Data structure. This function will also perform the 4-byte padding
@@ -285,11 +281,10 @@ TcgStartSubPacket(
**/
TCG_RESULT
EFIAPI
-TcgEndSubPacket(
- TCG_CREATE_STRUCT *CreateStruct
+TcgEndSubPacket (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Ends the current Packet in the Data structure.
@@ -299,11 +294,10 @@ TcgEndSubPacket(
**/
TCG_RESULT
EFIAPI
-TcgEndPacket(
- TCG_CREATE_STRUCT *CreateStruct
+TcgEndPacket (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Ends the ComPacket in the Data structure and ret
@@ -314,9 +308,9 @@ TcgEndPacket(
**/
TCG_RESULT
EFIAPI
-TcgEndComPacket(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 *Size
+TcgEndComPacket (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 *Size
);
/**
@@ -328,12 +322,11 @@ TcgEndComPacket(
**/
TCG_RESULT
EFIAPI
-TcgAddRawByte(
+TcgAddRawByte (
TCG_CREATE_STRUCT *CreateStruct,
UINT8 Byte
);
-
/**
Adds the Data parameter as a byte sequence to the Data structure.
@@ -347,14 +340,13 @@ TcgAddRawByte(
**/
TCG_RESULT
EFIAPI
-TcgAddByteSequence(
- TCG_CREATE_STRUCT *CreateStruct,
- const VOID *Data,
- UINT32 DataSize,
- BOOLEAN Continued
+TcgAddByteSequence (
+ TCG_CREATE_STRUCT *CreateStruct,
+ const VOID *Data,
+ UINT32 DataSize,
+ BOOLEAN Continued
);
-
/**
Adds an arbitrary-Length integer to the Data structure.
@@ -369,14 +361,13 @@ TcgAddByteSequence(
**/
TCG_RESULT
EFIAPI
-TcgAddInteger(
+TcgAddInteger (
TCG_CREATE_STRUCT *CreateStruct,
const VOID *Data,
UINT32 DataSize,
BOOLEAN SignedInteger
);
-
/**
Adds an 8-bit unsigned integer to the Data structure.
@@ -386,9 +377,9 @@ TcgAddInteger(
**/
TCG_RESULT
EFIAPI
-TcgAddUINT8(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT8 Value
+TcgAddUINT8 (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT8 Value
);
/**
@@ -402,8 +393,8 @@ TcgAddUINT8(
TCG_RESULT
EFIAPI
TcgAddUINT16 (
- TCG_CREATE_STRUCT *CreateStruct,
- UINT16 Value
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT16 Value
);
/**
@@ -416,12 +407,11 @@ TcgAddUINT16 (
**/
TCG_RESULT
EFIAPI
-TcgAddUINT32(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 Value
+TcgAddUINT32 (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 Value
);
-
/**
Adds a 64-bit unsigned integer to the Data structure.
@@ -432,9 +422,9 @@ TcgAddUINT32(
**/
TCG_RESULT
EFIAPI
-TcgAddUINT64(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT64 Value
+TcgAddUINT64 (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT64 Value
);
/**
@@ -446,9 +436,9 @@ TcgAddUINT64(
**/
TCG_RESULT
EFIAPI
-TcgAddBOOLEAN(
- TCG_CREATE_STRUCT *CreateStruct,
- BOOLEAN Value
+TcgAddBOOLEAN (
+ TCG_CREATE_STRUCT *CreateStruct,
+ BOOLEAN Value
);
/**
@@ -462,9 +452,9 @@ TcgAddBOOLEAN(
**/
TCG_RESULT
EFIAPI
-TcgAddTcgUid(
- TCG_CREATE_STRUCT *CreateStruct,
- TCG_UID Uid
+TcgAddTcgUid (
+ TCG_CREATE_STRUCT *CreateStruct,
+ TCG_UID Uid
);
/**
@@ -475,11 +465,10 @@ TcgAddTcgUid(
**/
TCG_RESULT
EFIAPI
-TcgAddStartList(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddStartList (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Adds an End List token to the Data structure.
@@ -489,11 +478,10 @@ TcgAddStartList(
**/
TCG_RESULT
EFIAPI
-TcgAddEndList(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddEndList (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Adds a Start Name token to the Data structure.
@@ -502,11 +490,10 @@ TcgAddEndList(
**/
TCG_RESULT
EFIAPI
-TcgAddStartName(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddStartName (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Adds an End Name token to the Data structure.
@@ -516,11 +503,10 @@ TcgAddStartName(
**/
TCG_RESULT
EFIAPI
-TcgAddEndName(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddEndName (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Adds a Call token to the Data structure.
@@ -529,11 +515,10 @@ TcgAddEndName(
**/
TCG_RESULT
EFIAPI
-TcgAddCall(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddCall (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Adds an End of Data token to the Data structure.
@@ -543,11 +528,10 @@ Adds an End of Data token to the Data structure.
**/
TCG_RESULT
EFIAPI
-TcgAddEndOfData(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddEndOfData (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Adds an End of Session token to the Data structure.
@@ -557,11 +541,10 @@ Adds an End of Session token to the Data structure.
**/
TCG_RESULT
EFIAPI
-TcgAddEndOfSession(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddEndOfSession (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Adds a Start Transaction token to the Data structure.
@@ -570,11 +553,10 @@ TcgAddEndOfSession(
**/
TCG_RESULT
EFIAPI
-TcgAddStartTransaction(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddStartTransaction (
+ TCG_CREATE_STRUCT *CreateStruct
);
-
/**
Adds an End Transaction token to the Data structure.
@@ -583,8 +565,8 @@ TcgAddStartTransaction(
**/
TCG_RESULT
EFIAPI
-TcgAddEndTransaction(
- TCG_CREATE_STRUCT *CreateStruct
+TcgAddEndTransaction (
+ TCG_CREATE_STRUCT *CreateStruct
);
/**
@@ -599,10 +581,10 @@ TcgAddEndTransaction(
**/
TCG_RESULT
EFIAPI
-TcgInitTcgParseStruct(
- TCG_PARSE_STRUCT *ParseStruct,
- const VOID *Buffer,
- UINT32 BufferSize
+TcgInitTcgParseStruct (
+ TCG_PARSE_STRUCT *ParseStruct,
+ const VOID *Buffer,
+ UINT32 BufferSize
);
/**
@@ -616,9 +598,9 @@ TcgInitTcgParseStruct(
**/
TCG_RESULT
EFIAPI
-TcgGetNextToken(
- TCG_PARSE_STRUCT *ParseStruct,
- TCG_TOKEN *TcgToken
+TcgGetNextToken (
+ TCG_PARSE_STRUCT *ParseStruct,
+ TCG_TOKEN *TcgToken
);
/**
@@ -632,9 +614,9 @@ TcgGetNextToken(
**/
TCG_RESULT
EFIAPI
-TcgGetNextTokenType(
- TCG_PARSE_STRUCT *ParseStruct,
- TCG_TOKEN_TYPE Type
+TcgGetNextTokenType (
+ TCG_PARSE_STRUCT *ParseStruct,
+ TCG_TOKEN_TYPE Type
);
/**
@@ -651,12 +633,12 @@ TcgGetNextTokenType(
**/
TCG_RESULT
EFIAPI
-TcgGetAtomInfo(
- const TCG_TOKEN *TcgToken,
- UINT32 *HeaderLength,
- UINT32 *DataLength,
- UINT8 *ByteOrInt,
- UINT8 *SignOrCont
+TcgGetAtomInfo (
+ const TCG_TOKEN *TcgToken,
+ UINT32 *HeaderLength,
+ UINT32 *DataLength,
+ UINT8 *ByteOrInt,
+ UINT8 *SignOrCont
);
/**
@@ -668,11 +650,11 @@ TcgGetAtomInfo(
@retval Return the value data.
**/
-UINT8*
+UINT8 *
EFIAPI
-TcgGetTokenByteSequence(
- const TCG_TOKEN *TcgToken,
- UINT32 *Length
+TcgGetTokenByteSequence (
+ const TCG_TOKEN *TcgToken,
+ UINT32 *Length
);
/**
@@ -686,12 +668,11 @@ TcgGetTokenByteSequence(
**/
TCG_RESULT
EFIAPI
-TcgGetTokenUINT64(
- const TCG_TOKEN *TcgToken,
- UINT64 *Value
+TcgGetTokenUINT64 (
+ const TCG_TOKEN *TcgToken,
+ UINT64 *Value
);
-
/**
Get next specify value.
@@ -703,12 +684,11 @@ TcgGetTokenUINT64(
**/
TCG_RESULT
EFIAPI
-TcgGetNextUINT8(
- TCG_PARSE_STRUCT *ParseStruct,
- UINT8 *Value
+TcgGetNextUINT8 (
+ TCG_PARSE_STRUCT *ParseStruct,
+ UINT8 *Value
);
-
/**
Get next specify value.
@@ -720,9 +700,9 @@ TcgGetNextUINT8(
**/
TCG_RESULT
EFIAPI
-TcgGetNextUINT16(
- TCG_PARSE_STRUCT *ParseStruct,
- UINT16 *Value
+TcgGetNextUINT16 (
+ TCG_PARSE_STRUCT *ParseStruct,
+ UINT16 *Value
);
/**
@@ -736,9 +716,9 @@ TcgGetNextUINT16(
**/
TCG_RESULT
EFIAPI
-TcgGetNextUINT32(
- TCG_PARSE_STRUCT *ParseStruct,
- UINT32 *Value
+TcgGetNextUINT32 (
+ TCG_PARSE_STRUCT *ParseStruct,
+ UINT32 *Value
);
/**
@@ -752,9 +732,9 @@ TcgGetNextUINT32(
**/
TCG_RESULT
EFIAPI
-TcgGetNextUINT64(
- TCG_PARSE_STRUCT *ParseStruct,
- UINT64 *Value
+TcgGetNextUINT64 (
+ TCG_PARSE_STRUCT *ParseStruct,
+ UINT64 *Value
);
/**
@@ -768,9 +748,9 @@ TcgGetNextUINT64(
**/
TCG_RESULT
EFIAPI
-TcgGetNextBOOLEAN(
- TCG_PARSE_STRUCT *ParseStruct,
- BOOLEAN *Value
+TcgGetNextBOOLEAN (
+ TCG_PARSE_STRUCT *ParseStruct,
+ BOOLEAN *Value
);
/**
@@ -784,9 +764,9 @@ TcgGetNextBOOLEAN(
**/
TCG_RESULT
EFIAPI
-TcgGetNextTcgUid(
- TCG_PARSE_STRUCT *ParseStruct,
- TCG_UID *Uid
+TcgGetNextTcgUid (
+ TCG_PARSE_STRUCT *ParseStruct,
+ TCG_UID *Uid
);
/**
@@ -801,10 +781,10 @@ TcgGetNextTcgUid(
**/
TCG_RESULT
EFIAPI
-TcgGetNextByteSequence(
- TCG_PARSE_STRUCT *ParseStruct,
- const VOID **Data,
- UINT32 *Length
+TcgGetNextByteSequence (
+ TCG_PARSE_STRUCT *ParseStruct,
+ const VOID **Data,
+ UINT32 *Length
);
/**
@@ -817,8 +797,8 @@ TcgGetNextByteSequence(
**/
TCG_RESULT
EFIAPI
-TcgGetNextStartList(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextStartList (
+ TCG_PARSE_STRUCT *ParseStruct
);
/**
@@ -831,8 +811,8 @@ TcgGetNextStartList(
**/
TCG_RESULT
EFIAPI
-TcgGetNextEndList(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextEndList (
+ TCG_PARSE_STRUCT *ParseStruct
);
/**
@@ -845,8 +825,8 @@ TcgGetNextEndList(
**/
TCG_RESULT
EFIAPI
-TcgGetNextStartName(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextStartName (
+ TCG_PARSE_STRUCT *ParseStruct
);
/**
@@ -859,8 +839,8 @@ TcgGetNextStartName(
**/
TCG_RESULT
EFIAPI
-TcgGetNextEndName(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextEndName (
+ TCG_PARSE_STRUCT *ParseStruct
);
/**
@@ -873,8 +853,8 @@ TcgGetNextEndName(
**/
TCG_RESULT
EFIAPI
-TcgGetNextCall(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextCall (
+ TCG_PARSE_STRUCT *ParseStruct
);
/**
@@ -887,8 +867,8 @@ TcgGetNextCall(
**/
TCG_RESULT
EFIAPI
-TcgGetNextEndOfData(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextEndOfData (
+ TCG_PARSE_STRUCT *ParseStruct
);
/**
@@ -901,8 +881,8 @@ TcgGetNextEndOfData(
**/
TCG_RESULT
EFIAPI
-TcgGetNextEndOfSession(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextEndOfSession (
+ TCG_PARSE_STRUCT *ParseStruct
);
/**
@@ -915,8 +895,8 @@ TcgGetNextEndOfSession(
**/
TCG_RESULT
EFIAPI
-TcgGetNextStartTransaction(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextStartTransaction (
+ TCG_PARSE_STRUCT *ParseStruct
);
/**
@@ -929,21 +909,20 @@ TcgGetNextStartTransaction(
**/
TCG_RESULT
EFIAPI
-TcgGetNextEndTransaction(
- TCG_PARSE_STRUCT *ParseStruct
+TcgGetNextEndTransaction (
+ TCG_PARSE_STRUCT *ParseStruct
);
// end of parse functions
-
typedef
BOOLEAN
-(EFIAPI* TCG_LEVEL0_ENUM_CALLBACK) (
+(EFIAPI *TCG_LEVEL0_ENUM_CALLBACK)(
const TCG_LEVEL0_DISCOVERY_HEADER *DiscoveryHeader,
TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER *Feature,
UINTN FeatureSize, // includes header
VOID *Context
-);
+ );
/**
Adds call token and method Header (invoking id, and method id).
@@ -955,10 +934,10 @@ BOOLEAN
**/
TCG_RESULT
EFIAPI
-TcgStartMethodCall(
- TCG_CREATE_STRUCT *CreateStruct,
- TCG_UID InvokingId,
- TCG_UID MethodId
+TcgStartMethodCall (
+ TCG_CREATE_STRUCT *CreateStruct,
+ TCG_UID InvokingId,
+ TCG_UID MethodId
);
/**
@@ -969,8 +948,8 @@ TcgStartMethodCall(
**/
TCG_RESULT
EFIAPI
-TcgStartParameters(
- TCG_CREATE_STRUCT *CreateStruct
+TcgStartParameters (
+ TCG_CREATE_STRUCT *CreateStruct
);
/**
@@ -981,8 +960,8 @@ TcgStartParameters(
**/
TCG_RESULT
EFIAPI
-TcgEndParameters(
- TCG_CREATE_STRUCT *CreateStruct
+TcgEndParameters (
+ TCG_CREATE_STRUCT *CreateStruct
);
/**
@@ -993,8 +972,8 @@ TcgEndParameters(
**/
TCG_RESULT
EFIAPI
-TcgEndMethodCall(
- TCG_CREATE_STRUCT *CreateStruct
+TcgEndMethodCall (
+ TCG_CREATE_STRUCT *CreateStruct
);
/**
@@ -1016,17 +995,17 @@ TcgEndMethodCall(
**/
TCG_RESULT
EFIAPI
-TcgCreateStartSession(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 *Size,
- UINT16 ComId,
- UINT16 ComIdExtension,
- UINT32 HostSessionId,
- TCG_UID SpId,
- BOOLEAN Write,
- UINT32 HostChallengeLength,
- const VOID *HostChallenge,
- TCG_UID HostSigningAuthority
+TcgCreateStartSession (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 *Size,
+ UINT16 ComId,
+ UINT16 ComIdExtension,
+ UINT32 HostSessionId,
+ TCG_UID SpId,
+ BOOLEAN Write,
+ UINT32 HostChallengeLength,
+ const VOID *HostChallenge,
+ TCG_UID HostSigningAuthority
);
/**
@@ -1046,16 +1025,16 @@ TcgCreateStartSession(
**/
TCG_RESULT
EFIAPI
-TcgCreateSetCPin(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 *Size,
- UINT16 ComId,
- UINT16 ComIdExtension,
- UINT32 TperSession,
- UINT32 HostSession,
- TCG_UID SidRow,
- const VOID *Password,
- UINT32 PasswordSize
+TcgCreateSetCPin (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 *Size,
+ UINT16 ComId,
+ UINT16 ComIdExtension,
+ UINT32 TperSession,
+ UINT32 HostSession,
+ TCG_UID SidRow,
+ const VOID *Password,
+ UINT32 PasswordSize
);
/**
@@ -1074,15 +1053,15 @@ TcgCreateSetCPin(
**/
TCG_RESULT
EFIAPI
-TcgSetAuthorityEnabled(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 *Size,
- UINT16 ComId,
- UINT16 ComIdExtension,
- UINT32 TperSession,
- UINT32 HostSession,
- TCG_UID AuthorityUid,
- BOOLEAN Enabled
+TcgSetAuthorityEnabled (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 *Size,
+ UINT16 ComId,
+ UINT16 ComIdExtension,
+ UINT32 TperSession,
+ UINT32 HostSession,
+ TCG_UID AuthorityUid,
+ BOOLEAN Enabled
);
/**
@@ -1100,16 +1079,15 @@ TcgSetAuthorityEnabled(
**/
TCG_RESULT
EFIAPI
-TcgCreateEndSession(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 *Size,
- UINT16 ComId,
- UINT16 ComIdExtension,
- UINT32 HostSessionId,
- UINT32 TpSessionId
+TcgCreateEndSession (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 *Size,
+ UINT16 ComId,
+ UINT16 ComIdExtension,
+ UINT32 HostSessionId,
+ UINT32 TpSessionId
);
-
/**
Retrieves human-readable token type name.
@@ -1117,9 +1095,9 @@ TcgCreateEndSession(
@param[in] Type Token type to retrieve
**/
-CHAR8*
+CHAR8 *
EFIAPI
-TcgTokenTypeString(
+TcgTokenTypeString (
TCG_TOKEN_TYPE Type
);
@@ -1133,9 +1111,9 @@ TcgTokenTypeString(
**/
TCG_RESULT
EFIAPI
-TcgGetMethodStatus(
- const TCG_PARSE_STRUCT *ParseStruct,
- UINT8 *MethodStatus
+TcgGetMethodStatus (
+ const TCG_PARSE_STRUCT *ParseStruct,
+ UINT8 *MethodStatus
);
/**
@@ -1146,13 +1124,12 @@ TcgGetMethodStatus(
@retval return the string info.
**/
-CHAR8*
+CHAR8 *
EFIAPI
-TcgMethodStatusString(
- UINT8 MethodStatus
+TcgMethodStatusString (
+ UINT8 MethodStatus
);
-
/**
Retrieves the comID and Extended comID of the ComPacket in the Tcg response.
It is intended to be used to confirm the received Tcg response is intended for user that received it.
@@ -1164,10 +1141,10 @@ TcgMethodStatusString(
**/
TCG_RESULT
EFIAPI
-TcgGetComIds(
- const TCG_PARSE_STRUCT *ParseStruct,
- UINT16 *ComId,
- UINT16 *ComIdExtension
+TcgGetComIds (
+ const TCG_PARSE_STRUCT *ParseStruct,
+ UINT16 *ComId,
+ UINT16 *ComIdExtension
);
/**
@@ -1180,10 +1157,10 @@ TcgGetComIds(
**/
TCG_RESULT
EFIAPI
-TcgCheckComIds(
- const TCG_PARSE_STRUCT *ParseStruct,
- UINT16 ExpectedComId,
- UINT16 ExpectedComIdExtension
+TcgCheckComIds (
+ const TCG_PARSE_STRUCT *ParseStruct,
+ UINT16 ExpectedComId,
+ UINT16 ExpectedComIdExtension
);
/**
@@ -1199,7 +1176,7 @@ TcgCheckComIds(
**/
TCG_RESULT
EFIAPI
-TcgParseSyncSession(
+TcgParseSyncSession (
const TCG_PARSE_STRUCT *ParseStruct,
UINT16 ComId,
UINT16 ComIdExtension,
@@ -1226,17 +1203,17 @@ TcgParseSyncSession(
**/
TCG_RESULT
EFIAPI
-TcgCreateSetAce(
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 *Size,
- UINT16 ComId,
- UINT16 ComIdExtension,
- UINT32 TperSession,
- UINT32 HostSession,
- TCG_UID AceRow,
- TCG_UID Authority1,
- BOOLEAN LogicalOperator,
- TCG_UID Authority2
+TcgCreateSetAce (
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 *Size,
+ UINT16 ComId,
+ UINT16 ComIdExtension,
+ UINT32 TperSession,
+ UINT32 HostSession,
+ TCG_UID AceRow,
+ TCG_UID Authority1,
+ BOOLEAN LogicalOperator,
+ TCG_UID Authority2
);
/**
@@ -1251,7 +1228,7 @@ TcgCreateSetAce(
**/
BOOLEAN
EFIAPI
-TcgEnumLevel0Discovery(
+TcgEnumLevel0Discovery (
const TCG_LEVEL0_DISCOVERY_HEADER *DiscoveryHeader,
TCG_LEVEL0_ENUM_CALLBACK Callback,
VOID *Context
@@ -1266,9 +1243,9 @@ TcgEnumLevel0Discovery(
@retval return the Feature code data.
**/
-TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER*
+TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER *
EFIAPI
-TcgGetFeature(
+TcgGetFeature (
const TCG_LEVEL0_DISCOVERY_HEADER *DiscoveryHeader,
UINT16 FeatureCode,
UINTN *FeatureSize
@@ -1284,9 +1261,9 @@ TcgGetFeature(
**/
BOOLEAN
EFIAPI
-TcgIsProtocolSupported(
- const TCG_SUPPORTED_SECURITY_PROTOCOLS *ProtocolList,
- UINT16 Protocol
+TcgIsProtocolSupported (
+ const TCG_SUPPORTED_SECURITY_PROTOCOLS *ProtocolList,
+ UINT16 Protocol
);
/**
@@ -1299,11 +1276,10 @@ TcgIsProtocolSupported(
**/
BOOLEAN
EFIAPI
-TcgIsLocked(
- const TCG_LEVEL0_DISCOVERY_HEADER *Discovery
+TcgIsLocked (
+ const TCG_LEVEL0_DISCOVERY_HEADER *Discovery
);
#pragma pack()
-
#endif // _TCG_CORE_H_
diff --git a/SecurityPkg/Include/Library/TcgStorageOpalLib.h b/SecurityPkg/Include/Library/TcgStorageOpalLib.h
index a28cebe..9ce8fe4 100644
--- a/SecurityPkg/Include/Library/TcgStorageOpalLib.h
+++ b/SecurityPkg/Include/Library/TcgStorageOpalLib.h
@@ -37,74 +37,74 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#pragma pack(1)
typedef struct {
- //
- // Opal SSC 1 support (0 - not supported, 1 - supported)
- //
- UINT32 OpalSsc1 : 1;
-
- //
- // Opal SSC 2support (0 - not supported, 1 - supported)
- //
- UINT32 OpalSsc2 : 1;
-
- //
- // Opal SSC Lite support (0 - not supported, 1 - supported)
- //
- UINT32 OpalSscLite : 1;
-
- //
- // Pyrite SSC support (0 - not supported, 1 - supported)
- //
- UINT32 PyriteSsc : 1;
-
- //
- // Security protocol 1 support (0 - not supported, 1 - supported)
- //
- UINT32 Sp1 : 1;
-
- //
- // Security protocol 2 support (0 - not supported, 1 - supported)
- //
- UINT32 Sp2 : 1;
-
- //
- // Security protocol IEEE1667 support (0 - not supported, 1 - supported)
- //
- UINT32 SpIeee1667 : 1;
-
- //
- // Media encryption supported (0 - not supported, 1 - supported)
- //
- UINT32 MediaEncryption : 1;
-
- //
- // Initial C_PIN_SID PIN Indicator
- // 0 - The initial C_PIN_SID PIN value is NOT equal to the C_PIN_MSID PIN value
- // 1 - The initial C_PIN_SID PIN value is equal to the C_PIN_MSID PIN value
- //
- UINT32 InitCpinIndicator : 1;
-
- //
- // Behavior of C_PIN_SID PIN upon TPer Revert
- // 0 - The initial C_PIN_SID PIN value is NOT equal to the C_PIN_MSID PIN value
- // 1 - The initial C_PIN_SID PIN value is equal to the C_PIN_MSID PIN value
- //
- UINT32 CpinUponRevert : 1;
-
- //
- // Media encryption supported (0 - not supported, 1 - supported)
- //
- UINT32 BlockSid : 1;
-
- //
- // Pyrite SSC V2 support (0 - not supported, 1 - supported)
- //
- UINT32 PyriteSscV2 : 1;
-
- //
- // Supported Data Removal Mechanism support (0 - not supported, 1 - supported)
- //
- UINT32 DataRemoval : 1;
+ //
+ // Opal SSC 1 support (0 - not supported, 1 - supported)
+ //
+ UINT32 OpalSsc1 : 1;
+
+ //
+ // Opal SSC 2support (0 - not supported, 1 - supported)
+ //
+ UINT32 OpalSsc2 : 1;
+
+ //
+ // Opal SSC Lite support (0 - not supported, 1 - supported)
+ //
+ UINT32 OpalSscLite : 1;
+
+ //
+ // Pyrite SSC support (0 - not supported, 1 - supported)
+ //
+ UINT32 PyriteSsc : 1;
+
+ //
+ // Security protocol 1 support (0 - not supported, 1 - supported)
+ //
+ UINT32 Sp1 : 1;
+
+ //
+ // Security protocol 2 support (0 - not supported, 1 - supported)
+ //
+ UINT32 Sp2 : 1;
+
+ //
+ // Security protocol IEEE1667 support (0 - not supported, 1 - supported)
+ //
+ UINT32 SpIeee1667 : 1;
+
+ //
+ // Media encryption supported (0 - not supported, 1 - supported)
+ //
+ UINT32 MediaEncryption : 1;
+
+ //
+ // Initial C_PIN_SID PIN Indicator
+ // 0 - The initial C_PIN_SID PIN value is NOT equal to the C_PIN_MSID PIN value
+ // 1 - The initial C_PIN_SID PIN value is equal to the C_PIN_MSID PIN value
+ //
+ UINT32 InitCpinIndicator : 1;
+
+ //
+ // Behavior of C_PIN_SID PIN upon TPer Revert
+ // 0 - The initial C_PIN_SID PIN value is NOT equal to the C_PIN_MSID PIN value
+ // 1 - The initial C_PIN_SID PIN value is equal to the C_PIN_MSID PIN value
+ //
+ UINT32 CpinUponRevert : 1;
+
+ //
+ // Media encryption supported (0 - not supported, 1 - supported)
+ //
+ UINT32 BlockSid : 1;
+
+ //
+ // Pyrite SSC V2 support (0 - not supported, 1 - supported)
+ //
+ UINT32 PyriteSscV2 : 1;
+
+ //
+ // Supported Data Removal Mechanism support (0 - not supported, 1 - supported)
+ //
+ UINT32 DataRemoval : 1;
} OPAL_DISK_SUPPORT_ATTRIBUTE;
//
@@ -112,16 +112,16 @@ typedef struct {
// The type indicates who was the determined owner of the device.
//
typedef enum {
- //
- // Represents the device ownership is unknown because starting a session as the SID authority with the ADMIN SP
- //was unsuccessful with the provided PIN
- //
- OpalOwnershipUnknown,
-
- //
- // Represents that the ADMIN SP SID authority contains the same PIN as the MSID PIN
- //
- OpalOwnershipNobody,
+ //
+ // Represents the device ownership is unknown because starting a session as the SID authority with the ADMIN SP
+ // was unsuccessful with the provided PIN
+ //
+ OpalOwnershipUnknown,
+
+ //
+ // Represents that the ADMIN SP SID authority contains the same PIN as the MSID PIN
+ //
+ OpalOwnershipNobody,
} OPAL_OWNER_SHIP;
//
@@ -132,14 +132,14 @@ typedef enum {
//
//
typedef struct {
- UINT32 HostSessionId;
- UINT32 TperSessionId;
- UINT16 ComIdExtension;
+ UINT32 HostSessionId;
+ UINT32 TperSessionId;
+ UINT16 ComIdExtension;
- UINT16 OpalBaseComId;
+ UINT16 OpalBaseComId;
- EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *Sscp;
- UINT32 MediaId;
+ EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *Sscp;
+ UINT32 MediaId;
} OPAL_SESSION;
#pragma pack()
@@ -155,10 +155,10 @@ typedef struct {
**/
TCG_RESULT
EFIAPI
-OpalRetrieveSupportedProtocolList(
- OPAL_SESSION *Session,
- UINTN BufferSize,
- VOID *BuffAddress
+OpalRetrieveSupportedProtocolList (
+ OPAL_SESSION *Session,
+ UINTN BufferSize,
+ VOID *BuffAddress
);
/**
@@ -173,10 +173,10 @@ OpalRetrieveSupportedProtocolList(
**/
TCG_RESULT
EFIAPI
-OpalRetrieveLevel0DiscoveryHeader(
- OPAL_SESSION *Session,
- UINTN BufferSize,
- VOID *BuffAddress
+OpalRetrieveLevel0DiscoveryHeader (
+ OPAL_SESSION *Session,
+ UINTN BufferSize,
+ VOID *BuffAddress
);
/**
@@ -199,14 +199,14 @@ OpalRetrieveLevel0DiscoveryHeader(
**/
TCG_RESULT
EFIAPI
-OpalStartSession(
- OPAL_SESSION *Session,
- TCG_UID SpId,
- BOOLEAN Write,
- UINT32 HostChallengeLength,
- const VOID *HostChallenge,
- TCG_UID HostSigningAuthority,
- UINT8 *MethodStatus
+OpalStartSession (
+ OPAL_SESSION *Session,
+ TCG_UID SpId,
+ BOOLEAN Write,
+ UINT32 HostChallengeLength,
+ const VOID *HostChallenge,
+ TCG_UID HostSigningAuthority,
+ UINT8 *MethodStatus
);
/**
@@ -217,8 +217,8 @@ OpalStartSession(
**/
TCG_RESULT
EFIAPI
-OpalEndSession(
- OPAL_SESSION *Session
+OpalEndSession (
+ OPAL_SESSION *Session
);
/**
@@ -230,11 +230,10 @@ OpalEndSession(
**/
TCG_RESULT
EFIAPI
-OpalPsidRevert(
- OPAL_SESSION *AdminSpSession
+OpalPsidRevert (
+ OPAL_SESSION *AdminSpSession
);
-
/**
The function retrieves the MSID from the device specified
@@ -247,11 +246,11 @@ OpalPsidRevert(
**/
TCG_RESULT
EFIAPI
-OpalGetMsid(
- OPAL_SESSION *AdminSpSession,
- UINT32 MsidBufferSize,
- UINT8 *Msid,
- UINT32 *MsidLength
+OpalGetMsid (
+ OPAL_SESSION *AdminSpSession,
+ UINT32 MsidBufferSize,
+ UINT8 *Msid,
+ UINT32 *MsidLength
);
/**
@@ -266,12 +265,11 @@ OpalGetMsid(
**/
TCG_RESULT
EFIAPI
-OpalActivateLockingSp(
- OPAL_SESSION *AdminSpSession,
- UINT8 *MethodStatus
+OpalActivateLockingSp (
+ OPAL_SESSION *AdminSpSession,
+ UINT8 *MethodStatus
);
-
/**
The function sets the PIN column of the specified cpinRowUid (authority) with the newPin value.
@@ -285,12 +283,12 @@ OpalActivateLockingSp(
**/
TCG_RESULT
EFIAPI
-OpalSetPassword(
- OPAL_SESSION *Session,
- TCG_UID CpinRowUid,
- const VOID *NewPin,
- UINT32 NewPinLength,
- UINT8 *MethodStatus
+OpalSetPassword (
+ OPAL_SESSION *Session,
+ TCG_UID CpinRowUid,
+ const VOID *NewPin,
+ UINT32 NewPinLength,
+ UINT8 *MethodStatus
);
/**
@@ -304,12 +302,11 @@ OpalSetPassword(
**/
TCG_RESULT
EFIAPI
-OpalGlobalLockingRangeGenKey(
- OPAL_SESSION *LockingSpSession,
- UINT8 *MethodStatus
+OpalGlobalLockingRangeGenKey (
+ OPAL_SESSION *LockingSpSession,
+ UINT8 *MethodStatus
);
-
/**
The function updates the ReadLocked and WriteLocked columns of the Global Locking Range.
@@ -324,14 +321,13 @@ OpalGlobalLockingRangeGenKey(
**/
TCG_RESULT
EFIAPI
-OpalUpdateGlobalLockingRange(
- OPAL_SESSION *LockingSpSession,
- BOOLEAN ReadLocked,
- BOOLEAN WriteLocked,
- UINT8 *MethodStatus
+OpalUpdateGlobalLockingRange (
+ OPAL_SESSION *LockingSpSession,
+ BOOLEAN ReadLocked,
+ BOOLEAN WriteLocked,
+ UINT8 *MethodStatus
);
-
/**
The function updates the RangeStart, RangeLength, ReadLockedEnabled, WriteLockedEnabled, ReadLocked and WriteLocked columns
@@ -350,16 +346,16 @@ OpalUpdateGlobalLockingRange(
**/
TCG_RESULT
EFIAPI
-OpalSetLockingRange(
- OPAL_SESSION *LockingSpSession,
- TCG_UID LockingRangeUid,
- UINT64 RangeStart,
- UINT64 RangeLength,
- BOOLEAN ReadLockEnabled,
- BOOLEAN WriteLockEnabled,
- BOOLEAN ReadLocked,
- BOOLEAN WriteLocked,
- UINT8 *MethodStatus
+OpalSetLockingRange (
+ OPAL_SESSION *LockingSpSession,
+ TCG_UID LockingRangeUid,
+ UINT64 RangeStart,
+ UINT64 RangeLength,
+ BOOLEAN ReadLockEnabled,
+ BOOLEAN WriteLockEnabled,
+ BOOLEAN ReadLocked,
+ BOOLEAN WriteLocked,
+ UINT8 *MethodStatus
);
/**
@@ -377,16 +373,15 @@ OpalSetLockingRange(
**/
TCG_RESULT
EFIAPI
-OpalSetLockingSpAuthorityEnabledAndPin(
- OPAL_SESSION *LockingSpSession,
- TCG_UID CpinRowUid,
- TCG_UID AuthorityUid,
- const VOID *NewPin,
- UINT32 NewPinLength,
- UINT8 *MethodStatus
+OpalSetLockingSpAuthorityEnabledAndPin (
+ OPAL_SESSION *LockingSpSession,
+ TCG_UID CpinRowUid,
+ TCG_UID AuthorityUid,
+ const VOID *NewPin,
+ UINT32 NewPinLength,
+ UINT8 *MethodStatus
);
-
/**
The function sets the Enabled column to FALSE for the USER1 authority.
@@ -397,12 +392,11 @@ OpalSetLockingSpAuthorityEnabledAndPin(
**/
TCG_RESULT
EFIAPI
-OpalDisableUser(
- OPAL_SESSION *LockingSpSession,
- UINT8 *MethodStatus
+OpalDisableUser (
+ OPAL_SESSION *LockingSpSession,
+ UINT8 *MethodStatus
);
-
/**
The function calls the Admin SP RevertSP method on the Locking SP. If KeepUserData is True, then the optional parameter
@@ -415,13 +409,12 @@ OpalDisableUser(
**/
TCG_RESULT
EFIAPI
-OpalAdminRevert(
- OPAL_SESSION *LockingSpSession,
- BOOLEAN KeepUserData,
- UINT8 *MethodStatus
+OpalAdminRevert (
+ OPAL_SESSION *LockingSpSession,
+ BOOLEAN KeepUserData,
+ UINT8 *MethodStatus
);
-
/**
The function retrieves the TryLimit column for the specified rowUid (authority).
@@ -433,13 +426,12 @@ OpalAdminRevert(
**/
TCG_RESULT
EFIAPI
-OpalGetTryLimit(
- OPAL_SESSION *LockingSpSession,
- TCG_UID RowUid,
- UINT32 *TryLimit
+OpalGetTryLimit (
+ OPAL_SESSION *LockingSpSession,
+ TCG_UID RowUid,
+ UINT32 *TryLimit
);
-
/**
The function populates the CreateStruct with a payload that will retrieve the global locking range active key.
@@ -453,13 +445,12 @@ OpalGetTryLimit(
**/
TCG_RESULT
EFIAPI
-OpalCreateRetrieveGlobalLockingRangeActiveKey(
- const OPAL_SESSION *Session,
- TCG_CREATE_STRUCT *CreateStruct,
- UINT32 *Size
+OpalCreateRetrieveGlobalLockingRangeActiveKey (
+ const OPAL_SESSION *Session,
+ TCG_CREATE_STRUCT *CreateStruct,
+ UINT32 *Size
);
-
/**
The function acquires the activeKey specified for the Global Locking Range from the parseStruct.
@@ -470,7 +461,7 @@ OpalCreateRetrieveGlobalLockingRangeActiveKey(
**/
TCG_RESULT
EFIAPI
-OpalParseRetrieveGlobalLockingRangeActiveKey(
+OpalParseRetrieveGlobalLockingRangeActiveKey (
TCG_PARSE_STRUCT *ParseStruct,
TCG_UID *ActiveKey
);
@@ -485,9 +476,9 @@ OpalParseRetrieveGlobalLockingRangeActiveKey(
**/
TCG_RESULT
EFIAPI
-OpalGetLockingInfo(
- OPAL_SESSION *Session,
- TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature
+OpalGetLockingInfo (
+ OPAL_SESSION *Session,
+ TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature
);
/**
@@ -500,8 +491,8 @@ OpalGetLockingInfo(
**/
BOOLEAN
EFIAPI
-OpalFeatureSupported(
- OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes
+OpalFeatureSupported (
+ OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes
);
/**
@@ -517,9 +508,9 @@ OpalFeatureSupported(
**/
BOOLEAN
EFIAPI
-OpalFeatureEnabled(
- OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes,
- TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature
+OpalFeatureEnabled (
+ OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes,
+ TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature
);
/**
@@ -533,9 +524,9 @@ OpalFeatureEnabled(
**/
BOOLEAN
-OpalDeviceLocked(
- OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes,
- TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature
+OpalDeviceLocked (
+ OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes,
+ TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature
);
/**
@@ -547,9 +538,9 @@ OpalDeviceLocked(
**/
TCG_RESULT
EFIAPI
-OpalBlockSid(
- OPAL_SESSION *Session,
- BOOLEAN HardwareReset
+OpalBlockSid (
+ OPAL_SESSION *Session,
+ BOOLEAN HardwareReset
);
/**
@@ -563,7 +554,7 @@ OpalBlockSid(
**/
TCG_RESULT
EFIAPI
-OpalGetSupportedAttributesInfo(
+OpalGetSupportedAttributesInfo (
OPAL_SESSION *Session,
OPAL_DISK_SUPPORT_ATTRIBUTE *SupportedAttributes,
UINT16 *OpalBaseComId
@@ -579,10 +570,10 @@ OpalGetSupportedAttributesInfo(
**/
TCG_RESULT
EFIAPI
-OpalUtilPsidRevert(
- OPAL_SESSION *AdminSpSession,
- const VOID *Psid,
- UINT32 PsidLength
+OpalUtilPsidRevert (
+ OPAL_SESSION *AdminSpSession,
+ const VOID *Psid,
+ UINT32 PsidLength
);
/**
@@ -599,12 +590,12 @@ OpalUtilPsidRevert(
**/
TCG_RESULT
EFIAPI
-OpalUtilSetAdminPasswordAsSid(
- OPAL_SESSION *AdminSpSession,
- const VOID *GeneratedSid,
- UINT32 SidLength,
- const VOID *Password,
- UINT32 PassLength
+OpalUtilSetAdminPasswordAsSid (
+ OPAL_SESSION *AdminSpSession,
+ const VOID *GeneratedSid,
+ UINT32 SidLength,
+ const VOID *Password,
+ UINT32 PassLength
);
/**
@@ -626,17 +617,17 @@ OpalUtilSetAdminPasswordAsSid(
**/
TCG_RESULT
EFIAPI
-OpalUtilSetOpalLockingRange(
- OPAL_SESSION *LockingSpSession,
- const VOID *Password,
- UINT32 PassLength,
- TCG_UID LockingRangeUid,
- UINT64 RangeStart,
- UINT64 RangeLength,
- BOOLEAN ReadLockEnabled,
- BOOLEAN WriteLockEnabled,
- BOOLEAN ReadLocked,
- BOOLEAN WriteLocked
+OpalUtilSetOpalLockingRange (
+ OPAL_SESSION *LockingSpSession,
+ const VOID *Password,
+ UINT32 PassLength,
+ TCG_UID LockingRangeUid,
+ UINT64 RangeStart,
+ UINT64 RangeLength,
+ BOOLEAN ReadLockEnabled,
+ BOOLEAN WriteLockEnabled,
+ BOOLEAN ReadLocked,
+ BOOLEAN WriteLocked
);
/**
@@ -653,7 +644,7 @@ OpalUtilSetOpalLockingRange(
**/
TCG_RESULT
EFIAPI
-OpalUtilSetAdminPassword(
+OpalUtilSetAdminPassword (
OPAL_SESSION *AdminSpSession,
const VOID *OldPassword,
UINT32 OldPasswordLength,
@@ -674,12 +665,12 @@ OpalUtilSetAdminPassword(
**/
TCG_RESULT
EFIAPI
-OpalUtilSetUserPassword(
- OPAL_SESSION *LockingSpSession,
- const VOID *OldPassword,
- UINT32 OldPasswordLength,
- const VOID *NewPassword,
- UINT32 NewPasswordLength
+OpalUtilSetUserPassword (
+ OPAL_SESSION *LockingSpSession,
+ const VOID *OldPassword,
+ UINT32 OldPasswordLength,
+ const VOID *NewPassword,
+ UINT32 NewPasswordLength
);
/**
@@ -694,10 +685,10 @@ OpalUtilSetUserPassword(
TCG_RESULT
EFIAPI
OpalUtilVerifyPassword (
- OPAL_SESSION *LockingSpSession,
- const VOID *Password,
- UINT32 PasswordLength,
- TCG_UID HostSigningAuthority
+ OPAL_SESSION *LockingSpSession,
+ const VOID *Password,
+ UINT32 PasswordLength,
+ TCG_UID HostSigningAuthority
);
/**
@@ -712,11 +703,11 @@ OpalUtilVerifyPassword (
**/
TCG_RESULT
EFIAPI
-OpalUtilSecureErase(
- OPAL_SESSION *LockingSpSession,
- const VOID *Password,
- UINT32 PasswordLength,
- BOOLEAN *PasswordFailed
+OpalUtilSecureErase (
+ OPAL_SESSION *LockingSpSession,
+ const VOID *Password,
+ UINT32 PasswordLength,
+ BOOLEAN *PasswordFailed
);
/**
@@ -730,11 +721,11 @@ OpalUtilSecureErase(
**/
TCG_RESULT
EFIAPI
-OpalUtilDisableUser(
- OPAL_SESSION *LockingSpSession,
- const VOID *Password,
- UINT32 PasswordLength,
- BOOLEAN *PasswordFailed
+OpalUtilDisableUser (
+ OPAL_SESSION *LockingSpSession,
+ const VOID *Password,
+ UINT32 PasswordLength,
+ BOOLEAN *PasswordFailed
);
/**
@@ -751,14 +742,14 @@ OpalUtilDisableUser(
**/
TCG_RESULT
EFIAPI
-OpalUtilRevert(
- OPAL_SESSION *LockingSpSession,
- BOOLEAN KeepUserData,
- const VOID *Password,
- UINT32 PasswordLength,
- BOOLEAN *PasswordFailed,
- UINT8 *Msid,
- UINT32 MsidLength
+OpalUtilRevert (
+ OPAL_SESSION *LockingSpSession,
+ BOOLEAN KeepUserData,
+ const VOID *Password,
+ UINT32 PasswordLength,
+ BOOLEAN *PasswordFailed,
+ UINT8 *Msid,
+ UINT32 MsidLength
);
/**
@@ -774,11 +765,11 @@ OpalUtilRevert(
TCG_RESULT
EFIAPI
OpalUtilSetSIDtoMSID (
- OPAL_SESSION *AdminSpSession,
- const VOID *Password,
- UINT32 PasswordLength,
- UINT8 *Msid,
- UINT32 MsidLength
+ OPAL_SESSION *AdminSpSession,
+ const VOID *Password,
+ UINT32 PasswordLength,
+ UINT8 *Msid,
+ UINT32 MsidLength
);
/**
@@ -793,12 +784,12 @@ OpalUtilSetSIDtoMSID (
**/
TCG_RESULT
EFIAPI
-OpalUtilUpdateGlobalLockingRange(
- OPAL_SESSION *LockingSpSession,
- const VOID *Password,
- UINT32 PasswordLength,
- BOOLEAN ReadLocked,
- BOOLEAN WriteLocked
+OpalUtilUpdateGlobalLockingRange (
+ OPAL_SESSION *LockingSpSession,
+ const VOID *Password,
+ UINT32 PasswordLength,
+ BOOLEAN ReadLocked,
+ BOOLEAN WriteLocked
);
/**
@@ -812,11 +803,11 @@ OpalUtilUpdateGlobalLockingRange(
**/
TCG_RESULT
EFIAPI
-OpalUtilGetMsid(
- OPAL_SESSION *Session,
- UINT8 *Msid,
- UINT32 MsidBufferLength,
- UINT32 *MsidLength
+OpalUtilGetMsid (
+ OPAL_SESSION *Session,
+ UINT8 *Msid,
+ UINT32 MsidBufferLength,
+ UINT32 *MsidLength
);
/**
@@ -833,10 +824,10 @@ OpalUtilGetMsid(
**/
OPAL_OWNER_SHIP
EFIAPI
-OpalUtilDetermineOwnership(
- OPAL_SESSION *Session,
- UINT8 *Msid,
- UINT32 MsidLength
+OpalUtilDetermineOwnership (
+ OPAL_SESSION *Session,
+ UINT8 *Msid,
+ UINT32 MsidLength
);
/**
@@ -852,9 +843,9 @@ OpalUtilDetermineOwnership(
**/
BOOLEAN
EFIAPI
-OpalUtilAdminPasswordExists(
- IN UINT16 OwnerShip,
- IN TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature
+OpalUtilAdminPasswordExists (
+ IN UINT16 OwnerShip,
+ IN TCG_LOCKING_FEATURE_DESCRIPTOR *LockingFeature
);
/**
@@ -869,10 +860,10 @@ OpalUtilAdminPasswordExists(
TCG_RESULT
EFIAPI
OpalUtilGetActiveDataRemovalMechanism (
- OPAL_SESSION *Session,
- const VOID *GeneratedSid,
- UINT32 SidLength,
- UINT8 *ActiveDataRemovalMechanism
+ OPAL_SESSION *Session,
+ const VOID *GeneratedSid,
+ UINT32 SidLength,
+ UINT8 *ActiveDataRemovalMechanism
);
/**
@@ -885,8 +876,8 @@ OpalUtilGetActiveDataRemovalMechanism (
TCG_RESULT
EFIAPI
OpalUtilGetDataRemovalMechanismLists (
- IN OPAL_SESSION *Session,
- OUT UINT32 *RemovalMechanismLists
+ IN OPAL_SESSION *Session,
+ OUT UINT32 *RemovalMechanismLists
);
#endif // _OPAL_CORE_H_
diff --git a/SecurityPkg/Include/Library/Tpm12CommandLib.h b/SecurityPkg/Include/Library/Tpm12CommandLib.h
index e8f93c5..13fefbb 100644
--- a/SecurityPkg/Include/Library/Tpm12CommandLib.h
+++ b/SecurityPkg/Include/Library/Tpm12CommandLib.h
@@ -22,7 +22,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
Tpm12Startup (
- IN TPM_STARTUP_TYPE TpmSt
+ IN TPM_STARTUP_TYPE TpmSt
);
/**
@@ -52,26 +52,26 @@ Tpm12ForceClear (
#pragma pack(1)
typedef struct {
- UINT16 sizeOfSelect;
- UINT8 pcrSelect[3];
+ UINT16 sizeOfSelect;
+ UINT8 pcrSelect[3];
} TPM12_PCR_SELECTION;
typedef struct {
- TPM12_PCR_SELECTION pcrSelection;
- TPM_LOCALITY_SELECTION localityAtRelease;
- TPM_COMPOSITE_HASH digestAtRelease;
+ TPM12_PCR_SELECTION pcrSelection;
+ TPM_LOCALITY_SELECTION localityAtRelease;
+ TPM_COMPOSITE_HASH digestAtRelease;
} TPM12_PCR_INFO_SHORT;
typedef struct {
- TPM_STRUCTURE_TAG tag;
- TPM_NV_INDEX nvIndex;
- TPM12_PCR_INFO_SHORT pcrInfoRead;
- TPM12_PCR_INFO_SHORT pcrInfoWrite;
- TPM_NV_ATTRIBUTES permission;
- BOOLEAN bReadSTClear;
- BOOLEAN bWriteSTClear;
- BOOLEAN bWriteDefine;
- UINT32 dataSize;
+ TPM_STRUCTURE_TAG tag;
+ TPM_NV_INDEX nvIndex;
+ TPM12_PCR_INFO_SHORT pcrInfoRead;
+ TPM12_PCR_INFO_SHORT pcrInfoWrite;
+ TPM_NV_ATTRIBUTES permission;
+ BOOLEAN bReadSTClear;
+ BOOLEAN bWriteSTClear;
+ BOOLEAN bWriteDefine;
+ UINT32 dataSize;
} TPM12_NV_DATA_PUBLIC;
#pragma pack()
@@ -106,10 +106,10 @@ Tpm12NvDefineSpace (
EFI_STATUS
EFIAPI
Tpm12NvReadValue (
- IN TPM_NV_INDEX NvIndex,
- IN UINT32 Offset,
- IN OUT UINT32 *DataSize,
- OUT UINT8 *Data
+ IN TPM_NV_INDEX NvIndex,
+ IN UINT32 Offset,
+ IN OUT UINT32 *DataSize,
+ OUT UINT8 *Data
);
/**
@@ -126,10 +126,10 @@ Tpm12NvReadValue (
EFI_STATUS
EFIAPI
Tpm12NvWriteValue (
- IN TPM_NV_INDEX NvIndex,
- IN UINT32 Offset,
- IN UINT32 DataSize,
- IN UINT8 *Data
+ IN TPM_NV_INDEX NvIndex,
+ IN UINT32 Offset,
+ IN UINT32 DataSize,
+ IN UINT8 *Data
);
/**
@@ -167,7 +167,7 @@ Send TSC_PhysicalPresence command to TPM.
EFI_STATUS
EFIAPI
Tpm12PhysicalPresence (
- IN TPM_PHYSICAL_PRESENCE PhysicalPresence
+ IN TPM_PHYSICAL_PRESENCE PhysicalPresence
);
/**
@@ -214,6 +214,7 @@ Get TPM capability volatile flags.
EFI_STATUS
EFIAPI
Tpm12GetCapabilityFlagVolatile (
- OUT TPM_STCLEAR_FLAGS *VolatileFlags
+ OUT TPM_STCLEAR_FLAGS *VolatileFlags
);
+
#endif
diff --git a/SecurityPkg/Include/Library/Tpm12DeviceLib.h b/SecurityPkg/Include/Library/Tpm12DeviceLib.h
index eac7885..f7c08dd 100644
--- a/SecurityPkg/Include/Library/Tpm12DeviceLib.h
+++ b/SecurityPkg/Include/Library/Tpm12DeviceLib.h
@@ -26,10 +26,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
Tpm12SubmitCommand (
- IN UINT32 InputParameterBlockSize,
- IN UINT8 *InputParameterBlock,
- IN OUT UINT32 *OutputParameterBlockSize,
- IN UINT8 *OutputParameterBlock
+ IN UINT32 InputParameterBlockSize,
+ IN UINT8 *InputParameterBlock,
+ IN OUT UINT32 *OutputParameterBlockSize,
+ IN UINT8 *OutputParameterBlock
);
/**
diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h b/SecurityPkg/Include/Library/Tpm2CommandLib.h
index ad3b982..2e83a2f 100644
--- a/SecurityPkg/Include/Library/Tpm2CommandLib.h
+++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h
@@ -26,8 +26,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
Tpm2HashSequenceStart (
- IN TPMI_ALG_HASH HashAlg,
- OUT TPMI_DH_OBJECT *SequenceHandle
+ IN TPMI_ALG_HASH HashAlg,
+ OUT TPMI_DH_OBJECT *SequenceHandle
);
/**
@@ -44,8 +44,8 @@ Tpm2HashSequenceStart (
EFI_STATUS
EFIAPI
Tpm2SequenceUpdate (
- IN TPMI_DH_OBJECT SequenceHandle,
- IN TPM2B_MAX_BUFFER *Buffer
+ IN TPMI_DH_OBJECT SequenceHandle,
+ IN TPM2B_MAX_BUFFER *Buffer
);
/**
@@ -65,10 +65,10 @@ Tpm2SequenceUpdate (
EFI_STATUS
EFIAPI
Tpm2EventSequenceComplete (
- IN TPMI_DH_PCR PcrHandle,
- IN TPMI_DH_OBJECT SequenceHandle,
- IN TPM2B_MAX_BUFFER *Buffer,
- OUT TPML_DIGEST_VALUES *Results
+ IN TPMI_DH_PCR PcrHandle,
+ IN TPMI_DH_OBJECT SequenceHandle,
+ IN TPM2B_MAX_BUFFER *Buffer,
+ OUT TPML_DIGEST_VALUES *Results
);
/**
@@ -84,9 +84,9 @@ Tpm2EventSequenceComplete (
EFI_STATUS
EFIAPI
Tpm2SequenceComplete (
- IN TPMI_DH_OBJECT SequenceHandle,
- IN TPM2B_MAX_BUFFER *Buffer,
- OUT TPM2B_DIGEST *Result
+ IN TPMI_DH_OBJECT SequenceHandle,
+ IN TPM2B_MAX_BUFFER *Buffer,
+ OUT TPM2B_DIGEST *Result
);
/**
@@ -100,7 +100,7 @@ Tpm2SequenceComplete (
EFI_STATUS
EFIAPI
Tpm2Startup (
- IN TPM_SU StartupType
+ IN TPM_SU StartupType
);
/**
@@ -114,7 +114,7 @@ Tpm2Startup (
EFI_STATUS
EFIAPI
Tpm2Shutdown (
- IN TPM_SU ShutdownType
+ IN TPM_SU ShutdownType
);
/**
@@ -131,7 +131,7 @@ Tpm2Shutdown (
EFI_STATUS
EFIAPI
Tpm2SelfTest (
- IN TPMI_YES_NO FullTest
+ IN TPMI_YES_NO FullTest
);
/**
@@ -149,10 +149,10 @@ Tpm2SelfTest (
EFI_STATUS
EFIAPI
Tpm2SetPrimaryPolicy (
- IN TPMI_RH_HIERARCHY_AUTH AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession,
- IN TPM2B_DIGEST *AuthPolicy,
- IN TPMI_ALG_HASH HashAlg
+ IN TPMI_RH_HIERARCHY_AUTH AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession,
+ IN TPM2B_DIGEST *AuthPolicy,
+ IN TPMI_ALG_HASH HashAlg
);
/**
@@ -167,8 +167,8 @@ Tpm2SetPrimaryPolicy (
EFI_STATUS
EFIAPI
Tpm2Clear (
- IN TPMI_RH_CLEAR AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
+ IN TPMI_RH_CLEAR AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
);
/**
@@ -185,9 +185,9 @@ Tpm2Clear (
EFI_STATUS
EFIAPI
Tpm2ClearControl (
- IN TPMI_RH_CLEAR AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
- IN TPMI_YES_NO Disable
+ IN TPMI_RH_CLEAR AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
+ IN TPMI_YES_NO Disable
);
/**
@@ -204,9 +204,9 @@ Tpm2ClearControl (
EFI_STATUS
EFIAPI
Tpm2HierarchyChangeAuth (
- IN TPMI_RH_HIERARCHY_AUTH AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession,
- IN TPM2B_AUTH *NewAuth
+ IN TPMI_RH_HIERARCHY_AUTH AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession,
+ IN TPM2B_AUTH *NewAuth
);
/**
@@ -222,8 +222,8 @@ Tpm2HierarchyChangeAuth (
EFI_STATUS
EFIAPI
Tpm2ChangeEPS (
- IN TPMI_RH_PLATFORM AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession
+ IN TPMI_RH_PLATFORM AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession
);
/**
@@ -239,8 +239,8 @@ Tpm2ChangeEPS (
EFI_STATUS
EFIAPI
Tpm2ChangePPS (
- IN TPMI_RH_PLATFORM AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession
+ IN TPMI_RH_PLATFORM AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession
);
/**
@@ -258,10 +258,10 @@ Tpm2ChangePPS (
EFI_STATUS
EFIAPI
Tpm2HierarchyControl (
- IN TPMI_RH_HIERARCHY AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession,
- IN TPMI_RH_HIERARCHY Hierarchy,
- IN TPMI_YES_NO State
+ IN TPMI_RH_HIERARCHY AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession,
+ IN TPMI_RH_HIERARCHY Hierarchy,
+ IN TPMI_YES_NO State
);
/**
@@ -277,8 +277,8 @@ Tpm2HierarchyControl (
EFI_STATUS
EFIAPI
Tpm2DictionaryAttackLockReset (
- IN TPMI_RH_LOCKOUT LockHandle,
- IN TPMS_AUTH_COMMAND *AuthSession
+ IN TPMI_RH_LOCKOUT LockHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession
);
/**
@@ -297,11 +297,11 @@ Tpm2DictionaryAttackLockReset (
EFI_STATUS
EFIAPI
Tpm2DictionaryAttackParameters (
- IN TPMI_RH_LOCKOUT LockHandle,
- IN TPMS_AUTH_COMMAND *AuthSession,
- IN UINT32 NewMaxTries,
- IN UINT32 NewRecoveryTime,
- IN UINT32 LockoutRecovery
+ IN TPMI_RH_LOCKOUT LockHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession,
+ IN UINT32 NewMaxTries,
+ IN UINT32 NewRecoveryTime,
+ IN UINT32 LockoutRecovery
);
/**
@@ -317,9 +317,9 @@ Tpm2DictionaryAttackParameters (
EFI_STATUS
EFIAPI
Tpm2NvReadPublic (
- IN TPMI_RH_NV_INDEX NvIndex,
- OUT TPM2B_NV_PUBLIC *NvPublic,
- OUT TPM2B_NAME *NvName
+ IN TPMI_RH_NV_INDEX NvIndex,
+ OUT TPM2B_NV_PUBLIC *NvPublic,
+ OUT TPM2B_NAME *NvName
);
/**
@@ -339,10 +339,10 @@ Tpm2NvReadPublic (
EFI_STATUS
EFIAPI
Tpm2NvDefineSpace (
- IN TPMI_RH_PROVISION AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
- IN TPM2B_AUTH *Auth,
- IN TPM2B_NV_PUBLIC *NvPublic
+ IN TPMI_RH_PROVISION AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
+ IN TPM2B_AUTH *Auth,
+ IN TPM2B_NV_PUBLIC *NvPublic
);
/**
@@ -359,9 +359,9 @@ Tpm2NvDefineSpace (
EFI_STATUS
EFIAPI
Tpm2NvUndefineSpace (
- IN TPMI_RH_PROVISION AuthHandle,
- IN TPMI_RH_NV_INDEX NvIndex,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
+ IN TPMI_RH_PROVISION AuthHandle,
+ IN TPMI_RH_NV_INDEX NvIndex,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
);
/**
@@ -381,12 +381,12 @@ Tpm2NvUndefineSpace (
EFI_STATUS
EFIAPI
Tpm2NvRead (
- IN TPMI_RH_NV_AUTH AuthHandle,
- IN TPMI_RH_NV_INDEX NvIndex,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
- IN UINT16 Size,
- IN UINT16 Offset,
- IN OUT TPM2B_MAX_BUFFER *OutData
+ IN TPMI_RH_NV_AUTH AuthHandle,
+ IN TPMI_RH_NV_INDEX NvIndex,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
+ IN UINT16 Size,
+ IN UINT16 Offset,
+ IN OUT TPM2B_MAX_BUFFER *OutData
);
/**
@@ -405,11 +405,11 @@ Tpm2NvRead (
EFI_STATUS
EFIAPI
Tpm2NvWrite (
- IN TPMI_RH_NV_AUTH AuthHandle,
- IN TPMI_RH_NV_INDEX NvIndex,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
- IN TPM2B_MAX_BUFFER *InData,
- IN UINT16 Offset
+ IN TPMI_RH_NV_AUTH AuthHandle,
+ IN TPMI_RH_NV_INDEX NvIndex,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
+ IN TPM2B_MAX_BUFFER *InData,
+ IN UINT16 Offset
);
/**
@@ -426,9 +426,9 @@ Tpm2NvWrite (
EFI_STATUS
EFIAPI
Tpm2NvReadLock (
- IN TPMI_RH_NV_AUTH AuthHandle,
- IN TPMI_RH_NV_INDEX NvIndex,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
+ IN TPMI_RH_NV_AUTH AuthHandle,
+ IN TPMI_RH_NV_INDEX NvIndex,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
);
/**
@@ -445,9 +445,9 @@ Tpm2NvReadLock (
EFI_STATUS
EFIAPI
Tpm2NvWriteLock (
- IN TPMI_RH_NV_AUTH AuthHandle,
- IN TPMI_RH_NV_INDEX NvIndex,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
+ IN TPMI_RH_NV_AUTH AuthHandle,
+ IN TPMI_RH_NV_INDEX NvIndex,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
);
/**
@@ -463,8 +463,8 @@ Tpm2NvWriteLock (
EFI_STATUS
EFIAPI
Tpm2NvGlobalWriteLock (
- IN TPMI_RH_PROVISION AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
+ IN TPMI_RH_PROVISION AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL
);
/**
@@ -481,8 +481,8 @@ Tpm2NvGlobalWriteLock (
EFI_STATUS
EFIAPI
Tpm2PcrExtend (
- IN TPMI_DH_PCR PcrHandle,
- IN TPML_DIGEST_VALUES *Digests
+ IN TPMI_DH_PCR PcrHandle,
+ IN TPML_DIGEST_VALUES *Digests
);
/**
@@ -503,9 +503,9 @@ Tpm2PcrExtend (
EFI_STATUS
EFIAPI
Tpm2PcrEvent (
- IN TPMI_DH_PCR PcrHandle,
- IN TPM2B_EVENT *EventData,
- OUT TPML_DIGEST_VALUES *Digests
+ IN TPMI_DH_PCR PcrHandle,
+ IN TPM2B_EVENT *EventData,
+ OUT TPML_DIGEST_VALUES *Digests
);
/**
@@ -522,10 +522,10 @@ Tpm2PcrEvent (
EFI_STATUS
EFIAPI
Tpm2PcrRead (
- IN TPML_PCR_SELECTION *PcrSelectionIn,
- OUT UINT32 *PcrUpdateCounter,
- OUT TPML_PCR_SELECTION *PcrSelectionOut,
- OUT TPML_DIGEST *PcrValues
+ IN TPML_PCR_SELECTION *PcrSelectionIn,
+ OUT UINT32 *PcrUpdateCounter,
+ OUT TPML_PCR_SELECTION *PcrSelectionOut,
+ OUT TPML_DIGEST *PcrValues
);
/**
@@ -545,13 +545,13 @@ Tpm2PcrRead (
EFI_STATUS
EFIAPI
Tpm2PcrAllocate (
- IN TPMI_RH_PLATFORM AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession,
- IN TPML_PCR_SELECTION *PcrAllocation,
- OUT TPMI_YES_NO *AllocationSuccess,
- OUT UINT32 *MaxPCR,
- OUT UINT32 *SizeNeeded,
- OUT UINT32 *SizeAvailable
+ IN TPMI_RH_PLATFORM AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession,
+ IN TPML_PCR_SELECTION *PcrAllocation,
+ OUT TPMI_YES_NO *AllocationSuccess,
+ OUT UINT32 *MaxPCR,
+ OUT UINT32 *SizeNeeded,
+ OUT UINT32 *SizeAvailable
);
/**
@@ -566,9 +566,9 @@ Tpm2PcrAllocate (
EFI_STATUS
EFIAPI
Tpm2PcrAllocateBanks (
- IN TPM2B_AUTH *PlatformAuth OPTIONAL,
- IN UINT32 SupportedPCRBanks,
- IN UINT32 PCRBanks
+ IN TPM2B_AUTH *PlatformAuth OPTIONAL,
+ IN UINT32 SupportedPCRBanks,
+ IN UINT32 PCRBanks
);
/**
@@ -599,11 +599,11 @@ Tpm2PcrAllocateBanks (
EFI_STATUS
EFIAPI
Tpm2GetCapability (
- IN TPM_CAP Capability,
- IN UINT32 Property,
- IN UINT32 PropertyCount,
- OUT TPMI_YES_NO *MoreData,
- OUT TPMS_CAPABILITY_DATA *CapabilityData
+ IN TPM_CAP Capability,
+ IN UINT32 Property,
+ IN UINT32 PropertyCount,
+ OUT TPMI_YES_NO *MoreData,
+ OUT TPMS_CAPABILITY_DATA *CapabilityData
);
/**
@@ -619,7 +619,7 @@ Tpm2GetCapability (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityFamily (
- OUT CHAR8 *Family
+ OUT CHAR8 *Family
);
/**
@@ -635,7 +635,7 @@ Tpm2GetCapabilityFamily (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityManufactureID (
- OUT UINT32 *ManufactureId
+ OUT UINT32 *ManufactureId
);
/**
@@ -652,8 +652,8 @@ Tpm2GetCapabilityManufactureID (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityFirmwareVersion (
- OUT UINT32 *FirmwareVersion1,
- OUT UINT32 *FirmwareVersion2
+ OUT UINT32 *FirmwareVersion1,
+ OUT UINT32 *FirmwareVersion2
);
/**
@@ -670,8 +670,8 @@ Tpm2GetCapabilityFirmwareVersion (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityMaxCommandResponseSize (
- OUT UINT32 *MaxCommandSize,
- OUT UINT32 *MaxResponseSize
+ OUT UINT32 *MaxCommandSize,
+ OUT UINT32 *MaxResponseSize
);
/**
@@ -688,7 +688,7 @@ Tpm2GetCapabilityMaxCommandResponseSize (
EFI_STATUS
EFIAPI
Tpm2GetCapabilitySupportedAlg (
- OUT TPML_ALG_PROPERTY *AlgList
+ OUT TPML_ALG_PROPERTY *AlgList
);
/**
@@ -704,7 +704,7 @@ Tpm2GetCapabilitySupportedAlg (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityLockoutCounter (
- OUT UINT32 *LockoutCounter
+ OUT UINT32 *LockoutCounter
);
/**
@@ -720,7 +720,7 @@ Tpm2GetCapabilityLockoutCounter (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityLockoutInterval (
- OUT UINT32 *LockoutInterval
+ OUT UINT32 *LockoutInterval
);
/**
@@ -737,7 +737,7 @@ Tpm2GetCapabilityLockoutInterval (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityInputBufferSize (
- OUT UINT32 *InputBufferSize
+ OUT UINT32 *InputBufferSize
);
/**
@@ -753,7 +753,7 @@ Tpm2GetCapabilityInputBufferSize (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityPcrs (
- OUT TPML_PCR_SELECTION *Pcrs
+ OUT TPML_PCR_SELECTION *Pcrs
);
/**
@@ -769,9 +769,9 @@ Tpm2GetCapabilityPcrs (
**/
EFI_STATUS
EFIAPI
-Tpm2GetCapabilitySupportedAndActivePcrs(
- OUT UINT32 *TpmHashAlgorithmBitmap,
- OUT UINT32 *ActivePcrBanks
+Tpm2GetCapabilitySupportedAndActivePcrs (
+ OUT UINT32 *TpmHashAlgorithmBitmap,
+ OUT UINT32 *ActivePcrBanks
);
/**
@@ -787,7 +787,7 @@ Tpm2GetCapabilitySupportedAndActivePcrs(
EFI_STATUS
EFIAPI
Tpm2GetCapabilityAlgorithmSet (
- OUT UINT32 *AlgorithmSet
+ OUT UINT32 *AlgorithmSet
);
/**
@@ -802,8 +802,8 @@ Tpm2GetCapabilityAlgorithmSet (
EFI_STATUS
EFIAPI
Tpm2GetCapabilityIsCommandImplemented (
- IN TPM_CC Command,
- OUT BOOLEAN *IsCmdImpl
+ IN TPM_CC Command,
+ OUT BOOLEAN *IsCmdImpl
);
/**
@@ -817,7 +817,7 @@ Tpm2GetCapabilityIsCommandImplemented (
EFI_STATUS
EFIAPI
Tpm2TestParms (
- IN TPMT_PUBLIC_PARMS *Parameters
+ IN TPMT_PUBLIC_PARMS *Parameters
);
/**
@@ -835,9 +835,9 @@ Tpm2TestParms (
EFI_STATUS
EFIAPI
Tpm2SetAlgorithmSet (
- IN TPMI_RH_PLATFORM AuthHandle,
- IN TPMS_AUTH_COMMAND *AuthSession,
- IN UINT32 AlgorithmSet
+ IN TPMI_RH_PLATFORM AuthHandle,
+ IN TPMS_AUTH_COMMAND *AuthSession,
+ IN UINT32 AlgorithmSet
);
/**
@@ -860,15 +860,15 @@ Tpm2SetAlgorithmSet (
EFI_STATUS
EFIAPI
Tpm2StartAuthSession (
- IN TPMI_DH_OBJECT TpmKey,
- IN TPMI_DH_ENTITY Bind,
- IN TPM2B_NONCE *NonceCaller,
- IN TPM2B_ENCRYPTED_SECRET *Salt,
- IN TPM_SE SessionType,
- IN TPMT_SYM_DEF *Symmetric,
- IN TPMI_ALG_HASH AuthHash,
- OUT TPMI_SH_AUTH_SESSION *SessionHandle,
- OUT TPM2B_NONCE *NonceTPM
+ IN TPMI_DH_OBJECT TpmKey,
+ IN TPMI_DH_ENTITY Bind,
+ IN TPM2B_NONCE *NonceCaller,
+ IN TPM2B_ENCRYPTED_SECRET *Salt,
+ IN TPM_SE SessionType,
+ IN TPMT_SYM_DEF *Symmetric,
+ IN TPMI_ALG_HASH AuthHash,
+ OUT TPMI_SH_AUTH_SESSION *SessionHandle,
+ OUT TPM2B_NONCE *NonceTPM
);
/**
@@ -882,7 +882,7 @@ Tpm2StartAuthSession (
EFI_STATUS
EFIAPI
Tpm2FlushContext (
- IN TPMI_DH_CONTEXT FlushHandle
+ IN TPMI_DH_CONTEXT FlushHandle
);
/**
@@ -906,15 +906,15 @@ Tpm2FlushContext (
EFI_STATUS
EFIAPI
Tpm2PolicySecret (
- IN TPMI_DH_ENTITY AuthHandle,
- IN TPMI_SH_POLICY PolicySession,
- IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
- IN TPM2B_NONCE *NonceTPM,
- IN TPM2B_DIGEST *CpHashA,
- IN TPM2B_NONCE *PolicyRef,
- IN INT32 Expiration,
- OUT TPM2B_TIMEOUT *Timeout,
- OUT TPMT_TK_AUTH *PolicyTicket
+ IN TPMI_DH_ENTITY AuthHandle,
+ IN TPMI_SH_POLICY PolicySession,
+ IN TPMS_AUTH_COMMAND *AuthSession OPTIONAL,
+ IN TPM2B_NONCE *NonceTPM,
+ IN TPM2B_DIGEST *CpHashA,
+ IN TPM2B_NONCE *PolicyRef,
+ IN INT32 Expiration,
+ OUT TPM2B_TIMEOUT *Timeout,
+ OUT TPMT_TK_AUTH *PolicyTicket
);
/**
@@ -932,8 +932,8 @@ Tpm2PolicySecret (
EFI_STATUS
EFIAPI
Tpm2PolicyOR (
- IN TPMI_SH_POLICY PolicySession,
- IN TPML_DIGEST *HashList
+ IN TPMI_SH_POLICY PolicySession,
+ IN TPML_DIGEST *HashList
);
/**
@@ -948,8 +948,8 @@ Tpm2PolicyOR (
EFI_STATUS
EFIAPI
Tpm2PolicyCommandCode (
- IN TPMI_SH_POLICY PolicySession,
- IN TPM_CC Code
+ IN TPMI_SH_POLICY PolicySession,
+ IN TPM_CC Code
);
/**
@@ -965,8 +965,8 @@ Tpm2PolicyCommandCode (
EFI_STATUS
EFIAPI
Tpm2PolicyGetDigest (
- IN TPMI_SH_POLICY PolicySession,
- OUT TPM2B_DIGEST *PolicyHash
+ IN TPMI_SH_POLICY PolicySession,
+ OUT TPM2B_DIGEST *PolicyHash
);
/**
@@ -983,10 +983,10 @@ Tpm2PolicyGetDigest (
EFI_STATUS
EFIAPI
Tpm2ReadPublic (
- IN TPMI_DH_OBJECT ObjectHandle,
- OUT TPM2B_PUBLIC *OutPublic,
- OUT TPM2B_NAME *Name,
- OUT TPM2B_NAME *QualifiedName
+ IN TPMI_DH_OBJECT ObjectHandle,
+ OUT TPM2B_PUBLIC *OutPublic,
+ OUT TPM2B_NAME *Name,
+ OUT TPM2B_NAME *QualifiedName
);
//
@@ -1004,8 +1004,8 @@ Tpm2ReadPublic (
UINT32
EFIAPI
CopyAuthSessionCommand (
- IN TPMS_AUTH_COMMAND *AuthSessionIn OPTIONAL,
- OUT UINT8 *AuthSessionOut
+ IN TPMS_AUTH_COMMAND *AuthSessionIn OPTIONAL,
+ OUT UINT8 *AuthSessionOut
);
/**
@@ -1019,8 +1019,8 @@ CopyAuthSessionCommand (
UINT32
EFIAPI
CopyAuthSessionResponse (
- IN UINT8 *AuthSessionIn,
- OUT TPMS_AUTH_RESPONSE *AuthSessionOut OPTIONAL
+ IN UINT8 *AuthSessionIn,
+ OUT TPMS_AUTH_RESPONSE *AuthSessionOut OPTIONAL
);
/**
@@ -1033,7 +1033,7 @@ CopyAuthSessionResponse (
UINT16
EFIAPI
GetHashSizeFromAlgo (
- IN TPMI_ALG_HASH HashAlgo
+ IN TPMI_ALG_HASH HashAlgo
);
/**
@@ -1046,7 +1046,7 @@ GetHashSizeFromAlgo (
UINT32
EFIAPI
GetHashMaskFromAlgo (
- IN TPMI_ALG_HASH HashAlgo
+ IN TPMI_ALG_HASH HashAlgo
);
/**
@@ -1060,7 +1060,7 @@ GetHashMaskFromAlgo (
**/
BOOLEAN
EFIAPI
-IsHashAlgSupportedInHashAlgorithmMask(
+IsHashAlgSupportedInHashAlgorithmMask (
IN TPMI_ALG_HASH HashAlg,
IN UINT32 HashAlgorithmMask
);
@@ -1076,10 +1076,10 @@ IsHashAlgSupportedInHashAlgorithmMask(
**/
VOID *
EFIAPI
-CopyDigestListToBuffer(
- IN OUT VOID *Buffer,
- IN TPML_DIGEST_VALUES *DigestList,
- IN UINT32 HashAlgorithmMask
+CopyDigestListToBuffer (
+ IN OUT VOID *Buffer,
+ IN TPML_DIGEST_VALUES *DigestList,
+ IN UINT32 HashAlgorithmMask
);
/**
@@ -1091,8 +1091,8 @@ CopyDigestListToBuffer(
**/
UINT32
EFIAPI
-GetDigestListSize(
- IN TPML_DIGEST_VALUES *DigestList
+GetDigestListSize (
+ IN TPML_DIGEST_VALUES *DigestList
);
/**
@@ -1107,10 +1107,10 @@ GetDigestListSize(
**/
EFI_STATUS
EFIAPI
-GetDigestFromDigestList(
- IN TPMI_ALG_HASH HashAlg,
- IN TPML_DIGEST_VALUES *DigestList,
- OUT VOID *Digest
+GetDigestFromDigestList (
+ IN TPMI_ALG_HASH HashAlg,
+ IN TPML_DIGEST_VALUES *DigestList,
+ OUT VOID *Digest
);
#endif
diff --git a/SecurityPkg/Include/Library/Tpm2DeviceLib.h b/SecurityPkg/Include/Library/Tpm2DeviceLib.h
index 24fdb5b..783bfa5 100644
--- a/SecurityPkg/Include/Library/Tpm2DeviceLib.h
+++ b/SecurityPkg/Include/Library/Tpm2DeviceLib.h
@@ -36,10 +36,10 @@ typedef enum {
EFI_STATUS
EFIAPI
Tpm2SubmitCommand (
- IN UINT32 InputParameterBlockSize,
- IN UINT8 *InputParameterBlock,
- IN OUT UINT32 *OutputParameterBlockSize,
- IN UINT8 *OutputParameterBlock
+ IN UINT32 InputParameterBlockSize,
+ IN UINT8 *InputParameterBlock,
+ IN OUT UINT32 *OutputParameterBlockSize,
+ IN UINT8 *OutputParameterBlock
);
/**
@@ -69,7 +69,7 @@ Tpm2RequestUseTpm (
**/
typedef
EFI_STATUS
-(EFIAPI *TPM2_SUBMIT_COMMAND) (
+(EFIAPI *TPM2_SUBMIT_COMMAND)(
IN UINT32 InputParameterBlockSize,
IN UINT8 *InputParameterBlock,
IN OUT UINT32 *OutputParameterBlockSize,
@@ -85,14 +85,14 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI *TPM2_REQUEST_USE_TPM) (
+(EFIAPI *TPM2_REQUEST_USE_TPM)(
VOID
);
typedef struct {
- EFI_GUID ProviderGuid;
- TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;
- TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;
+ EFI_GUID ProviderGuid;
+ TPM2_SUBMIT_COMMAND Tpm2SubmitCommand;
+ TPM2_REQUEST_USE_TPM Tpm2RequestUseTpm;
} TPM2_DEVICE_INTERFACE;
/**
@@ -107,7 +107,7 @@ typedef struct {
EFI_STATUS
EFIAPI
Tpm2RegisterTpm2DeviceLib (
- IN TPM2_DEVICE_INTERFACE *Tpm2Device
+ IN TPM2_DEVICE_INTERFACE *Tpm2Device
);
#endif
diff --git a/SecurityPkg/Include/Library/TpmCommLib.h b/SecurityPkg/Include/Library/TpmCommLib.h
index 1d18f8d..4810ce4 100644
--- a/SecurityPkg/Include/Library/TpmCommLib.h
+++ b/SecurityPkg/Include/Library/TpmCommLib.h
@@ -12,12 +12,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <IndustryStandard/Tpm12.h>
-typedef EFI_HANDLE TIS_TPM_HANDLE;
+typedef EFI_HANDLE TIS_TPM_HANDLE;
///
/// TPM register base address.
///
-#define TPM_BASE_ADDRESS 0xfed40000
+#define TPM_BASE_ADDRESS 0xfed40000
//
// Set structure alignment to 1-byte
@@ -31,75 +31,75 @@ typedef struct {
///
/// Used to gain ownership for this particular port.
///
- UINT8 Access; // 0
- UINT8 Reserved1[7]; // 1
+ UINT8 Access; // 0
+ UINT8 Reserved1[7]; // 1
///
/// Controls interrupts.
///
- UINT32 IntEnable; // 8
+ UINT32 IntEnable; // 8
///
/// SIRQ vector to be used by the TPM.
///
- UINT8 IntVector; // 0ch
- UINT8 Reserved2[3]; // 0dh
+ UINT8 IntVector; // 0ch
+ UINT8 Reserved2[3]; // 0dh
///
/// What caused interrupt.
///
- UINT32 IntSts; // 10h
+ UINT32 IntSts; // 10h
///
/// Shows which interrupts are supported by that particular TPM.
///
- UINT32 IntfCapability; // 14h
+ UINT32 IntfCapability; // 14h
///
/// Status Register. Provides status of the TPM.
///
- UINT8 Status; // 18h
+ UINT8 Status; // 18h
///
/// Number of consecutive writes that can be done to the TPM.
///
- UINT16 BurstCount; // 19h
- UINT8 Reserved3[9];
+ UINT16 BurstCount; // 19h
+ UINT8 Reserved3[9];
///
/// Read or write FIFO, depending on transaction.
///
- UINT32 DataFifo; // 24
- UINT8 Reserved4[0xed8]; // 28h
+ UINT32 DataFifo; // 24
+ UINT8 Reserved4[0xed8]; // 28h
///
/// Vendor ID
///
- UINT16 Vid; // 0f00h
+ UINT16 Vid; // 0f00h
///
/// Device ID
///
- UINT16 Did; // 0f02h
+ UINT16 Did; // 0f02h
///
/// Revision ID
///
- UINT8 Rid; // 0f04h
+ UINT8 Rid; // 0f04h
///
/// TCG defined configuration registers.
///
- UINT8 TcgDefined[0x7b]; // 0f05h
+ UINT8 TcgDefined[0x7b]; // 0f05h
///
/// Alias to I/O legacy space.
///
- UINT32 LegacyAddress1; // 0f80h
+ UINT32 LegacyAddress1; // 0f80h
///
/// Additional 8 bits for I/O legacy space extension.
///
- UINT32 LegacyAddress1Ex; // 0f84h
+ UINT32 LegacyAddress1Ex; // 0f84h
///
/// Alias to second I/O legacy space.
///
- UINT32 LegacyAddress2; // 0f88h
+ UINT32 LegacyAddress2; // 0f88h
///
/// Additional 8 bits for second I/O legacy space extension.
///
- UINT32 LegacyAddress2Ex; // 0f8ch
+ UINT32 LegacyAddress2Ex; // 0f8ch
///
/// Vendor-defined configuration registers.
///
- UINT8 VendorDefined[0x70];// 0f90h
+ UINT8 VendorDefined[0x70]; // 0f90h
} TIS_PC_REGISTERS;
//
@@ -110,13 +110,13 @@ typedef struct {
//
// Define pointer types used to access TIS registers on PC
//
-typedef TIS_PC_REGISTERS *TIS_PC_REGISTERS_PTR;
+typedef TIS_PC_REGISTERS *TIS_PC_REGISTERS_PTR;
//
// TCG Platform Type based on TCG ACPI Specification Version 1.00
//
-#define TCG_PLATFORM_TYPE_CLIENT 0
-#define TCG_PLATFORM_TYPE_SERVER 1
+#define TCG_PLATFORM_TYPE_CLIENT 0
+#define TCG_PLATFORM_TYPE_SERVER 1
//
// Define bits of ACCESS and STATUS registers
@@ -125,69 +125,69 @@ typedef TIS_PC_REGISTERS *TIS_PC_REGISTERS_PTR;
///
/// This bit is a 1 to indicate that the other bits in this register are valid.
///
-#define TIS_PC_VALID BIT7
+#define TIS_PC_VALID BIT7
///
/// Indicate that this locality is active.
///
-#define TIS_PC_ACC_ACTIVE BIT5
+#define TIS_PC_ACC_ACTIVE BIT5
///
/// Set to 1 to indicate that this locality had the TPM taken away while
/// this locality had the TIS_PC_ACC_ACTIVE bit set.
///
-#define TIS_PC_ACC_SEIZED BIT4
+#define TIS_PC_ACC_SEIZED BIT4
///
/// Set to 1 to indicate that TPM MUST reset the
/// TIS_PC_ACC_ACTIVE bit and remove ownership for localities less than the
/// locality that is writing this bit.
///
-#define TIS_PC_ACC_SEIZE BIT3
+#define TIS_PC_ACC_SEIZE BIT3
///
/// When this bit is 1, another locality is requesting usage of the TPM.
///
-#define TIS_PC_ACC_PENDIND BIT2
+#define TIS_PC_ACC_PENDIND BIT2
///
/// Set to 1 to indicate that this locality is requesting to use TPM.
///
-#define TIS_PC_ACC_RQUUSE BIT1
+#define TIS_PC_ACC_RQUUSE BIT1
///
/// A value of 1 indicates that a T/OS has not been established on the platform
///
-#define TIS_PC_ACC_ESTABLISH BIT0
+#define TIS_PC_ACC_ESTABLISH BIT0
///
/// When this bit is 1, TPM is in the Ready state,
/// indicating it is ready to receive a new command.
///
-#define TIS_PC_STS_READY BIT6
+#define TIS_PC_STS_READY BIT6
///
/// Write a 1 to this bit to cause the TPM to execute that command.
///
-#define TIS_PC_STS_GO BIT5
+#define TIS_PC_STS_GO BIT5
///
/// This bit indicates that the TPM has data available as a response.
///
-#define TIS_PC_STS_DATA BIT4
+#define TIS_PC_STS_DATA BIT4
///
/// The TPM sets this bit to a value of 1 when it expects another byte of data for a command.
///
-#define TIS_PC_STS_EXPECT BIT3
+#define TIS_PC_STS_EXPECT BIT3
///
/// Writes a 1 to this bit to force the TPM to re-send the response.
///
-#define TIS_PC_STS_RETRY BIT1
+#define TIS_PC_STS_RETRY BIT1
//
// Default TimeOut value
//
-#define TIS_TIMEOUT_A 750 * 1000 // 750ms
-#define TIS_TIMEOUT_B 2000 * 1000 // 2s
-#define TIS_TIMEOUT_C 750 * 1000 // 750ms
-#define TIS_TIMEOUT_D 750 * 1000 // 750ms
+#define TIS_TIMEOUT_A 750 * 1000 // 750ms
+#define TIS_TIMEOUT_B 2000 * 1000 // 2s
+#define TIS_TIMEOUT_C 750 * 1000 // 750ms
+#define TIS_TIMEOUT_D 750 * 1000 // 750ms
//
// Max TPM command/response length
//
-#define TPMCMDBUFLENGTH 1024
+#define TPMCMDBUFLENGTH 1024
/**
Check whether the value of a TPM chip register satisfies the input BIT setting.
diff --git a/SecurityPkg/Include/Library/VariableKeyLib.h b/SecurityPkg/Include/Library/VariableKeyLib.h
index c805e2d..561ebad 100644
--- a/SecurityPkg/Include/Library/VariableKeyLib.h
+++ b/SecurityPkg/Include/Library/VariableKeyLib.h
@@ -25,8 +25,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
GetVariableKey (
- OUT VOID **VariableKey,
- IN OUT UINTN *VariableKeySize
+ OUT VOID **VariableKey,
+ IN OUT UINTN *VariableKeySize
);
/**
@@ -57,4 +57,3 @@ LockVariableKeyInterface (
);
#endif
-
diff --git a/SecurityPkg/Include/Ppi/FirmwareVolumeInfoMeasurementExcluded.h b/SecurityPkg/Include/Ppi/FirmwareVolumeInfoMeasurementExcluded.h
index 18095b5..5f4f719 100644
--- a/SecurityPkg/Include/Ppi/FirmwareVolumeInfoMeasurementExcluded.h
+++ b/SecurityPkg/Include/Ppi/FirmwareVolumeInfoMeasurementExcluded.h
@@ -13,19 +13,18 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
{ 0x6e056ff9, 0xc695, 0x4364, { 0x9e, 0x2c, 0x61, 0x26, 0xf5, 0xce, 0xea, 0xae } }
typedef struct {
- EFI_PHYSICAL_ADDRESS FvBase;
- UINT64 FvLength;
+ EFI_PHYSICAL_ADDRESS FvBase;
+ UINT64 FvLength;
} EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_FV;
//
// This PPI means a FV does not need to be extended to PCR by TCG modules.
//
typedef struct {
- UINT32 Count;
- EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_FV Fv[1];
+ UINT32 Count;
+ EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_FV Fv[1];
} EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI;
-extern EFI_GUID gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid;
+extern EFI_GUID gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid;
#endif
-
diff --git a/SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h b/SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h
index 1b7320e..71f2be3 100644
--- a/SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h
+++ b/SecurityPkg/Include/Ppi/FirmwareVolumeInfoPrehashedFV.h
@@ -18,9 +18,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
// HashAlgoId is TPM_ALG_ID in Tpm20.h
//
typedef struct _HASH_INFO {
- UINT16 HashAlgoId;
- UINT16 HashSize;
- //UINT8 Hash[];
+ UINT16 HashAlgoId;
+ UINT16 HashSize;
+ // UINT8 Hash[];
} HASH_INFO;
//
@@ -32,13 +32,12 @@ typedef struct _HASH_INFO {
// else, drops PPI data and calculate all hash again
//
typedef struct {
- UINT32 FvBase;
- UINT32 FvLength;
- UINT32 Count;
- //HASH_INFO HashInfo[];
+ UINT32 FvBase;
+ UINT32 FvLength;
+ UINT32 Count;
+ // HASH_INFO HashInfo[];
} EDKII_PEI_FIRMWARE_VOLUME_INFO_PREHASHED_FV_PPI;
-extern EFI_GUID gEdkiiPeiFirmwareVolumeInfoPrehashedFvPpiGuid;
+extern EFI_GUID gEdkiiPeiFirmwareVolumeInfoPrehashedFvPpiGuid;
#endif
-
diff --git a/SecurityPkg/Include/Ppi/FirmwareVolumeInfoStoredHashFv.h b/SecurityPkg/Include/Ppi/FirmwareVolumeInfoStoredHashFv.h
index 42f2748..68eee92 100644
--- a/SecurityPkg/Include/Ppi/FirmwareVolumeInfoStoredHashFv.h
+++ b/SecurityPkg/Include/Ppi/FirmwareVolumeInfoStoredHashFv.h
@@ -18,32 +18,32 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
// Hashed FV flags.
//
-#define HASHED_FV_FLAG_REPORT_FV_INFO_PPI 0x0000000000000001
-#define HASHED_FV_FLAG_REPORT_FV_HOB 0x0000000000000002
-#define HASHED_FV_FLAG_VERIFIED_BOOT 0x0000000000000010
-#define HASHED_FV_FLAG_MEASURED_BOOT 0x0000000000000020
-#define HASHED_FV_FLAG_SKIP_ALL 0xFFFFFFFFFFFFFF00
-#define HASHED_FV_FLAG_SKIP_BOOT_MODE(Mode) LShiftU64 (0x100, (Mode))
+#define HASHED_FV_FLAG_REPORT_FV_INFO_PPI 0x0000000000000001
+#define HASHED_FV_FLAG_REPORT_FV_HOB 0x0000000000000002
+#define HASHED_FV_FLAG_VERIFIED_BOOT 0x0000000000000010
+#define HASHED_FV_FLAG_MEASURED_BOOT 0x0000000000000020
+#define HASHED_FV_FLAG_SKIP_ALL 0xFFFFFFFFFFFFFF00
+#define HASHED_FV_FLAG_SKIP_BOOT_MODE(Mode) LShiftU64 (0x100, (Mode))
//
// FV hash flags
//
-#define FV_HASH_FLAG_BOOT_MODE(Mode) LShiftU64 (0x100, (Mode))
+#define FV_HASH_FLAG_BOOT_MODE(Mode) LShiftU64 (0x100, (Mode))
typedef struct _EDKII_PEI_FIRMWARE_VOLUME_INFO_STORED_HASH_FV_PPI
EDKII_PEI_FIRMWARE_VOLUME_INFO_STORED_HASH_FV_PPI;
typedef struct _HASHED_FV_INFO {
- UINT64 Base;
- UINT64 Length;
- UINT64 Flag;
+ UINT64 Base;
+ UINT64 Length;
+ UINT64 Flag;
} HASHED_FV_INFO;
typedef struct _FV_HASH_INFO {
- UINT64 HashFlag;
- UINT16 HashAlgoId;
- UINT16 HashSize;
- UINT8 Hash[64];
+ UINT64 HashFlag;
+ UINT16 HashAlgoId;
+ UINT16 HashSize;
+ UINT8 Hash[64];
} FV_HASH_INFO;
//
@@ -51,12 +51,11 @@ typedef struct _FV_HASH_INFO {
// instance of this PPI is allowed in the platform.
//
struct _EDKII_PEI_FIRMWARE_VOLUME_INFO_STORED_HASH_FV_PPI {
- FV_HASH_INFO HashInfo;
- UINTN FvNumber;
- HASHED_FV_INFO FvInfo[1];
+ FV_HASH_INFO HashInfo;
+ UINTN FvNumber;
+ HASHED_FV_INFO FvInfo[1];
};
-extern EFI_GUID gEdkiiPeiFirmwareVolumeInfoStoredHashFvPpiGuid;
+extern EFI_GUID gEdkiiPeiFirmwareVolumeInfoStoredHashFvPpiGuid;
#endif
-
diff --git a/SecurityPkg/Include/Ppi/LockPhysicalPresence.h b/SecurityPkg/Include/Ppi/LockPhysicalPresence.h
index 9025314..648cbe3 100644
--- a/SecurityPkg/Include/Ppi/LockPhysicalPresence.h
+++ b/SecurityPkg/Include/Ppi/LockPhysicalPresence.h
@@ -37,7 +37,7 @@ typedef
BOOLEAN
(EFIAPI *PEI_LOCK_PHYSICAL_PRESENCE)(
IN CONST EFI_PEI_SERVICES **PeiServices
-);
+ );
///
/// This service abstracts TPM physical presence lock interface. It is necessary for
@@ -46,9 +46,9 @@ BOOLEAN
/// PEIM and consumed by the TPM PEIM.
///
struct _PEI_LOCK_PHYSICAL_PRESENCE_PPI {
- PEI_LOCK_PHYSICAL_PRESENCE LockPhysicalPresence;
+ PEI_LOCK_PHYSICAL_PRESENCE LockPhysicalPresence;
};
extern EFI_GUID gPeiLockPhysicalPresencePpiGuid;
-#endif // __PEI_LOCK_PHYSICAL_PRESENCE_H__
+#endif // __PEI_LOCK_PHYSICAL_PRESENCE_H__
diff --git a/SecurityPkg/Include/Ppi/Tcg.h b/SecurityPkg/Include/Ppi/Tcg.h
index 22f47f9..258ba78 100644
--- a/SecurityPkg/Include/Ppi/Tcg.h
+++ b/SecurityPkg/Include/Ppi/Tcg.h
@@ -57,9 +57,9 @@ EFI_STATUS
/// The EFI_TCG Protocol abstracts TCG activity.
///
struct _EDKII_TCG_PPI {
- EDKII_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent;
+ EDKII_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent;
};
-extern EFI_GUID gEdkiiTcgPpiGuid;
+extern EFI_GUID gEdkiiTcgPpiGuid;
#endif
diff --git a/SecurityPkg/Include/Ppi/TpmInitialized.h b/SecurityPkg/Include/Ppi/TpmInitialized.h
index b7a47b0..86ee3fc 100644
--- a/SecurityPkg/Include/Ppi/TpmInitialized.h
+++ b/SecurityPkg/Include/Ppi/TpmInitialized.h
@@ -19,7 +19,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
0xe9db0d58, 0xd48d, 0x47f6, 0x9c, 0x6e, 0x6f, 0x40, 0xe8, 0x6c, 0x7b, 0x41 \
}
-extern EFI_GUID gPeiTpmInitializedPpiGuid;
+extern EFI_GUID gPeiTpmInitializedPpiGuid;
///
/// Global ID for the PEI_TPM_INITIALIZATION_DONE_PPI which always uses a NULL interface.
@@ -29,6 +29,6 @@ extern EFI_GUID gPeiTpmInitializedPpiGuid;
0xa030d115, 0x54dd, 0x447b, { 0x90, 0x64, 0xf2, 0x6, 0x88, 0x3d, 0x7c, 0xcc \
}
-extern EFI_GUID gPeiTpmInitializationDonePpiGuid;
+extern EFI_GUID gPeiTpmInitializationDonePpiGuid;
#endif