* [PATCH V2] MdePkg/Include: Add DMTF MCTP definitions
@ 2023-03-03 3:24 Chang, Abner
2023-03-07 23:58 ` [edk2-devel] " Isaac Oram
0 siblings, 1 reply; 3+ messages in thread
From: Chang, Abner @ 2023-03-03 3:24 UTC (permalink / raw)
To: devel
Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang,
Igor Kulchytskyy, Isaac Oram, Abdul Lateef Attar
From: Abner Chang <abner.chang@amd.com>
BZ #4355
This change adds definitions for DMTF MCTP
base specification.
Spec ref:
https://www.dmtf.org/sites/default/files/standards/documents/DSP0236_1.3.1.pdf
Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
---
MdePkg/Include/IndustryStandard/Mctp.h | 114 +++++++++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 MdePkg/Include/IndustryStandard/Mctp.h
diff --git a/MdePkg/Include/IndustryStandard/Mctp.h b/MdePkg/Include/IndustryStandard/Mctp.h
new file mode 100644
index 00000000000..b71063a6502
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Mctp.h
@@ -0,0 +1,114 @@
+/** @file
+
+ The definitions of DMTF Management Component Transport Protocol (MCTP)
+ Base Specification.
+
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Revision Reference:
+ DMTF Management Component Transport Protocol (MCTP) Base Specification
+ Version 1.3.1
+ https://www.dmtf.org/sites/default/files/standards/documents/DSP0236_1.3.1.pdf
+**/
+
+#ifndef MCTP_H_
+#define MCTP_H_
+
+///
+/// Definitions of endpoint ID
+///
+#define MCTP_NULL_DESTINATION_ENDPOINT_ID 0
+#define MCTP_NULL_SOURCE_ENDPOINT_ID 0
+#define MCTP_RESERVED_ENDPOINT_START_ID 1
+#define MCTP_RESERVED_ENDPOINT_END_ID 7
+#define MCTP_BROADCAST_ENDPOINT_ID 0xFF
+
+// Minimum transmission size is 64 bytes.
+#define MCTP_BASELINE_MINIMUM_UNIT_TRANSMISSION_SIZE 0x40
+
+///
+/// The 32-bit Header of MCTP packet.
+///
+typedef union {
+ struct {
+ UINT8 Reserved : 4; ///< Reserved for future definitions.
+ UINT8 HeaderVersion : 4; ///< The version of header.
+ UINT8 DestinationEndpointId : 8; ///< Destination endpoint Id (EID).
+ UINT8 SourceEndpointId : 8; ///< Source endpoint Id (EID)
+ UINT8 StartOfMessage : 1; ///< Indicates the first packet of message.
+ UINT8 EndOfMessage : 1; ///< Indicates the last packet of message.
+ UINT8 PacketSequence : 2; ///< Sequence number increments modulo 4 on
+ ///< each packet.
+ UINT8 TagOwner : 1; ///< Tag owner identifies the message was
+ ///< originated by the source EID or
+ ///< destination EID.
+ UINT8 MessageTag : 3; ///< Check the MCTP Base specification for the
+ ///< usages.
+ } Bits;
+ UINT32 Header;
+} MCTP_HEADER;
+
+///
+/// MCTP Control Commands
+///
+#define MCTP_CONTROL_RESERVED 0x00
+#define MCTP_CONTROL_SET_ENDPOINT_ID 0x01
+#define MCTP_CONTROL_GET_ENDPOINT_ID 0x02
+#define MCTP_CONTROL_GET_ENDPOINT_UUID 0x03
+#define MCTP_CONTROL_GET_MCTP_VERSION_SUPPORT 0x04
+#define MCTP_CONTROL_GET_MESSAGE_TYPE_SUPPORT 0x05
+#define MCTP_CONTROL_GET_VENDOR_DEFINED_MESSAGE_SUPPORT 0x06
+#define MCTP_CONTROL_RESOLVE_ENDPOINT_ID 0x07
+#define MCTP_CONTROL_ALLOCATE_ENDPOINT_IDS 0x08
+#define MCTP_CONTROL_ROUTING_INFORMATION_UPDATE 0x09
+#define MCTP_CONTROL_GET_ROUTINE_TABLE_ENTRIES 0x0A
+#define MCTP_CONTROL_PREPARE_FOR_ENDPOINT_DISCOVERY 0x0B
+#define MCTP_CONTROL_ENDPOINT_DISCOVERY 0x0C
+#define MCTP_CONTROL_DISCOVERY_NOTIFY 0x0D
+#define MCTP_CONTROL_GET_NETWORK_ID 0x0E
+#define MCTP_CONTROL_QUERY_HOP 0x0F
+#define MCTP_CONTROL_RESOLVE_UUID 0x10
+#define MCTP_CONTROL_QUERY_RATE_LIMIT 0x11
+#define MCTP_CONTROL_REQUEST_TX_RATE_LIMIT 0x12
+#define MCTP_CONTROL_UPDATE_RATE_LIMIT 0x13
+#define MCTP_CONTROL_QUERY_SUPPORTED_INTERFACES 0x14
+#define MCTP_CONTROL_TRANSPORT_SPECIFIC_START 0xF0
+#define MCTP_CONTROL_TRANSPORT_SPECIFIC_END 0xFF
+
+///
+/// MCTP Control Message Completion Codes
+///
+#define MCTP_CONTROL_COMPLETION_CODES_SUCCESS 0x00
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR 0x01
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR_INVALID_DATA 0x02
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR_INVALID_LENGTH 0x03
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR_NOT_READY 0x04
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR_UNSUPPORTED_CMD 0x05
+#define MCTP_CONTROL_COMPLETION_CODES_COMMAND_SPECIFIC_START 0x80
+#define MCTP_CONTROL_COMPLETION_CODES_COMMAND_SPECIFIC_END 0xFF
+
+///
+/// MCTP Control Message Types
+///
+#define MCTP_MESSAGE_TYPE_CONTROL 0x00
+#define MCTP_MESSAGE_TYPE_VENDOR_DEFINED_PCI 0x7E
+#define MCTP_MESSAGE_TYPE_VENDOR_DEFINED_IANA 0x7F
+
+///
+/// MCTP Control Message Format
+///
+typedef struct {
+ struct {
+ UINT8 IntegrityCheck : 1; ///< Message integrity check.
+ UINT8 MessageType : 7; ///< Message type.
+ UINT8 RequestBit : 1; ///< Request bit.
+ UINT8 DatagramBit : 1; ///< Datagram bit.
+ UINT8 Reserved : 1; ///< Reserved bit.
+ UINT8 InstanceId : 5; ///< Instance ID.
+ UINT8 CommandCode : 8; ///< Command code of request message.
+ UINT8 CompletionCode : 8; ///< Completion code in response message.
+ } Bits;
+ UINT32 BodyHeader;
+} MCTP_CONTROL_MESSAGE;
+#endif
--
2.37.1.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH V2] MdePkg/Include: Add DMTF MCTP definitions
2023-03-03 3:24 [PATCH V2] MdePkg/Include: Add DMTF MCTP definitions Chang, Abner
@ 2023-03-07 23:58 ` Isaac Oram
2023-03-13 2:37 ` Chang, Abner
0 siblings, 1 reply; 3+ messages in thread
From: Isaac Oram @ 2023-03-07 23:58 UTC (permalink / raw)
To: devel@edk2.groups.io, abner.chang@amd.com
Acked-by: Isaac Oram <isaac.w.oram@intel.com>
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang, Abner via groups.io
Sent: Thursday, March 2, 2023 7:25 PM
To: devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Subject: [edk2-devel] [PATCH V2] MdePkg/Include: Add DMTF MCTP definitions
From: Abner Chang <abner.chang@amd.com>
BZ #4355
This change adds definitions for DMTF MCTP base specification.
Spec ref:
https://www.dmtf.org/sites/default/files/standards/documents/DSP0236_1.3.1.pdf
Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
---
MdePkg/Include/IndustryStandard/Mctp.h | 114 +++++++++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 MdePkg/Include/IndustryStandard/Mctp.h
diff --git a/MdePkg/Include/IndustryStandard/Mctp.h b/MdePkg/Include/IndustryStandard/Mctp.h
new file mode 100644
index 00000000000..b71063a6502
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Mctp.h
@@ -0,0 +1,114 @@
+/** @file
+
+ The definitions of DMTF Management Component Transport Protocol
+ (MCTP) Base Specification.
+
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
+ reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Revision Reference:
+ DMTF Management Component Transport Protocol (MCTP) Base
+Specification
+ Version 1.3.1
+
+https://www.dmtf.org/sites/default/files/standards/documents/DSP0236_1.
+3.1.pdf
+**/
+
+#ifndef MCTP_H_
+#define MCTP_H_
+
+///
+/// Definitions of endpoint ID
+///
+#define MCTP_NULL_DESTINATION_ENDPOINT_ID 0
+#define MCTP_NULL_SOURCE_ENDPOINT_ID 0
+#define MCTP_RESERVED_ENDPOINT_START_ID 1
+#define MCTP_RESERVED_ENDPOINT_END_ID 7
+#define MCTP_BROADCAST_ENDPOINT_ID 0xFF
+
+// Minimum transmission size is 64 bytes.
+#define MCTP_BASELINE_MINIMUM_UNIT_TRANSMISSION_SIZE 0x40
+
+///
+/// The 32-bit Header of MCTP packet.
+///
+typedef union {
+ struct {
+ UINT8 Reserved : 4; ///< Reserved for future definitions.
+ UINT8 HeaderVersion : 4; ///< The version of header.
+ UINT8 DestinationEndpointId : 8; ///< Destination endpoint Id (EID).
+ UINT8 SourceEndpointId : 8; ///< Source endpoint Id (EID)
+ UINT8 StartOfMessage : 1; ///< Indicates the first packet of message.
+ UINT8 EndOfMessage : 1; ///< Indicates the last packet of message.
+ UINT8 PacketSequence : 2; ///< Sequence number increments modulo 4 on
+ ///< each packet.
+ UINT8 TagOwner : 1; ///< Tag owner identifies the message was
+ ///< originated by the source EID or
+ ///< destination EID.
+ UINT8 MessageTag : 3; ///< Check the MCTP Base specification for the
+ ///< usages.
+ } Bits;
+ UINT32 Header;
+} MCTP_HEADER;
+
+///
+/// MCTP Control Commands
+///
+#define MCTP_CONTROL_RESERVED 0x00
+#define MCTP_CONTROL_SET_ENDPOINT_ID 0x01
+#define MCTP_CONTROL_GET_ENDPOINT_ID 0x02
+#define MCTP_CONTROL_GET_ENDPOINT_UUID 0x03
+#define MCTP_CONTROL_GET_MCTP_VERSION_SUPPORT 0x04
+#define MCTP_CONTROL_GET_MESSAGE_TYPE_SUPPORT 0x05
+#define MCTP_CONTROL_GET_VENDOR_DEFINED_MESSAGE_SUPPORT 0x06
+#define MCTP_CONTROL_RESOLVE_ENDPOINT_ID 0x07
+#define MCTP_CONTROL_ALLOCATE_ENDPOINT_IDS 0x08
+#define MCTP_CONTROL_ROUTING_INFORMATION_UPDATE 0x09
+#define MCTP_CONTROL_GET_ROUTINE_TABLE_ENTRIES 0x0A
+#define MCTP_CONTROL_PREPARE_FOR_ENDPOINT_DISCOVERY 0x0B
+#define MCTP_CONTROL_ENDPOINT_DISCOVERY 0x0C
+#define MCTP_CONTROL_DISCOVERY_NOTIFY 0x0D
+#define MCTP_CONTROL_GET_NETWORK_ID 0x0E
+#define MCTP_CONTROL_QUERY_HOP 0x0F
+#define MCTP_CONTROL_RESOLVE_UUID 0x10
+#define MCTP_CONTROL_QUERY_RATE_LIMIT 0x11
+#define MCTP_CONTROL_REQUEST_TX_RATE_LIMIT 0x12
+#define MCTP_CONTROL_UPDATE_RATE_LIMIT 0x13
+#define MCTP_CONTROL_QUERY_SUPPORTED_INTERFACES 0x14
+#define MCTP_CONTROL_TRANSPORT_SPECIFIC_START 0xF0
+#define MCTP_CONTROL_TRANSPORT_SPECIFIC_END 0xFF
+
+///
+/// MCTP Control Message Completion Codes ///
+#define MCTP_CONTROL_COMPLETION_CODES_SUCCESS 0x00
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR 0x01
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR_INVALID_DATA 0x02
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR_INVALID_LENGTH 0x03
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR_NOT_READY 0x04
+#define MCTP_CONTROL_COMPLETION_CODES_ERROR_UNSUPPORTED_CMD 0x05
+#define MCTP_CONTROL_COMPLETION_CODES_COMMAND_SPECIFIC_START 0x80
+#define MCTP_CONTROL_COMPLETION_CODES_COMMAND_SPECIFIC_END 0xFF
+
+///
+/// MCTP Control Message Types
+///
+#define MCTP_MESSAGE_TYPE_CONTROL 0x00
+#define MCTP_MESSAGE_TYPE_VENDOR_DEFINED_PCI 0x7E
+#define MCTP_MESSAGE_TYPE_VENDOR_DEFINED_IANA 0x7F
+
+///
+/// MCTP Control Message Format
+///
+typedef struct {
+ struct {
+ UINT8 IntegrityCheck : 1; ///< Message integrity check.
+ UINT8 MessageType : 7; ///< Message type.
+ UINT8 RequestBit : 1; ///< Request bit.
+ UINT8 DatagramBit : 1; ///< Datagram bit.
+ UINT8 Reserved : 1; ///< Reserved bit.
+ UINT8 InstanceId : 5; ///< Instance ID.
+ UINT8 CommandCode : 8; ///< Command code of request message.
+ UINT8 CompletionCode : 8; ///< Completion code in response message.
+ } Bits;
+ UINT32 BodyHeader;
+} MCTP_CONTROL_MESSAGE;
+#endif
--
2.37.1.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH V2] MdePkg/Include: Add DMTF MCTP definitions
2023-03-07 23:58 ` [edk2-devel] " Isaac Oram
@ 2023-03-13 2:37 ` Chang, Abner
0 siblings, 0 replies; 3+ messages in thread
From: Chang, Abner @ 2023-03-13 2:37 UTC (permalink / raw)
To: Oram, Isaac W, devel@edk2.groups.io, michael.d.kinney@intel.com,
Liming Gao, Zhiguang Liu
[AMD Official Use Only - General]
Hi Maintainers @michael.d.kinney@intel.com, @Liming Gao and @Zhiguang Liu,
Please review and merge it if there is no problems with this patch, this helps the follow up development works.
Please note that Isaac has his Acked-by: Isaac Oram <isaac.w.oram@intel.com> to this patch.
One question,
Can we assign maintainers to the files under MdePkg? Just like we have now for MdeModulePkg.
For example,
F: MdePkg/Include/IndustryStandard/*IpMI*
F: MdePkg/Include/IndustryStandard/*Mctp*
I don't see any use case like this for MdePkg.
Thanks
Abner
> -----Original Message-----
> From: Oram, Isaac W <isaac.w.oram@intel.com>
> Sent: Wednesday, March 8, 2023 7:58 AM
> To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> Subject: RE: [edk2-devel] [PATCH V2] MdePkg/Include: Add DMTF MCTP
> definitions
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Acked-by: Isaac Oram <isaac.w.oram@intel.com>
>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang,
> Abner via groups.io
> Sent: Thursday, March 2, 2023 7:25 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>;
> Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>;
> Oram, Isaac W <isaac.w.oram@intel.com>; Abdul Lateef Attar
> <AbdulLateef.Attar@amd.com>
> Subject: [edk2-devel] [PATCH V2] MdePkg/Include: Add DMTF MCTP
> definitions
>
> From: Abner Chang <abner.chang@amd.com>
>
> BZ #4355
> This change adds definitions for DMTF MCTP base specification.
>
> Spec ref:
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0236_1
> .3.1.pdf
>
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> ---
> MdePkg/Include/IndustryStandard/Mctp.h | 114
> +++++++++++++++++++++++++
> 1 file changed, 114 insertions(+)
> create mode 100644 MdePkg/Include/IndustryStandard/Mctp.h
>
> diff --git a/MdePkg/Include/IndustryStandard/Mctp.h
> b/MdePkg/Include/IndustryStandard/Mctp.h
> new file mode 100644
> index 00000000000..b71063a6502
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/Mctp.h
> @@ -0,0 +1,114 @@
> +/** @file
> +
> + The definitions of DMTF Management Component Transport Protocol
> + (MCTP) Base Specification.
> +
> + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> + reserved.<BR>
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> + @par Revision Reference:
> + DMTF Management Component Transport Protocol (MCTP) Base
> +Specification
> + Version 1.3.1
> +
> +https://www.dmtf.org/sites/default/files/standards/documents/DSP0236_
> 1.
> +3.1.pdf
> +**/
> +
> +#ifndef MCTP_H_
> +#define MCTP_H_
> +
> +///
> +/// Definitions of endpoint ID
> +///
> +#define MCTP_NULL_DESTINATION_ENDPOINT_ID 0
> +#define MCTP_NULL_SOURCE_ENDPOINT_ID 0
> +#define MCTP_RESERVED_ENDPOINT_START_ID 1
> +#define MCTP_RESERVED_ENDPOINT_END_ID 7
> +#define MCTP_BROADCAST_ENDPOINT_ID 0xFF
> +
> +// Minimum transmission size is 64 bytes.
> +#define MCTP_BASELINE_MINIMUM_UNIT_TRANSMISSION_SIZE 0x40
> +
> +///
> +/// The 32-bit Header of MCTP packet.
> +///
> +typedef union {
> + struct {
> + UINT8 Reserved : 4; ///< Reserved for future definitions.
> + UINT8 HeaderVersion : 4; ///< The version of header.
> + UINT8 DestinationEndpointId : 8; ///< Destination endpoint Id (EID).
> + UINT8 SourceEndpointId : 8; ///< Source endpoint Id (EID)
> + UINT8 StartOfMessage : 1; ///< Indicates the first packet of message.
> + UINT8 EndOfMessage : 1; ///< Indicates the last packet of message.
> + UINT8 PacketSequence : 2; ///< Sequence number increments
> modulo 4 on
> + ///< each packet.
> + UINT8 TagOwner : 1; ///< Tag owner identifies the message was
> + ///< originated by the source EID or
> + ///< destination EID.
> + UINT8 MessageTag : 3; ///< Check the MCTP Base specification for
> the
> + ///< usages.
> + } Bits;
> + UINT32 Header;
> +} MCTP_HEADER;
> +
> +///
> +/// MCTP Control Commands
> +///
> +#define MCTP_CONTROL_RESERVED 0x00
> +#define MCTP_CONTROL_SET_ENDPOINT_ID 0x01
> +#define MCTP_CONTROL_GET_ENDPOINT_ID 0x02
> +#define MCTP_CONTROL_GET_ENDPOINT_UUID 0x03
> +#define MCTP_CONTROL_GET_MCTP_VERSION_SUPPORT 0x04
> +#define MCTP_CONTROL_GET_MESSAGE_TYPE_SUPPORT 0x05
> +#define MCTP_CONTROL_GET_VENDOR_DEFINED_MESSAGE_SUPPORT
> 0x06
> +#define MCTP_CONTROL_RESOLVE_ENDPOINT_ID 0x07
> +#define MCTP_CONTROL_ALLOCATE_ENDPOINT_IDS 0x08
> +#define MCTP_CONTROL_ROUTING_INFORMATION_UPDATE 0x09
> +#define MCTP_CONTROL_GET_ROUTINE_TABLE_ENTRIES 0x0A
> +#define MCTP_CONTROL_PREPARE_FOR_ENDPOINT_DISCOVERY 0x0B
> +#define MCTP_CONTROL_ENDPOINT_DISCOVERY 0x0C
> +#define MCTP_CONTROL_DISCOVERY_NOTIFY 0x0D
> +#define MCTP_CONTROL_GET_NETWORK_ID 0x0E
> +#define MCTP_CONTROL_QUERY_HOP 0x0F
> +#define MCTP_CONTROL_RESOLVE_UUID 0x10
> +#define MCTP_CONTROL_QUERY_RATE_LIMIT 0x11
> +#define MCTP_CONTROL_REQUEST_TX_RATE_LIMIT 0x12
> +#define MCTP_CONTROL_UPDATE_RATE_LIMIT 0x13
> +#define MCTP_CONTROL_QUERY_SUPPORTED_INTERFACES 0x14
> +#define MCTP_CONTROL_TRANSPORT_SPECIFIC_START 0xF0
> +#define MCTP_CONTROL_TRANSPORT_SPECIFIC_END 0xFF
> +
> +///
> +/// MCTP Control Message Completion Codes ///
> +#define MCTP_CONTROL_COMPLETION_CODES_SUCCESS 0x00
> +#define MCTP_CONTROL_COMPLETION_CODES_ERROR 0x01
> +#define MCTP_CONTROL_COMPLETION_CODES_ERROR_INVALID_DATA
> 0x02
> +#define
> MCTP_CONTROL_COMPLETION_CODES_ERROR_INVALID_LENGTH 0x03
> +#define MCTP_CONTROL_COMPLETION_CODES_ERROR_NOT_READY
> 0x04
> +#define
> MCTP_CONTROL_COMPLETION_CODES_ERROR_UNSUPPORTED_CMD 0x05
> +#define
> MCTP_CONTROL_COMPLETION_CODES_COMMAND_SPECIFIC_START 0x80
> +#define
> MCTP_CONTROL_COMPLETION_CODES_COMMAND_SPECIFIC_END 0xFF
> +
> +///
> +/// MCTP Control Message Types
> +///
> +#define MCTP_MESSAGE_TYPE_CONTROL 0x00
> +#define MCTP_MESSAGE_TYPE_VENDOR_DEFINED_PCI 0x7E
> +#define MCTP_MESSAGE_TYPE_VENDOR_DEFINED_IANA 0x7F
> +
> +///
> +/// MCTP Control Message Format
> +///
> +typedef struct {
> + struct {
> + UINT8 IntegrityCheck : 1; ///< Message integrity check.
> + UINT8 MessageType : 7; ///< Message type.
> + UINT8 RequestBit : 1; ///< Request bit.
> + UINT8 DatagramBit : 1; ///< Datagram bit.
> + UINT8 Reserved : 1; ///< Reserved bit.
> + UINT8 InstanceId : 5; ///< Instance ID.
> + UINT8 CommandCode : 8; ///< Command code of request message.
> + UINT8 CompletionCode : 8; ///< Completion code in response message.
> + } Bits;
> + UINT32 BodyHeader;
> +} MCTP_CONTROL_MESSAGE;
> +#endif
> --
> 2.37.1.windows.1
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-13 2:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-03 3:24 [PATCH V2] MdePkg/Include: Add DMTF MCTP definitions Chang, Abner
2023-03-07 23:58 ` [edk2-devel] " Isaac Oram
2023-03-13 2:37 ` Chang, Abner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox