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