summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0028-MCTP-Daemon-D-Bus-interface-definition.patch
blob: e6afc0117793832ef63becc2cb1be74f521d3578 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
From 65d1772312a76ebfdac6391bb97287c62f18c43f Mon Sep 17 00:00:00 2001
From: "Kowalski, Mariusz" <mariusz.kowalski@intel.com>
Date: Thu, 27 Feb 2020 15:48:56 +0100
Subject: [PATCH] MCTP Daemon D-Bus interface definition.

This interface definition was created on base of the MCTP design
proposed in this document:
https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/28424/9/designs/mctp.md

Signed-off-by: Arun P. Mohanan <arun.p.m@linux.intel.com>
Signed-off-by: Mariusz Kowalski <mariusz.kowalski@intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Change-Id: Ida66f8ffcf00003655edcb0fb0112202797b8e1a
---
 xyz/openbmc_project/MCTP/Base.interface.yaml  | 227 ++++++++++++++++++
 .../MCTP/Binding/PCIe.interface.yaml          |  29 +++
 .../MCTP/Binding/SMBus.interface.yaml         |  17 ++
 .../MCTP/BusOwner.interface.yaml              |  17 ++
 .../MCTP/Endpoint.interface.yaml              |  13 +
 xyz/openbmc_project/MCTP/README.md            |  43 ++++
 .../MCTP/SupportedMessageTypes.interface.yaml |  36 +++
 7 files changed, 382 insertions(+)
 create mode 100644 xyz/openbmc_project/MCTP/Base.interface.yaml
 create mode 100644 xyz/openbmc_project/MCTP/Binding/PCIe.interface.yaml
 create mode 100644 xyz/openbmc_project/MCTP/Binding/SMBus.interface.yaml
 create mode 100644 xyz/openbmc_project/MCTP/BusOwner.interface.yaml
 create mode 100644 xyz/openbmc_project/MCTP/Endpoint.interface.yaml
 create mode 100644 xyz/openbmc_project/MCTP/README.md
 create mode 100644 xyz/openbmc_project/MCTP/SupportedMessageTypes.interface.yaml

