Skip to content

Commit fd0adb3

Browse files
committed
Add RegisterTypeSupport dbus API
GetMsgType response is hardcoded and always return only control message support. Add a dbus method RegisterTypeSupport which accept msg type and versions array as input and reply accordingly in GetMsgType and GetVersin control commands Tested by sending GetMsgType and GetVersion from another EP Default responses for GetMsgType and GetVersion for type 0 5, 0, 1, 0 and 4, 0, 4, 241, 240, 255, 0, 241, 241, 255, 0, 241, 242, 255, 0, 241, 243, 241, 0 After calling au.com.codeconstruct.MCTP1 /au/com/codeconstruct/mctp1 au.com.codeconstruct.MCTP1 RegisterTypeSupport yau 5 1 0xF1F2F3F4 with a tool which stays alive after method call Response for GetMsgType and GetVersion for type 5 5, 0, 2, 0, 5 and 4, 0, 1, 244, 243, 242, 241 Signed-off-by: Nidhin MS <[email protected]>
1 parent 3e0e9c2 commit fd0adb3

File tree

5 files changed

+307
-33
lines changed

5 files changed

+307
-33
lines changed

docs/mctpd.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,39 @@ Service au.com.codeconstruct.MCTP1:
2525

2626
## Top-level object: `/au/com/codeconstruct/mctp1`
2727

28-
This object serves as the global MCTP daemon namespace; it doesn't contain
29-
much at present, but hosts two trees of MCTP objects:
28+
This object serves as the global MCTP daemon namespace.
29+
It hosts `au.com.codeconstruct.MCTP1` dbus interface to modify mctp properties like
30+
supported message types.
31+
```
32+
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
33+
au.com.codeconstruct.MCTP1 interface - - -
34+
.RegisterTypeSupport method yau - -
35+
```
36+
37+
#### `.RegisterTypeSupport`: `yau`
38+
39+
This method is used to add support for mctp message types other than control
40+
messages. Once called successfully subsequent response for get message type
41+
control command will include this new message type also. Also the versions
42+
passed to this method will be used to respond to get version control command.
43+
44+
`RegisterTypeSupport <msg type> <versions>`
45+
46+
If message type is already registered then dbus call will fail
47+
48+
`<msg type>` Message type defined in DSP0239
49+
50+
`<versions>` Versions supported for this message type formatted as uint32 integers as
51+
specified in DSP0236
52+
53+
Example for PLDM type with two versions:
54+
55+
```shell
56+
busctl call au.com.codeconstruct.MCTP1 /au/com/codeconstruct/mctp1 \
57+
au.com.codeconstruct.MCTP1 RegisterTypeSupport yau 1 2 0xF1F2F3F4 0xF0F0F0F1
58+
```
59+
60+
Also it hosts two trees of MCTP objects:
3061

3162
* Interfaces: Local hardware transport bindings that connect us to a MCTP bus
3263
* Endpoints: MCTP endpoints that `mctpd` knows about, both remote and local

0 commit comments

Comments
 (0)