summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0016-Add-DBUS-interface-of-SMBIOS-MDR-V2.patch
blob: 576bae81a5d1fc24be08defb1c6fc17c9ea7df94 (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
From 9490574667485cd407193ff9f0d6a96f8c2c87d3 Mon Sep 17 00:00:00 2001
From: cyang29 <cheng.c.yang@intel.com>
Date: Wed, 12 Sep 2018 00:27:23 +0800
Subject: [PATCH] Add DBUS interface of SMBIOS MDR V2

Support:
  SMBIOS MDR V2 service interface.
  SMBIOS MDR V2 IPMI Command
  SMBIOS MDR V2 Redfish interface.
Base on SMBIOS spec DSP0134_3.0.0 and Managed Data Region
Specification Revision 4
---
 xyz/openbmc_project/Smbios/MDR_V2.errors.yaml    |   9 +
 xyz/openbmc_project/Smbios/MDR_V2.interface.yaml | 158 +++++++++++++++++++++++
 xyz/openbmc_project/Smbios/README.md             |  21 +++
 3 files changed, 188 insertions(+)
 create mode 100644 xyz/openbmc_project/Smbios/MDR_V2.errors.yaml
 create mode 100644 xyz/openbmc_project/Smbios/MDR_V2.interface.yaml
 create mode 100644 xyz/openbmc_project/Smbios/README.md

diff --git a/xyz/openbmc_project/Smbios/MDR_V2.errors.yaml b/xyz/openbmc_project/Smbios/MDR_V2.errors.yaml
new file mode 100644
index 0000000..88bd6db
--- /dev/null
+++ b/xyz/openbmc_project/Smbios/MDR_V2.errors.yaml
@@ -0,0 +1,9 @@
+- name: InvalidParameter
+  description: >
+    An invalid parameter is attempted.
+- name: UpdateInProgress
+  description: >
+    Update is in progress.
+- name: InvalidId
+  description: >
+    An invalid Id is attempted.
diff --git a/xyz/openbmc_project/Smbios/MDR_V2.interface.yaml b/xyz/openbmc_project/Smbios/MDR_V2.interface.yaml
new file mode 100644
index 0000000..f97700a
--- /dev/null
+++ b/xyz/openbmc_project/Smbios/MDR_V2.interface.yaml
@@ -0,0 +1,158 @@
+description: >
+    SMBIOS MDR V2 service
+methods:
+    - name: GetDirectoryInformation
+      description: >
+          Get the directory with directory index.
+      parameters:
+        - name: dirIndex
+          type: byte
+          description: >
+              Directory index of SMBIOS.
+      returns:
+        - name: dir
+          type: array[byte]
+          description: >
+            Directory of agent.
+      errors:
+        - self.Error.InvalidParameter
+
+    - name: GetDataInformation
+      description: >
+          Get the data info with id index and data set ID.
+      parameters:
+        - name: idIndex
+          type: byte
+          description: >
+              Index of SMBIOS directory.
+      returns:
+        - name: dataInfo
+          type: array[byte]
+          description: >
+            Data information of SMBIOS.
+      errors:
+        - self.Error.InvalidParameter
+
+    - name: SendDirectoryInformation
+      description: >
+           Send directory information to SMBIOS directory.
+      parameters:
+        - name: dirVersion
+          type: byte
+          description: >
+            A counter which increments each time directory updated.
+        - name: dirIndex
+          type: byte
+          description: >
+            Directory index of SMBIOS.
+        - name: returnedEntries
+          type: byte
+          description: >
+            Indicates number of directory entries.
+        - name: remainingEntries
+          type: byte
+          description: >
+            Remaining entries which are higher than index in this transfer.
+        - name: dirEntry
+          type: array[byte]
+          description: >
+            Data set ID of SMBIOS table.
+      returns:
+        - name: status
+          type: boolean
+          description: >
+            Need to continue directory transmisson or not.
+      errors:
+        - self.Error.InvalidParameter
+
+    - name: GetDataOffer
+      description: >
+           Get data set ID.
+      returns:
+        - name: offer
+          type: array[byte]
+          description: >
+            Data set ID.
+      errors:
+        - self.Error.UpdateInProgress
+
+    - name: SendDataInformation
+      description: >
+           Send data information with directory index.
+      parameters:
+        - name: idIndex
+          type: byte
+          description: >
+            Index of SMBIOS directory.
+        - name: flag
+          type: byte
+          description: >
+            Valid flag to set dir entry status.
+        - name: dataLen
+          type: uint32
+          description: >
+            The length of the data in bytes.
+        - name: dataVer
+          type: uint32
+          description: >
+            The version number of this data.
+        - name: timeStamp
+          type: uint32
+          description: >
+            Timestamp determinded by the agent.
+      returns:
+        - name: status
+          type: boolean
+          description: >
+            Whether data changes.
+      errors:
+        - self.Error.InvalidParameter
+
+    - name: FindIdIndex
+      description: >
+          Find id index by data info.
+      parameters:
+        - name: dataInfo
+          type: array[byte]
+          description: >
+            Data info of data entry.
+      returns:
+        - name: idIndex
+          type: int32
+          description: >
+            Id index of data entry.
+      errors:
+        - self.Error.InvalidId
+
+    - name: AgentSynchronizeData
+      description: >
+          Synchronize SMBIOS data from file.
+      returns:
+       - name: status
+         type: boolean
+         description: >
+           Whether synchronization succeed or not.
+
+    - name: SynchronizeDirectoryCommonData
+      description: >
+          Synchronize directory common data.
+      parameters:
+        - name: idIndex
+          type: byte
+          description: >
+            Index of SMBIOS directory.
+        - name: size
+          type: uint32
+          description: >
+           Size of data that BIOS prepare to transfer.
+      returns:
+        - name: commonData
+          type: array[uint32]
+          description: >
+            Directory common data includes data size, version and timestamp.
+
+properties:
+    - name: DirectoryEntries
+      type: byte
+      description: >
+        Numbers of directory entries.
diff --git a/xyz/openbmc_project/Smbios/README.md b/xyz/openbmc_project/Smbios/README.md
new file mode 100644
index 0000000..415ac52
--- /dev/null
+++ b/xyz/openbmc_project/Smbios/README.md
@@ -0,0 +1,22 @@
+# SMBIOS MDR V2
+
+## Overview
+SMBIOS MDR V2 service exposes D-Bus methods for SMBIOS Version 2 operations.
+
+### SMBIOS MDR V2 Interface
+SMBIOS MDR V2 interface `xyz.openbmc_project.Smbios.MDR_V2` provides following
+methods.
+#### methods
+* GetDirectoryInformation - Get the directory with directory index.
+* GetDataInformation - Get the data information with id index and data set ID.
+* SendDirectoryInformation - Send directory information to SMBIOS directory.
+* GetDataOffer - Get data set ID.
+* SendDataInformation - Send data information with directory index.
+* FindIdIndex - Find id index by data info.
+* SynchronizeDirectoryCommonData - Synchronize directory common data before
+SMBIOS data start to transfer.
+* AgentSynchronizeData  - Synchronize SMBIOS data from file after data transfer
+complete.
+
+#### properties
+* DirEntries - Numbers of directory entries. Default: 0