1# Remote BIOS Configuration (RBC) via BMC
2
3Author: Suryakanth Sekar! ssekar
4
5Other contributors: Jia Chunhui Deepak Kodihalli Patrick Williams
6
7Created: 19-Nov-2019
8
9## Problem Description
10
11Current OpenBMC doesn't provide mechanism to configure the BIOS remotely. This
12is needed in data center to maintain several systems under same configuration.
13
14Remote BIOS Configuration provides ability for the user to view and modify BIOS
15setup configuration parameters remotely via a BMC at any Host state. New BIOS
16configuration parameters take effect immediately or next system reboot based on
17the host firmware support model.
18
19## Background and References
20
21[1]
22https://www.dmtf.org/sites/default/files/standards/documents/DSP0247_1.0.0.pdf
23[2] https://redfish.dmtf.org/schemas/v1/Bios.v1_1_0.json [3]
24https://redfish.dmtf.org/schemas/v1/AttributeRegistry.v1_3_2.json
25
26## Requirements
27
281. Mechanism to configure BIOS settings remotely over network interface.
292. BMC should support the ability to set the value of all BIOS variables to the
30   factory default state.
313. Based on the host firmware support model, BMC should support both Immediate
32   Update or Deferred update.
334. In deferred model, When the system is in S0, S3, S4 or S5 state. BMC will
34   send the updated BIOS variables on next BIOS boot only. It will not initiate
35   a BIOS boot immediately.
365. In immediate model, BMC should send message to the system firmware (BIOS)
37   Whenever settings are changed.
386. BMC should support BIOS attribute registry in redfish schema for BIOS
39   configuration.
407. BMC should provide secure way for updating BIOS setup password settings.
41   Detailed password handling design -TBD(will be resolve using ARM TrustZone)
42   Ex: Updating the BIOS password should be support only before end of post.
438. Remote BIOS configuration daemon should be independent of interface specific
44   data format.
459. BMC should able to take default / current settings from host and store &
46   expose that for out of band updates. 10.BMC should provide the new values to
47   the host.
48
49## Proposed Design
50
51```
52+----------------------------------------------------------------------------------------------------------------+
53| Remote BIOS configuration (RBC) via BMC                                                                        |
54|                                                                                                                |
55|                                                                                                                |
56| +-------------+       +-------------+       +--------------------------------+      +-------+                  |
57| |             |       |             |       |   RBC daemon                   |      |       |    +----------+  |
58| | NET/ Tools  +<-LAN->+ LAN-IPMID/  +<Dbus->+                                |      |       |    |Web client|  |
59| |             |       | REDFISH     |       |  Provide following Methods     |      |       |    |          |  |
60| +-------------+       +-------------+       |     -SetAttribute()            |      |       |    +----^-----+  |
61|                                             |     -GetAttribute()            |      |       |         |        |
62| +-------------+       +-------------+       |     -VerifyPassword()          |      |       |        LAN       |
63| |             |       |             |       |     -ChangePassword()          |      |       |         |        |
64| | HOST/ BIOS  +<-KCS->+  HOST-IPMID +<Dbus->+                                |      |Redfish|    +----V-----+  |
65| |             |       |             |       | Properties                     +<Dbus>+  API  |    |Redfish & |  |
66| +-----+-------+       +-------------+       |     -BaseBIOSTable             |      |       +<-->+BMCWeb    |  |
67|       |                                     |     -PendingAttributes         |      |       |    +----^-----+  |
68|       |                                     |     -ResetBIOSSettings         |      |       |         |        |
69|       |                                     |     -IsPasswordInitDone        |      |       |         |        |
70|       |                                     |                                |      |       |    +----V-----+  |
71|       |                                     |                                |      |       |    | Redfish  |  |
72|       |                                     |                                |      |       |    |  Host    |  |
73|       |                                     |                                |      |       |    | Interface|  |
74|       |                                     +----^-----------------+---------+      +-------+    +----------+  |
75|       |                                          |       PendingAttributesUpdated                              |
76|       |                                          |                 |    Signal                                 |
77|       |                                          |                 |                                           |
78|       |                                     +----V-----------------V---------+                                 |
79|       |                                     | PLDM daemon                    |                                 |
80|       |                                     | Collect the BIOS data & convert|                                 |
81|       +---------MCTP----------------------->| into native D-bus format and   |                                 |
82|                                             | send to the RBC                |                                 |
83|                                             +--------------------------------+                                 |
84+----------------------------------------------------------------------------------------------------------------+
85```
86
87##Intel uses the following logic
88
89BIOS send data in as Proprietary format to the BMC via IPMI interface. There are
90two types of proprietary XML format files in BIOS configuration. Type-0 contain
91full BIOS variables in XML format. (Generated by BIOS) Type-1 contain modified
92BIOS variables in XML format. (Generated by BMC)
93
94BIOS must provide BIOS capability via KCS interface in early boot stage. BIOS
95must send compressed proprietary XML type 0 file via IPMI command to the BMC.
96
97IPMI interface should decompress & validate the received XML Type 0. IPMI
98interface should convert the XML Type 0 into native to D-bus format and send to
99the RBC daemon.
100
101During BDS phase in BIOS. BIOS must get the existing XML info from BMC. If XML
102version/checksum is mismatch or XML Type 0 is not present in BMC, then BIOS must
103send XML type 0 to the BMC. If XML version and XML checksum matched & pending
104BIOS attributes list exist (XML Type 1) in BMC then BIOS must get pending BIOS
105configuration (XML Type 1) from BMC & update in BIOS region and send updated XML
106Type 0 to the BMC in order to intact again and then BIOS reset the system to
107reflect the updated values in BIOS boot.
108
109BIOS have default BIOS settings in BIOS non-volatile memory. BIOS can restore
110the default BIOS configuration based on the flag setting in OEM IPMI command
111issued during BIOS booting. So, restore default BIOS configuration can be done
112by this mechanism.
113
114RBC daemon should preserve the AllBiosTables, PendingAttributes list in
115non-volatile storage. Pending attributes list will be cleared whenever new
116attributes data received.
117
118```
119#Intel uses the following logic for BIOS first boot
120   +---------------------------------------------------------------------------------------------------------------------+
121   |                                                                                                                     |
122   | +-----------------------+             +----------------------------------------------------------------------------+|
123   | | BIOS                  |             |   BMC                                                                      ||
124   | |                       |             |  +-------------------------------+        +------------------------------+ ||
125   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
126   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
127   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
128   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
129   | |                       |             |  |                               |        | -Pending Attributes          | ||
130   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
131   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
132   | |                       |             |  +-------------------------------+        +------------------------------+ ||
133   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
134   | | Set BIOS capability   |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
135   | |                       |             |  |                               |         |                             | ||
136   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |--dbus-->| Set BIOSPwdHash data.       | ||
137   | |                       |             |  |                               |         |                             | ||
138   | |                       |             |  |                               |         |                             | ||
139   | |Check factory settings |<---Req-/Res--> |  Get the FactoryDefault prop  |<-dbus-- | Send FactoryDefaultSettings | ||
140   | |Init the BIOS config   |             |  |                               |         |                             | ||
141   | |Based on value.        |             |  |                               |         |                             | ||
142   | |Get the XML Type0 info |<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
143   | |Generate & compress    |             |  |                               |         |                             | ||
144   | |XML type 0 file        |             |  | Validate the XML Type 0       |         |Collect the Attributes Info  | ||
145   | |                       |             |  | Unzip the XML Type 0          |--dbus-->| AllBaseAttributes           | ||
146   | | Send the XML Type 0   |<---Req-/Res--->| Convert into D-bus format     |                                       | ||
147   | | via SetPayload command|             |  | and send to the RBC.          |         |                             | ||
148   | |                       |             |  |                               |         |                             | ||
149   | | Continue the BIOS boot|             |  |                               |         |                             | ||
150   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
151   |                                       +----------------------------------------------------------------------------+|
152   +---------------------------------------+-----------------------------------------------------------------------------+
153```
154
155```
156#Intel uses the following logic for BIOS reset
157   +---------------------------------------------------------------------------------------------------------------------+
158   |                                                                                                                     |
159   | +-----------------------+             +----------------------------------------------------------------------------+|
160   | | BIOS                  |             |   BMC                                                                      ||
161   | |                       |             |  +-------------------------------+        +------------------------------+ ||
162   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
163   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
164   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
165   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
166   | |                       |             |  |                               |        | -Pending Attributes          | ||
167   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
168   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
169   + |                       |             |  +-------------------------------+        +------------------------------+ ||
170   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
171   | |Set BIOS capability    |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
172   | |                       |             |  |                               |         |                             | ||
173   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |--dbus-->| Set BIOSPwdHash data        | ||
174   | |                       |             |  |                               |         |                             | ||
175   | |                       |             |  |                               |         |                             | ||
176   | |Check factory settings |<---Req-/Res--> | Get the FactoryDefault prop   |<-dbus-- | Send FactoryDefaultSettings | ||
177   | |Init the BIOS config   |             |  |                               |         |                             | ||
178   | |Based on value.        |             |  |                               |         |                             | ||
179   | |Get the XML Type 0 info|<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
180   | |Generate & compress    |             |  |                               |         |                             | ||
181   | |XML type 0 file.       |             |  |                               |         |Collect the Attributes Info  | ||
182   | |Check XML file Chksum. |             |  | Validate the XML Type 0       |--dbus-->| BaseBIOSTable               | ||
183   | |If Chksum mismatch     |<---Req-/Res--->| Unzip XML Type 0 & convert    |         |                             | ||
184   | |then send the payload  |             |  | into D-bus format and send to |         |                             | ||
185   | |via SetPayload.        |             |  | the RBC                       |         |                             | ||
186   | |Continue the BIOS boot |             |  |                               |         |                             | ||
187   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
188   |                                       +----------------------------------------------------------------------------+|
189   +---------------------------------------+-----------------------------------------------------------------------------+
190```
191
192```
193#Intel uses the following logic for BIOS reset and BMC have new values
194   +---------------------------------------------------------------------------------------------------------------------+
195   |                                                                                                                     |
196   | +-----------------------+             +----------------------------------------------------------------------------+|
197   | | BIOS                  |             |   BMC                                                                      ||
198   | |                       |             |  +-------------------------------+        +------------------------------+ ||
199   | |                       |             |  |                               |        |                              | ||
200   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
201   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
202   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
203   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
204   | |                       |             |  |                               |        | -Pending Attributes          | ||
205   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
206   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
207   + |                       |             |  +-------------------------------+        +------------------------------+ ||
208   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
209   | |Set BIOS capability    |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
210   | |                       |             |  |                               |         |                             | ||
211   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |---dbus->| Set BIOSPwdHash data        | ||
212   | |                       |             |  |                               |         |                             | ||
213   | |                       |             |  |                               |         |                             | ||
214   | |Check factory settings |<---Req-/Res--> | Get the FactoryDefault prop   |<--dbus--| Send FactoryDefaultSettings | ||
215   | |Init the BIOS config   |             |  |                               |         |                             | ||
216   | |Based on value.        |             |  |                               |         |                             | ||
217   | |Get the XML Type 0 info|<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
218   | |Generate & compress    |             |  |                               |         |                             | ||
219   | |XML Type 0 file.       |             |  |                               |         |                             | ||
220   | |Check XML file Chksum. |             |  |                               |         |                             | ||
221   | |If Chksum   match      |<---Req-/Res--->| Provide the XML Type 0        |         |                             | ||
222   | |then get the XML Type 1|             |  |                               |         |                             | ||
223   | |via GetPayload.        |             |  |                               |         |                             | ||
224   | |Get  the XML Type 1    |             |  |                               |         |                             | ||
225   | |via GetPayload command.|<---Req-/Res--->| Provide the XML Type 1        |         |                             | ||
226   | |                       |             |  |                               |         |                             | ||
227   | |Update the new value   |             |  |                               |         |                             | ||
228   | |and new chksum in      |<---Req-/Res--->| Get new XML Type 0 & convert  |--dbus-->| Collect the Atributes info  | ||
229   | |BIOS.                  |             |  | into native to D-bus format   |         | AllBaseAttributes           | ||
230   | |Reset the system.      |             |  |                               |         |                             | ||
231   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
232   |                                       +----------------------------------------------------------------------------+|
233   +---------------------------------------+-----------------------------------------------------------------------------+
234
235```
236
237##BIOS send the data in BIOS configuration PLDM via MCTP
238
239BIOS should update the BIOS settings via Set BIOS table PLDM command- BIOS
240string table, Attribute name table, Attribute value table via MCTP.
241
242RBC daemon should create pending BIOS attributes list based on the user input
243configuration and send PendingAttributesUpdated signal.
244
245PLDM daemon should register for PendingAttributesUpdated signal & RBC daemon
246should generate signal whenever attribute value changed by SetPendingAttributes,
247set attribute D-bus call. PLDM should Wait for PendingAttributesUpdated signal
248and pull the pending attributes value from RBC daemon. PLDM should delete the
249Pending attributes value table once its not valid or updated in BIOS. RBC should
250clear pending attributes list whenever new attributes data received.
251
252RBC daemon should preserve the AllBaseAttributes, PendingAttributes list in
253non-volatile storage. PLDM daemon should preserve BIOS tables in non-volatile
254storage. RBC and PLDM should restored the data whenever BMC reset.
255
256#BIOS first boot
257
258```
259
260   +--------------------------------------------------------------------------------------------------------------------+
261   | +-----------------------+             +---------------------------------------------------------------------------+|
262   | | BIOS                  |             |   BMC                                                                     ||
263   | |                       |             |  +-------------------------------+         +-----------------------------+||
264   | |                       |             |  |PLDM Interface (MCTP)          |         |RBC Daemon Manager           |||
265   | |                       |             |  | -Responsible for send /recv   |         |-Responsible for handle BIOS |||
266   | |                       |             |  |  data between BIOS and BMC    |         | configuration attributes.   |||
267   | |                       |             |  |                               |         | -AllBaseAttributes          |||
268   | |                       |             |  |                               |         | -Pending Attributes         |||
269   | |                       |             |  |                               |         | -FactoryDefaultSetting      |||
270   | |                       |             |  |                               |         | -BIOSPwdHashData            |||
271   + +-----------------------+             |  +-------------------------------+         +-----------------------------+||
272   | |Get the table info     |<---Req-/Res--> | Provide the table information |         |                             |||
273   | | & Check table Tag     |             |  |                               |         |                             |||
274   | |using GetBIOS table    |             |  |                               |         |                             |||
275   | |                       |             |  |                               |         |                             |||
276   | |Set BIOS string table  |<---Req-/Res--> | Get the string table          |         |                             |||
277   | | via Set BIOS table    |             |  |                               |         |                             |||
278   | |SetBIOSAttribute table |<---Req-/Res--> | Get the attributes table      |         |                             |||
279   | |SetBIOSAttributeValue  |<---Req-/Res--> | Get the attributes value table|         |                             |||
280   | |table via SetBIOStable |             |  |                               |         |                             |||
281   | |table via SetBIOStable |             |  |                               |         |                             |||
282   | |Init the BIOS config   |             |  | Send the attributes data in   |         |                             |||
283   | |Based on value.        |             |  | native to D-bus format        |--dbus-->| AllBaseAttributes           |||
284   | |via Set BIOS table     |             |  | by Setting AllBaseAttributes  |         |                             |||
285   | |                       |             |  |                               |         |                             |||
286   | | Continue the BIOS boot|             |  |                               |         |                             |||
287   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
288   |                                       +---------------------------------------------------------------------------+|
289   +---------------------------------------+----------------------------------------------------------------------------+
290
291
292#BIOS reset
293   +--------------------------------------------------------------------------------------------------------------------+
294   | +-----------------------+             +---------------------------------------------------------------------------+|
295   | | BIOS                  |             |   BMC                                                                     ||
296   | |                       |             |  +-------------------------------+         +-----------------------------+||
297   | |                       |             |  |PLDM Interface (MCTP)          |         |RBC Daemon Manager           |||
298   | |                       |             |  | -Responsible for send /recv   |         |-Responsible for handle BIOS |||
299   | |                       |             |  |  data between BIOS and BMC    |         | configuration attributes.   |||
300   | |                       |             |  |                               |         | -AllBaseAttributes          |||
301   | |                       |             |  |                               |         | -Pending Attributes         |||
302   | |                       |             |  |                               |         | -FactoryDefaultSetting      |||
303   | |                       |             |  |                               |         | -BIOSPwdHashData            |||
304   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
305   | |Get the table info     |<---Req-/Res--> | Provide the table information |         |                             |||
306   | | & Check table Tag     |             |  |                               |         |                             |||
307   | |using GetBIOS table    |             |  |                               |         |                             |||
308   | |                       |             |  |                               |         |                             |||
309   | | Get the Pending table |<---Req-/Res--> | Provide the Pending attributes|         |                             |||
310   | | using Get BIOS table  |             |  | table                         |         |                             |||
311   | |                       |             |  |                               |         |                             |||
312   | |SetBIOSAttributeValue  |<---Req-/Res--> | Get the attributes table      |         |                             |||
313   | |table via SetBIOStable.|             |  | Delete the Pending attributes |         |                             |||
314   | |Init the BIOS config   |             |  | table                         |         |                             |||
315   | |Based on value.        |             |  |                               |         |                             |||
316   | |                       |             |  | Send the attributes data in   |         |                             |||
317   | |                       |             |  | native to D-bus format by     |--dbus-->| AllBaseAttributes           |||
318   | | Reset the BIOS boot   |             |  | setting AllBaseAttributes     |         |                             |||
319   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
320   |                                       +---------------------------------------------------------------------------+|
321   +---------------------------------------+----------------------------------------------------------------------------+
322
323```
324
325##Complete BIOS BMC flow for BIOS configuration in deferred update model
326
327```
328+----------------------------------------+                    +----------------------------------------+
329|                BIOS                    |                    |                  BMC                   |
330|                                        |                    |                                        |
331|  +----------------------------------+  |                    | +------------------------------------+ |
332|  | Send the BIOS capability  Support|  |--------KCS-------->| |1.Get the complete atttributes data.| |
333|  | Send the compressed BIOS file(or)|  |-MCTP/KCS/Redfish-->| |2.Validate and convert into         | |
334|  | Send PLDM data via MCTP  (or)    |  |                    | |  native to D-bus format.           | |
335|  | Send the Redfish host interface  |  |                    | |3.Expose the D-bus interface        | |
336|  +----------------------------------+  |                    | +------------------------------------+ |
337|                                        |                    |                                        |
338|  +----------------------------------+  |                    |                                        |
339|  | Get the file info & config status|   <-Get config status-|                                        |
340|  | - Any config changed or not      |  |                    |                                        |
341|  | - File checksum in BMC           |  |                    |                                        |
342|  | - New attribute values exist     |  |                    |                                        |
343|  +----------------------------------+  |                    |                                        |
344|                                        |                    |  +-----------------------------------+ |
345|  +----------------------------------+  |                    |  |                                   | |
346|  | If new attribute value exist     |<-|-----------------------|  Send the new value attributes    | |
347|  |           then                   |  |                    |  |  (Pending Attributes list)        | |
348|  | Get & Update the BIOS variables  | -| -----+             |  |                                   | |
349|  |                                  |  |      |             |  +-----------------------------------+ |
350|  +---------------+------------------+  |      |             |                                        |
351|                  |                     |      |             |                                        |
352|                  YES                   |      |             |                                        |
353|                  |                     |      |             |  +----------------------------------+  |
354|   +--------------V------------------+  |      |             |  |                                  |  |
355|   |  Send the updated data to BMC   |  |      |             |  | Update the BIOS attributes       |  |
356|   |                                 |------------------------->| (BaseBIOSTable)                  |  |
357|   +---------------------------------+  |      |             |  +----------------------------------+  |
358|                                        |      |             |                                        |
359|                                        |      |             |                                        |
360|   +---------------------------------+  |      |             |                                        |
361|   | Reset the BIOS for BIOS conf    |  |     NO             |                                        |
362|   | update                          |  |      |             |                                        |
363|   +---------------------------------+  |      |             |                                        |
364|                                        |      |             |                                        |
365|  +----------------------------------+  |      |             |                                        |
366|  |  Continue the BIOS boot          | <-------+             |                                        |
367|  +----------------------------------+  |                    |                                        |
368+----------------------------------------+                    +----------------------------------------+
369```
370
371##Complete BIOS BMC flow for BIOS configuration in immediate update model
372
373```
374+----------------------------------------+                    +----------------------------------------+
375|                BIOS                    |                    |                  BMC                   |
376|                                        |                    |                                        |
377|  +----------------------------------+  |                    | +------------------------------------+ |
378|  | Send the BIOS capability  Support|  |--------KCS-------->| |1.Get the complete atttributes data | |
379|  | Send the compressed BIOS file(or)|  |-MCTP/KCS/Redfish-->| |2.Validate and convert into         | |
380|  | Send PLDM data via MCTP  (or)    |  |                    | |  native to D-bus format.           | |
381|  | Send the Redfish host interface  |  |                    | |3.Expose the D-bus interface        | |
382|  +----------------------------------+  |                    | +------------------------------------+ |
383|                                        |                    |                                        |
384|                                        |                    | +------------------------------------+ |
385|                                        |                    | |PLDM can send complete all tables   | |
386|                                        |                    | | & send the native to D-bus format  | |
387|                                        |                    | | by Setting AllBaseAttributes       | |
388|                                        |                    | +------------------------------------+ |
389|                                        |                    | +------------------------------------+ |
390|                                        |                    | | If attribute  value changed then   | |
391|                                        |                    | | Biosconfig send signal to PLDM.    | |
392|                                        |                    | | PLDM read Pending attributes table | |
393|                                        |                    | | PLDM send the message to the host  | |
394|                                        |                    | | PLDM send the data to the host     | |
395|                                        |                    | +------------------------------------+ |
396|  +----------------------------------+  |                    | +------------------------------------+ |
397|  | Read the new Atributes value     |<-|----------------------| Send new Pending attributes table  | |
398|  |           and                    |  |                    | |                                    | |
399|  | Update in the BIOS structure     |  |                    | +------------------------------------+ |
400|  +---------------+------------------+  |                    |                                        |
401|                  |                     |                    |                                        |
402|                  YES                   |                    |                                        |
403|                  |                     |                    | +-----------------------------------+  |
404|   +--------------V------------------+  |                    | | Update the BIOS atrributes data.  |  |
405|   |  Send the updated data to BMC   |  |                    | | Discard the Pending attributes    |  |
406|   |                                 |------------------------>|                        table      |  |
407|   +---------------------------------+  |                    | +-----------------------------------+  |
408|                                        |                    |                                        |
409+----------------------------------------+                    +----------------------------------------+
410```
411
412RBC should create the Pending Attribute list whenever SetPendingAttributes &
413SetAttribute Method called and raise the PendingAttributesUpdated signal. RBC
414should preserve the Pending Attributes list across the BMC reset and RBC should
415clear the Pending Attributes list whenever new AllBaseBIOSTables received from
416BIOS.
417
418#Redfish interfaces for remote Bios configuration
419
420```
421 +-----------------------------------------------------------------------------------------------------------+
422 | +-------------------------+             +----------------------------------------------------------------+|
423 | | RBC Web tool - POSTMAN  |             |   BMC                                                          ||
424 | |  (Please refer the      |             |  +-----------------------+       +---------------------------+ ||
425 | |   below redfish example |             |  |Redfish Daemon         |       |RBC Daemon Manager         | ||
426 | |   for each request)     |             |  |-Responsible for handle|       |-Parse Bios Data,convert to| ||
427 | |                         |             |  |all Redfish request    |       | required format & return  | ||
428 | |                         |             |  +-----------------------+       +---------------------------+ ||
429 | +-------------------------+             |  +-----------------------+       +---------------------------+ ||
430 | |                         |             |  |                       |       |                           | ||
431 | |1.Get Current attributes |<---Req-/Res--> | Read BaseBIOSTable    |<-dbus-| BaseBIOSTable             | ||
432 | |   name & value list     |             |  |                       |       |                           | ||
433 | |                         |             |  |                       |       |                           | ||
434 | |2.Get Attribute Registry |<---Req-/Res--> | Read BaseBIOSTable    |<-dbus-| BaseBIOSTable             | ||
435 | |                         |             |  |                       |       |                           | ||
436 | |3.Change BIOS Password   |<---Req-/Res--> | Call RBC D-bus Method |-dbus->| ChangePassword()          | ||
437 | |                         |             |  |                       |       |                           | ||
438 | |4.Reset To default       |<---Req-/Res--> | Set ResetBIOSSettings |-dbus->| ResetBiosSettings         | ||
439 | |            settings     |             |  |                       |       |     -ResetFlag            | ||
440 | |5.Update new BIOS setting|<---Req-/Res--->| Call RBC D-bus Method |-dbus->| SetAttribute()            | ||
441 | |  (For single attribute) |             |  |                       |       |                           | ||
442 | |                         |             |  |                       |       |                           | ||
443 | |6.Get Pending attributes |<---Req-/Res--->| Get PendingAttributes |<-dbus-| PendingAttributes         | ||
444 | |           list          |             |  |                       |       |                           | ||
445 | |7.Update new BIOS setting|<---Req-/Res--->| Set PendingAttributes |<-dbus-| PendingAttributes         | ||
446 | |           list          |             |  |                       |       |                           | ||
447 | |  For multiple attributes|             |  |                       |       |                           | ||
448 | +-------------------------+             |  +-----------------------+       +---------------------------+ ||
449 |                                         +---------------------------------------------------------------+||
450 +-----------------------------------------+-----------------------------------------------------------------+
451```
452
4531. Get Current Attributes name and value list: Get the current BIOS settings
454   attribute name and value pair list. GET Method -
455   "https://<BMC IP address>/redfish/v1/Systems/system/Bios"
456
4572. Get Attribute Registry: Get the detailed information about Bios Attribute
458   like current value, supported value, description, Menupath, Default value.
459   GET Method - "https://<BMC IP address>/redfish/v1/Registries/Bios"
460
4613. Change BIOS password: ACTION -
462   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword"
463
4644. Reset To default settings: ACTION -
465   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios"
466
4675. Update new BIOS settings (single attribute): Use to send the new value for
468   particular attribute or list of attributes. PATCH Method -
469   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings" Ex:
470   Attribute name and new value : { "DdrFreqLimit" : 2400}
471
4726. Get the new pending value list: Use to get the new pending attributes list.
473   GET Method -
474   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings" -Valid
475   only in deferred model. For immediate update model, It will be empty. Ex:
476   Attribute name and new value : { "DdrFreqLimit" : 2400,"QuietBoot",0x1 }
477
4787. Update new BIOS settings (multiple attributes): Use to send the new value for
479   particular attribute or list of attributes. PATCH Method -
480   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings" Ex:
481   Attribute name and new value list : { "DdrFreqLimit" : 2400},"QuietBoot",0x1
482   }
483
484## Alternatives Considered
485
486Redfish Host specification definition is not completed and ready BIOS support
487also not available. There are 1000+ BIOS variables and storing in
488phosphor-settingsd is not optimal.
489
490## Impacts
491
492BIOS must support and follow RBC BIOS configuration flow.
493
494## Testing
495
496Able to change the BIOS configuration via BMC through LAN Able to change the
497BIOS setup password via BMC Compliance with Redfish will be tested using the
498Redfish Service Validator
499