diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:05 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 2f88bd3a1296c522317f1c21377876de63de5be7 (patch) | |
tree | ba47875489cc5698061275a495983e9dea3be098 /MdePkg/Include/IndustryStandard/Spdm.h | |
parent | 1436aea4d5707e672672a11bda72be2c63c936c3 (diff) | |
download | edk2-2f88bd3a1296c522317f1c21377876de63de5be7.tar.gz edk2-2f88bd3a1296c522317f1c21377876de63de5be7.tar.bz2 edk2-2f88bd3a1296c522317f1c21377876de63de5be7.zip |
MdePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the MdePkg 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: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdePkg/Include/IndustryStandard/Spdm.h')
-rw-r--r-- | MdePkg/Include/IndustryStandard/Spdm.h | 246 |
1 files changed, 122 insertions, 124 deletions
diff --git a/MdePkg/Include/IndustryStandard/Spdm.h b/MdePkg/Include/IndustryStandard/Spdm.h index 38ec7748a7..4ec7a5ed1f 100644 --- a/MdePkg/Include/IndustryStandard/Spdm.h +++ b/MdePkg/Include/IndustryStandard/Spdm.h @@ -7,7 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/
-
#ifndef __SPDM_H__
#define __SPDM_H__
@@ -16,15 +15,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent ///
/// SPDM response code
///
-#define SPDM_DIGESTS 0x01
-#define SPDM_CERTIFICATE 0x02
-#define SPDM_CHALLENGE_AUTH 0x03
-#define SPDM_VERSION 0x04
-#define SPDM_MEASUREMENTS 0x60
-#define SPDM_CAPABILITIES 0x61
-#define SPDM_SET_CERT_RESPONSE 0x62
-#define SPDM_ALGORITHMS 0x63
-#define SPDM_ERROR 0x7F
+#define SPDM_DIGESTS 0x01
+#define SPDM_CERTIFICATE 0x02
+#define SPDM_CHALLENGE_AUTH 0x03
+#define SPDM_VERSION 0x04
+#define SPDM_MEASUREMENTS 0x60
+#define SPDM_CAPABILITIES 0x61
+#define SPDM_SET_CERT_RESPONSE 0x62
+#define SPDM_ALGORITHMS 0x63
+#define SPDM_ERROR 0x7F
///
/// SPDM request code
///
@@ -41,10 +40,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// SPDM message header
///
typedef struct {
- UINT8 SPDMVersion;
- UINT8 RequestResponseCode;
- UINT8 Param1;
- UINT8 Param2;
+ UINT8 SPDMVersion;
+ UINT8 RequestResponseCode;
+ UINT8 Param1;
+ UINT8 Param2;
} SPDM_MESSAGE_HEADER;
#define SPDM_MESSAGE_VERSION 0x10
@@ -53,211 +52,211 @@ typedef struct { /// SPDM GET_VERSION request
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
+ SPDM_MESSAGE_HEADER Header;
} SPDM_GET_VERSION_REQUEST;
///
/// SPDM GET_VERSION response
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT8 Reserved;
- UINT8 VersionNumberEntryCount;
-//SPDM_VERSION_NUMBER VersionNumberEntry[VersionNumberEntryCount];
+ SPDM_MESSAGE_HEADER Header;
+ UINT8 Reserved;
+ UINT8 VersionNumberEntryCount;
+ // SPDM_VERSION_NUMBER VersionNumberEntry[VersionNumberEntryCount];
} SPDM_VERSION_RESPONSE;
///
/// SPDM VERSION structure
///
typedef struct {
- UINT16 Alpha:4;
- UINT16 UpdateVersionNumber:4;
- UINT16 MinorVersion:4;
- UINT16 MajorVersion:4;
+ UINT16 Alpha : 4;
+ UINT16 UpdateVersionNumber : 4;
+ UINT16 MinorVersion : 4;
+ UINT16 MajorVersion : 4;
} SPDM_VERSION_NUMBER;
///
/// SPDM GET_CAPABILITIES request
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
+ SPDM_MESSAGE_HEADER Header;
} SPDM_GET_CAPABILITIES_REQUEST;
///
/// SPDM GET_CAPABILITIES response
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT8 Reserved;
- UINT8 CTExponent;
- UINT16 Reserved2;
- UINT32 Flags;
+ SPDM_MESSAGE_HEADER Header;
+ UINT8 Reserved;
+ UINT8 CTExponent;
+ UINT16 Reserved2;
+ UINT32 Flags;
} SPDM_CAPABILITIES_RESPONSE;
///
/// SPDM GET_CAPABILITIES response Flags
///
-#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CACHE_CAP BIT0
-#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CERT_CAP BIT1
-#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CHAL_CAP BIT2
-#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP (BIT3 | BIT4)
-#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_NO_SIG BIT3
-#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_SIG BIT4
-#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_FRESH_CAP BIT5
+#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CACHE_CAP BIT0
+#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CERT_CAP BIT1
+#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CHAL_CAP BIT2
+#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP (BIT3 | BIT4)
+#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_NO_SIG BIT3
+#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_SIG BIT4
+#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_FRESH_CAP BIT5
///
/// SPDM NEGOTIATE_ALGORITHMS request
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT16 Length;
- UINT8 MeasurementSpecification;
- UINT8 Reserved;
- UINT32 BaseAsymAlgo;
- UINT32 BaseHashAlgo;
- UINT8 Reserved2[12];
- UINT8 ExtAsymCount;
- UINT8 ExtHashCount;
- UINT16 Reserved3;
-//UINT32 ExtAsym[ExtAsymCount];
-//UINT32 ExtHash[ExtHashCount];
+ SPDM_MESSAGE_HEADER Header;
+ UINT16 Length;
+ UINT8 MeasurementSpecification;
+ UINT8 Reserved;
+ UINT32 BaseAsymAlgo;
+ UINT32 BaseHashAlgo;
+ UINT8 Reserved2[12];
+ UINT8 ExtAsymCount;
+ UINT8 ExtHashCount;
+ UINT16 Reserved3;
+ // UINT32 ExtAsym[ExtAsymCount];
+ // UINT32 ExtHash[ExtHashCount];
} SPDM_NEGOTIATE_ALGORITHMS_REQUEST;
///
/// SPDM NEGOTIATE_ALGORITHMS request BaseAsymAlgo
///
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_2048 BIT0
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_2048 BIT1
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_3072 BIT2
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_3072 BIT3
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P256 BIT4
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_4096 BIT5
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_4096 BIT6
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P384 BIT7
-#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P521 BIT8
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_2048 BIT0
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_2048 BIT1
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_3072 BIT2
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_3072 BIT3
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P256 BIT4
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_4096 BIT5
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_4096 BIT6
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P384 BIT7
+#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P521 BIT8
///
/// SPDM NEGOTIATE_ALGORITHMS request BaseHashAlgo
///
-#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_256 BIT0
-#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_384 BIT1
-#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_512 BIT2
-#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_256 BIT3
-#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_384 BIT4
-#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_512 BIT5
+#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_256 BIT0
+#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_384 BIT1
+#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_512 BIT2
+#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_256 BIT3
+#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_384 BIT4
+#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_512 BIT5
///
/// SPDM NEGOTIATE_ALGORITHMS response
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT16 Length;
- UINT8 MeasurementSpecificationSel;
- UINT8 Reserved;
- UINT32 MeasurementHashAlgo;
- UINT32 BaseAsymSel;
- UINT32 BaseHashSel;
- UINT8 Reserved2[12];
- UINT8 ExtAsymSelCount;
- UINT8 ExtHashSelCount;
- UINT16 Reserved3;
-//UINT32 ExtAsymSel[ExtAsymSelCount];
-//UINT32 ExtHashSel[ExtHashSelCount];
+ SPDM_MESSAGE_HEADER Header;
+ UINT16 Length;
+ UINT8 MeasurementSpecificationSel;
+ UINT8 Reserved;
+ UINT32 MeasurementHashAlgo;
+ UINT32 BaseAsymSel;
+ UINT32 BaseHashSel;
+ UINT8 Reserved2[12];
+ UINT8 ExtAsymSelCount;
+ UINT8 ExtHashSelCount;
+ UINT16 Reserved3;
+ // UINT32 ExtAsymSel[ExtAsymSelCount];
+ // UINT32 ExtHashSel[ExtHashSelCount];
} SPDM_ALGORITHMS_RESPONSE;
///
/// SPDM NEGOTIATE_ALGORITHMS response MeasurementHashAlgo
///
-#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_RAW_BIT_STREAM_ONLY BIT0
-#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_256 BIT1
-#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_384 BIT2
-#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_512 BIT3
-#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_256 BIT4
-#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_384 BIT5
-#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_512 BIT6
+#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_RAW_BIT_STREAM_ONLY BIT0
+#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_256 BIT1
+#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_384 BIT2
+#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_512 BIT3
+#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_256 BIT4
+#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_384 BIT5
+#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_512 BIT6
///
/// SPDM GET_DIGESTS request
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
+ SPDM_MESSAGE_HEADER Header;
} SPDM_GET_DIGESTS_REQUEST;
///
/// SPDM GET_DIGESTS response
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
-//UINT8 Digest[DigestSize];
+ SPDM_MESSAGE_HEADER Header;
+ // UINT8 Digest[DigestSize];
} SPDM_DIGESTS_RESPONSE;
///
/// SPDM GET_DIGESTS request
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT16 Offset;
- UINT16 Length;
+ SPDM_MESSAGE_HEADER Header;
+ UINT16 Offset;
+ UINT16 Length;
} SPDM_GET_CERTIFICATE_REQUEST;
///
/// SPDM GET_DIGESTS response
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT16 PortionLength;
- UINT16 RemainderLength;
-//UINT8 CertChain[CertChainSize];
+ SPDM_MESSAGE_HEADER Header;
+ UINT16 PortionLength;
+ UINT16 RemainderLength;
+ // UINT8 CertChain[CertChainSize];
} SPDM_CERTIFICATE_RESPONSE;
///
/// SPDM CHALLENGE request
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT8 Nonce[32];
+ SPDM_MESSAGE_HEADER Header;
+ UINT8 Nonce[32];
} SPDM_CHALLENGE_REQUEST;
///
/// SPDM CHALLENGE response
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
-//UINT8 CertChainHash[DigestSize];
-//UINT8 Nonce[32];
-//UINT8 MeasurementSummaryHash[DigestSize];
-//UINT16 OpaqueLength;
-//UINT8 OpaqueData[OpaqueLength];
-//UINT8 Signature[KeySize];
+ SPDM_MESSAGE_HEADER Header;
+ // UINT8 CertChainHash[DigestSize];
+ // UINT8 Nonce[32];
+ // UINT8 MeasurementSummaryHash[DigestSize];
+ // UINT16 OpaqueLength;
+ // UINT8 OpaqueData[OpaqueLength];
+ // UINT8 Signature[KeySize];
} SPDM_CHALLENGE_AUTH_RESPONSE;
///
/// SPDM GET_MEASUREMENTS request
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT8 Nonce[32];
+ SPDM_MESSAGE_HEADER Header;
+ UINT8 Nonce[32];
} SPDM_GET_MEASUREMENTS_REQUEST;
///
/// SPDM MEASUREMENTS block common header
///
typedef struct {
- UINT8 Index;
- UINT8 MeasurementSpecification;
- UINT16 MeasurementSize;
-//UINT8 Measurement[MeasurementSize];
+ UINT8 Index;
+ UINT8 MeasurementSpecification;
+ UINT16 MeasurementSize;
+ // UINT8 Measurement[MeasurementSize];
} SPDM_MEASUREMENT_BLOCK_COMMON_HEADER;
-#define SPDM_MEASUREMENT_BLOCK_HEADER_SPECIFICATION_DMTF BIT0
+#define SPDM_MEASUREMENT_BLOCK_HEADER_SPECIFICATION_DMTF BIT0
///
/// SPDM MEASUREMENTS block DMTF header
///
typedef struct {
- UINT8 DMTFSpecMeasurementValueType;
- UINT16 DMTFSpecMeasurementValueSize;
-//UINT8 DMTFSpecMeasurementValue[DMTFSpecMeasurementValueSize];
+ UINT8 DMTFSpecMeasurementValueType;
+ UINT16 DMTFSpecMeasurementValueSize;
+ // UINT8 DMTFSpecMeasurementValue[DMTFSpecMeasurementValueSize];
} SPDM_MEASUREMENT_BLOCK_DMTF_HEADER;
///
@@ -273,24 +272,24 @@ typedef struct { /// SPDM GET_MEASUREMENTS response
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
- UINT8 NumberOfBlocks;
- UINT8 MeasurementRecordLength[3];
-//UINT8 MeasurementRecord[MeasurementRecordLength];
-//UINT8 Nonce[32];
-//UINT16 OpaqueLength;
-//UINT8 OpaqueData[OpaqueLength];
-//UINT8 Signature[KeySize];
+ SPDM_MESSAGE_HEADER Header;
+ UINT8 NumberOfBlocks;
+ UINT8 MeasurementRecordLength[3];
+ // UINT8 MeasurementRecord[MeasurementRecordLength];
+ // UINT8 Nonce[32];
+ // UINT16 OpaqueLength;
+ // UINT8 OpaqueData[OpaqueLength];
+ // UINT8 Signature[KeySize];
} SPDM_MEASUREMENTS_RESPONSE;
///
/// SPDM ERROR response
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
+ SPDM_MESSAGE_HEADER Header;
// Param1 == Error Code
// Param2 == Error Data
-//UINT8 ExtendedErrorData[];
+ // UINT8 ExtendedErrorData[];
} SPDM_ERROR_RESPONSE;
///
@@ -309,7 +308,7 @@ typedef struct { /// SPDM RESPONSE_IF_READY request
///
typedef struct {
- SPDM_MESSAGE_HEADER Header;
+ SPDM_MESSAGE_HEADER Header;
// Param1 == RequestCode
// Param2 == Token
} SPDM_RESPONSE_IF_READY_REQUEST;
@@ -317,4 +316,3 @@ typedef struct { #pragma pack()
#endif
-
|