diff --git a/xyz/openbmc_project/MCTP/Base.interface.yaml b/xyz/openbmc_project/MCTP/Base.interface.yaml
new file mode 100644
index 0000000..9438551
--- /dev/null
+++ b/xyz/openbmc_project/MCTP/Base.interface.yaml
@@ -0,0 +1,227 @@
+description: >
+  Mandatory interface for each instance of the MCTP Daemon to expose
+  the base MCTP daemon and medium type interfaces.
+
+methods:
+    - name: SendMctpMessagePayload
+      description: >
+        Sends message over MCTP interface
+      parameters:
+        - name: DestinationEID
+          type: byte
+          description: >
+            Destination Endpoint ID. The logical address used to route MCTP
+            messages to a specific MCTP endpoint.
+        - name: MsgTag
+          type: byte
+          description: >
+            Message tag. Field that, along with the Source Endpoint IDs and the
+            Tag Owner (TO) field, identifies a unique message at the MCTP
+            transport level.
+        - name: TagOwner
+          type: boolean
+          description: >
+            Tag Owner bit identifies whether the message tag was originated by
+            the endpoint that is the source of the message or by the endpoint
+            that is the destination of the message.
+        - name: Payload
+          type: array[byte]
+          description: Payload of message.
+      returns:
+        - name: Status
+          type: byte
+          description: 0 - if success
+      errors:
+        - xyz.openbmc_project.Common.Error.Timeout
+        - xyz.openbmc_project.Common.Error.InvalidArgument
+        - xyz.openbmc_project.Common.Error.InternalFailure
+
+    - name: SendMctpMessageFileDescriptor
+      description: >
+        Sends message over MCTP interface
+      parameters:
+        - name: DestinationEID
+          type: byte
+          description: >
+            Destination Endpoint ID. The logical address used to route MCTP
+            messages to a specific MCTP endpoint.
+        - name: MsgTag
+          type: byte
+          description: >
+            Message tag. Field that, along with the Source Endpoint IDs and the
+            Tag Owner (TO) field, identifies a unique message at the MCTP
+            transport level.
+        - name: TagOwner
+          type: boolean
+          description: >
+            Tag Owner bit identifies whether the message tag was originated by
+            the endpoint that is the source of the message or by the endpoint
+            that is the destination of the message.
+        - name: FileDescriptor
+          type: unixfd
+          description: File descriptor of message.
+      returns:
+        - name: Status
+          type: byte
+          description: 0 - if success
+      errors:
+        - xyz.openbmc_project.Common.Error.Timeout
+        - xyz.openbmc_project.Common.Error.InvalidArgument
+        - xyz.openbmc_project.Common.Error.InternalFailure
+
+signals:
+    - name: MessageReceivedSignal
+      description: >
+        Signal indicating upper layers about arrival of a MCTP message.
+      properties:
+        - name: MessageType
+          type: enum[self.MessageTypes]
+          description: >
+            Defines the values for the Message Type field for different message
+            types transported through MCTP.
+        - name: SrcEid
+          type: byte
+          description: >
+            Source Endpoint ID. The logical address used to route MCTP messages
+            to a specific MCTP endpoint.
+        - name: MsgTag
+          type: byte
+          description: >
+            Message tag. Field that, along with the Source Endpoint IDs and the
+            Tag Owner (TO) field, identifies a unique message at the MCTP
+            transport level.
+        - name: TagOwner
+          type: boolean
+          description: >
+            Tag Owner bit identifies whether the message tag was originated by
+            the endpoint that is the source of the message or by the endpoint
+            that is the destination of the message.
+        - name: Payload
+          type: array[byte]
+          description: Payload of message.
+
+properties:
+    - name: Eid
+      type: byte
+      description: >
+        Endpoint ID. The logical address used to route MCTP messages to a
+        specific MCTP endpoint.
+
+    - name: BindingID
+      type: enum[self.BindingTypes]
+
+    - name: BindingMediumID
+      type: enum[self.MctpPhysicalMediumIdentifiers]
+
+    - name: StaticEid
+      type: boolean
+      description: Support for statically/dynamicly allocated IDs
+
+    - name: BindingMode
+      type: enum[self.BindingModeTypes]
+      description: Bus Owner / Endpoint / Bridge
+
+enumerations:
+  - name: BindingTypes
+    description: >
+      All other values than described are reserved.
+    values:
+      - name: MctpOverSmbus
+      - name: MctpOverPcieVdm
+      - name: MctpOverUsb
+        description: Reserved for MCTP over USB
+      - name: MctpOverKcs
+      - name: MctpOverSerial
+      - name: VendorDefined
+
+  - name: MctpPhysicalMediumIdentifiers
+    description: >
+      Identifies MCTP physical medium identifiers. see DSP0239.
+    values:
+        - name: Smbus
+          descritpion: SMBus 2.0 100 kHz compatible
+        - name: SmbusI2c
+          descritpion: SMBus 2.0 + I2C 100 kHz compatible
+        - name: I2cCompatible
+          description: I2C 100 kHz compatible (Standard-mode)
+        - name: Smbus3OrI2c400khzCompatible
+          description: SMBus 3.0 or I2C 400 kHz compatible (Fast-mode)
+        - name: Smbus3OrI2c1MhzCompatible
+          description: SMBus 3.0 or I2C 1 MHz compatible (Fast-mode Plus)
+        - name: I2c3Mhz4Compatible
+          description: I2C 3.4 MHz compatible (High-speed mode)
+        - name: Pcie11
+          description: PCIe revision 1.1 compatible
+        - name: Pcie2
+          description: PCIe revision 2.0 compatible
+        - name: Pcie21
+          description: PCIe revision 2.1 compatible
+        - name: Pcie3
+          description: PCIe revision 3.0 compatible
+        - name: Pcie4
+          description: PCIe revision 4.0 compatible
+        - name: Pcie5
+          description: PCIe revision 4.0 compatible
+        - name:  PciCompatible
+          description: >
+            PCI compatible (PCI 1.0,2.0,2.1,2.2,2.3,3.0,PCI-X 1.0, PCI-X 2.0)
+        - name: Usb11Compatible
+          description: USB 1.1 compatible
+        - name: Usb20Compatible
+          description: USB 2.0 compatible
+        - name: Usb30Compatible
+          description: USB 3.0 compatible
+        - name: NcSiOverRbt
+          description: >
+            NC-SI over RBT (A physical interface based on RMII as defined in
+            DSP0222)
+        - name: KcsLegacy
+          description: KCS1 / Legacy (Fixed Address Decoding)
+        - name: KcsPci
+          description: KCS1 / PCI (Base Class 0xC0 Subclass 0x01)
+        - name: SerialHostLegacy
+          description: Serial Host2 / Legacy (Fixed Address Decoding)
+        - name: SerialHostPci
+          description: Serial Host2 / PCI (Base Class 0x07 Subclass 0x00)
+        - name: AsynchronousSerial
+          description: Asynchronous Serial (Between MCs and IMDs)
+        - name: I3cSDR
+          description: I3C 12.5 MHz compatible (SDR)
+        - name: I3cHDRDDR
+          description: I3C 25 MHz compatible (HDR-DDR)
+
+  - name: BindingModeTypes
+    values:
+        - name: Endpoint
+          description: >
+            An MCTP communication terminus. An MCTP endpoint is a terminus or
+            origin of MCTP packets or messages. That is, the combined
+            functionality within a physical device that communicates using the
+            MCTP transport protocol and handles MCTP control commands. This
+            includes MCTP-capable management controllers and managed devices.
+            Also referred to in this document as "endpoint".
+        - name: BusOwner
+          description: >
+            The party responsible for managing address assignments (can be
+            logical or physical addresses) on a bus (for example, in MCTP, the
+            bus owner is the party responsible for managing EID assignments for
+            a given bus). A bus owner may also have additional media-specific
+            responsibilities, such as assignment of physical addresses.
+        - name: Bridge
+          description: >
+            An MCTP endpoint that can route MCTP messages not destined for
+            itself that it receives on one interconnect onto another without
+            interpreting them. The ingress and egress media at the bridge may
+            be either homogeneous or heterogeneous. Also referred to in this
+            document as a "bridge".
+
+  - name: MessageTypes
+    values:
+    - name: MctpControl
+    - name: PLDM
+    - name: NCSI
+    - name: Ethernet
+    - name: NVMeMgmtMsg
+    - name: SPDM
+    - name: VDPCI
+    - name: VDIANA
diff --git a/xyz/openbmc_project/MCTP/Binding/PCIe.interface.yaml b/xyz/openbmc_project/MCTP/Binding/PCIe.interface.yaml
new file mode 100644
index 0000000..1bd2881
--- /dev/null
+++ b/xyz/openbmc_project/MCTP/Binding/PCIe.interface.yaml
@@ -0,0 +1,29 @@
+description: >
+    Interface exposed by MCTP daemon for PCIe binding
+
+properties:
+    - name: DiscoveredFlag
+      type: enum[self.DiscoveryFlags]
+      description: >
+        Each endpoint (except the bus owner) on the PCIe bus maintains an
+        internal flag called the Discovered flag. The flag is set to the
+        discovered state when the Set Endpoint ID command is received.
+
+    - name: BDF
+      type: uint16
+      description: >
+        Byte 1 [7:0] Bus number
+        Byte 2 [7:3] Device number [2:0] Function Number
+
+enumerations:
+    - name: DiscoveryFlags
+      description: >
+          The Prepare for Endpoint Discovery message causes each recipient
+          endpoint on the PCIe bus to set their respective Discovered flag to
+          the undiscovered state. For the Prepare for Endpoint Discovery request
+          message, the routing in the physical transport header should be set to
+          011b (Broadcast from Root Complex).
+      values:
+        - name: Discovered
+        - name: Undiscovered
+        - name: NotApplicable
diff --git a/xyz/openbmc_project/MCTP/Binding/SMBus.interface.yaml b/xyz/openbmc_project/MCTP/Binding/SMBus.interface.yaml
new file mode 100644
index 0000000..9219ad0
--- /dev/null
+++ b/xyz/openbmc_project/MCTP/Binding/SMBus.interface.yaml
@@ -0,0 +1,17 @@
+description: >
+  Interface exposed by MCTP daemon for SMBus binding
+
+properties:
+    - name: ArpMasterSupport
+      type: boolean
+      description: >
+        The SMBus binding can also run ARP Master protocol and
+        assign SMBus addresses to the devices on the bus.
+
+    - name: BusNumber
+      type: byte
+      description: I2C bus number of the medium used
+
+    - name: SlaveAddress
+      type: byte
+      description: Slave address to be used for this medium
diff --git a/xyz/openbmc_project/MCTP/BusOwner.interface.yaml b/xyz/openbmc_project/MCTP/BusOwner.interface.yaml
new file mode 100644
index 0000000..d46298e
--- /dev/null
+++ b/xyz/openbmc_project/MCTP/BusOwner.interface.yaml
@@ -0,0 +1,17 @@
+description: >
+    Interface exposed by MCTP root object, when executing in Bus Owner mode.
+
+properties:
+    - name: EidPool
+      type: array[struct[byte, byte]]
+      description: >
+        Pool of allowed EIDs to be used.
+        EID pool of 10-100 can be specified as {{10,100}}.
+
+    - name: TopMostBusOwner
+      type: boolean
+      description: To indicate whether BMC is topmost Bus Owner
+
+    - name: OwnEidPool
+      type: boolean
+      description: Indicates Eid pool is managed by self
diff --git a/xyz/openbmc_project/MCTP/Endpoint.interface.yaml b/xyz/openbmc_project/MCTP/Endpoint.interface.yaml
new file mode 100644
index 0000000..e4ba4d0
--- /dev/null
+++ b/xyz/openbmc_project/MCTP/Endpoint.interface.yaml
@@ -0,0 +1,13 @@
+description:
+  Interface exposed by discovered MCTP endpoints.
+
+properties:
+    - name: Mode
+      type: enum[xyz.openbmc_project.MCTP.Base.BindingModeTypes]
+      description: Endpoint / BusOwner / Bridge
+
+    - name: NetworkId
+      type: uint16
+      description: >
+        MCTP network ID a unique identifier to distinguish each independent
+        MCTP network within a platform.
diff --git a/xyz/openbmc_project/MCTP/README.md b/xyz/openbmc_project/MCTP/README.md
new file mode 100644
index 0000000..c819dbb
--- /dev/null
+++ b/xyz/openbmc_project/MCTP/README.md
@@ -0,0 +1,43 @@
+# MCTP Daemon
+
+## Overview
+MCTP service exposes D-Bus methods / properties / signals for managing
+MCTP devices or work as MCTP Endpoint. MCTP daemon will either
+work in Bus Owner or Endpoint mode for the specified physical medium.
+
+### MCTP service
+MCTP service can be started either in Bus Owner mode or Endpoint mode.
+It will expose following objects.
+1. Base object
+2. MCTP Endpoints (discovered in case of Bus Owner mode, queried using
+routing table in case of Endpoint mode)
+Please refer individual yaml file for details about the
+methods / signals / properties exposed in the interfaces.
+
+#### Base object
+Exposed under the path `/xyz/openbmc_project/mctp` with the following
+interfaces.
+1. `xyz.openbmc_project.MCTP.Base` which exposes all the common properties
+needed for MCTP Daemon.
+2. `xyz.openbmc_project.MCTP.BusOwner` available only in Bus Owner mode
+which exposes the properties needed by Bus Owner MCTP Daemon.
+3. `xyz.openbmc_project.MCTP.SupportedMessageTypes` which exposes the message
+types supported.
+4. Binding interface `xyz.openbmc_project.MCTP.Binding.PCIe` or
+`xyz.openbmc_project.MCTP.Binding.SMBus` as per the physical medium in which
+this MCTP Daemon is instantiated.
+5. Common UUID interface `xyz.openbmc_project.Common.UUID` which exposes UUID
+in RFC4122 format.
+
+#### Endpoint object
+Exposed under the path `/xyz/openbmc_project/mctp/device/<eid>` with the
+following interfaces.
+1. `xyz.openbmc_project.MCTP.SupportedMessageTypes` which exposes supported MCTP
+message types for the discovered MCTP Endpoint.
+2. `xyz.openbmc_project.MCTP.Endpoint` which exposes properties like Network ID
+and endpoint mode (to identify Bus Owner or Bridge or Endpoint) for the discovered
+MCTP Endpoint.
+3. `xyz.openbmc_project.MCTP.Bridge` available only for discovered MCTP Bridges to
+expose properties like EID pool. (TBD)
+4. Common UUID interface `xyz.openbmc_project.Common.UUID` which exposes UUID
+in RFC4122 format.
diff --git a/xyz/openbmc_project/MCTP/SupportedMessageTypes.interface.yaml b/xyz/openbmc_project/MCTP/SupportedMessageTypes.interface.yaml
new file mode 100644
index 0000000..fa447ee
--- /dev/null
+++ b/xyz/openbmc_project/MCTP/SupportedMessageTypes.interface.yaml
@@ -0,0 +1,36 @@
+description:
+  Interface used to represent the supported MCTP message types.
+  This will be exposed by all MCTP endpoints.
+
+properties:
+    - name: MctpControl
+      type: boolean
+      description: Indicates support availability
+
+    - name: PLDM
+      type: boolean
+      description: Indicates support availability
+
+    - name: NCSI
+      type: boolean
+      description: Indicates support availability
+
+    - name: Ethernet
+      type: boolean
+      description: Indicates support availability
+
+    - name: NVMeMgmtMsg
+      type: boolean
+      description: Indicates support availability
+
+    - name: SPDM
+      type: boolean
+      description: Indicates support availability
+
+    - name: VDPCI
+      type: boolean
+      description: Indicates support availability
+
+    - name: VDIANA
+      type: boolean
+      description: Indicates support availability
-- 
2.17.1