TianoCore EDK2 master
Loading...
Searching...
No Matches
Mctp.h
Go to the documentation of this file.
1
15#ifndef MCTP_H_
16#define MCTP_H_
17
21#define MCTP_NULL_DESTINATION_ENDPOINT_ID 0
22#define MCTP_NULL_SOURCE_ENDPOINT_ID 0
23#define MCTP_RESERVED_ENDPOINT_START_ID 1
24#define MCTP_RESERVED_ENDPOINT_END_ID 7
25#define MCTP_BROADCAST_ENDPOINT_ID 0xFF
26
30#define MCTP_CONTROL_RESERVED 0x00
31#define MCTP_CONTROL_SET_ENDPOINT_ID 0x01
32#define MCTP_CONTROL_GET_ENDPOINT_ID 0x02
33#define MCTP_CONTROL_GET_ENDPOINT_UUID 0x03
34#define MCTP_CONTROL_GET_MCTP_VERSION_SUPPORT 0x04
35#define MCTP_CONTROL_GET_MESSAGE_TYPE_SUPPORT 0x05
36#define MCTP_CONTROL_GET_VENDOR_DEFINED_MESSAGE_SUPPORT 0x06
37#define MCTP_CONTROL_RESOLVE_ENDPOINT_ID 0x07
38#define MCTP_CONTROL_ALLOCATE_ENDPOINT_IDS 0x08
39#define MCTP_CONTROL_ROUTING_INFORMATION_UPDATE 0x09
40#define MCTP_CONTROL_GET_ROUTINE_TABLE_ENTRIES 0x0A
41#define MCTP_CONTROL_PREPARE_FOR_ENDPOINT_DISCOVERY 0x0B
42#define MCTP_CONTROL_ENDPOINT_DISCOVERY 0x0C
43#define MCTP_CONTROL_DISCOVERY_NOTIFY 0x0D
44#define MCTP_CONTROL_GET_NETWORK_ID 0x0E
45#define MCTP_CONTROL_QUERY_HOP 0x0F
46#define MCTP_CONTROL_RESOLVE_UUID 0x10
47#define MCTP_CONTROL_QUERY_RATE_LIMIT 0x11
48#define MCTP_CONTROL_REQUEST_TX_RATE_LIMIT 0x12
49#define MCTP_CONTROL_UPDATE_RATE_LIMIT 0x13
50#define MCTP_CONTROL_QUERY_SUPPORTED_INTERFACES 0x14
51#define MCTP_CONTROL_TRANSPORT_SPECIFIC_START 0xF0
52#define MCTP_CONTROL_TRANSPORT_SPECIFIC_END 0xFF
53
57#define MCTP_CONTROL_COMPLETION_CODES_SUCCESS 0x00
58#define MCTP_CONTROL_COMPLETION_CODES_ERROR 0x01
59#define MCTP_CONTROL_COMPLETION_CODES_ERROR_INVALID_DATA 0x02
60#define MCTP_CONTROL_COMPLETION_CODES_ERROR_INVALID_LENGTH 0x03
61#define MCTP_CONTROL_COMPLETION_CODES_ERROR_NOT_READY 0x04
62#define MCTP_CONTROL_COMPLETION_CODES_ERROR_UNSUPPORTED_CMD 0x05
63#define MCTP_CONTROL_COMPLETION_CODES_COMMAND_SPECIFIC_START 0x80
64#define MCTP_CONTROL_COMPLETION_CODES_COMMAND_SPECIFIC_END 0xFF
65
69#define MCTP_MESSAGE_TYPE_CONTROL 0x00
70#define MCTP_MESSAGE_TYPE_PLDM 0x01
71#define MCTP_MESSAGE_TYPE_NCSI 0x02
72#define MCTP_MESSAGE_TYPE_ETHERNET 0x03
73#define MCTP_MESSAGE_TYPE_NVME 0x04
74#define MCTP_MESSAGE_TYPE_SPDM 0x05
75#define MCTP_MESSAGE_TYPE_SECURE_MESSAGE 0x06
76#define MCTP_MESSAGE_TYPE_CXL_FM_API 0x07
77#define MCTP_MESSAGE_TYPE_CXL_CCI 0x08
78#define MCTP_MESSAGE_TYPE_VENDOR_DEFINED_PCI 0x7E
79#define MCTP_MESSAGE_TYPE_VENDOR_DEFINED_IANA 0x7F
80
81#define MCTP_ENDPOINT_ID_NULL 0
82#define MCTP_ENDPOINT_ID_RESERVED_START 1
83#define MCTP_ENDPOINT_ID_RESERVED_END 7
84#define MCTP_ENDPOINT_ID_BROADCAST 0xff
88typedef union {
89 struct {
90 UINT32 MessageType : 7;
91 UINT32 IntegrityCheck : 1;
92 UINT32 InstanceId : 5;
93 UINT32 Reserved : 1;
94 UINT32 DatagramBit : 1;
95 UINT32 RequestBit : 1;
96 UINT32 CommandCode : 8;
97 UINT32 CompletionCode : 8;
98 } Bits;
99 UINT32 BodyHeader;
101
104#define MCTP_BASELINE_MINIMUM_UNIT_TRANSMISSION_SIZE 0x40
105
109typedef union {
110 struct {
111 UINT32 HeaderVersion : 4;
112 UINT32 Reserved : 4;
114 UINT32 SourceEndpointId : 8;
115 UINT32 MessageTag : 3;
117 UINT32 TagOwner : 1;
120 UINT32 PacketSequence : 2;
122 UINT32 EndOfMessage : 1;
123 UINT32 StartOfMessage : 1;
124 } Bits;
125 UINT32 Header;
127
131typedef union {
132 struct {
133 UINT8 MessageType : 7;
134 UINT8 IntegrityCheck : 1;
135 } Bits;
136 UINT8 MessageHeader;
138
139#endif
UINT32 CommandCode
Command code of request message.
Definition: Mctp.h:96
UINT32 DatagramBit
Datagram bit.
Definition: Mctp.h:94
UINT32 IntegrityCheck
Message integrity check.
Definition: Mctp.h:91
UINT32 RequestBit
Request bit.
Definition: Mctp.h:95
UINT32 MessageType
Message type.
Definition: Mctp.h:90
UINT32 InstanceId
Instance ID.
Definition: Mctp.h:92
UINT32 CompletionCode
Completion code in response message.
Definition: Mctp.h:97
UINT32 Reserved
Reserved bit.
Definition: Mctp.h:93
UINT32 StartOfMessage
Indicates the first packet of message.
Definition: Mctp.h:123
UINT32 SourceEndpointId
Source endpoint Id (EID)
Definition: Mctp.h:114
UINT32 Reserved
Reserved for future definitions.
Definition: Mctp.h:112
UINT32 MessageTag
Definition: Mctp.h:115
UINT32 HeaderVersion
The version of header.
Definition: Mctp.h:111
UINT32 EndOfMessage
Indicates the last packet of message.
Definition: Mctp.h:122
UINT32 PacketSequence
Definition: Mctp.h:120
UINT32 DestinationEndpointId
Destination endpoint Id (EID).
Definition: Mctp.h:113