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| +-------------+       +-------------+       |     -SetPendingAttributes()    |      |       |    +----^-----+  |
66|                                             |     -GetPendingAttributes()    |      |       |         |        |
67| +-------------+       +-------------+       |     -SetAttribute()            |      |       |        LAN       |
68| |             |       |             |       |     -GetAttribute()            |      |       |         |        |
69| | HOST/ BIOS  +<-KCS->+  HOST-IPMID +<Dbus->+                                |      |Redfish|    +----V-----+  |
70| |             |       |             |       | Properities                    +<Dbus>+  API  |    |Redfish & |  |
71| +-----+-------+       +-------------+       |     -AllBaseAttributes         |      |       +<-->+BMCWeb    |  |
72|       |                                     |     -ResetBIOSSettings         |      |       |    +----^-----+  |
73|       |                                     |                                |      |       |         |        |
74|       |                                     |                                |      |       |         |        |
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-->| AllBaseAttributes           | ||
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
264
265#BIOS first boot
266   +--------------------------------------------------------------------------------------------------------------------+
267   | +-----------------------+             +---------------------------------------------------------------------------+|
268   | | BIOS                  |             |   BMC                                                                     ||
269   | |                       |             |  +-------------------------------+         +-----------------------------+||
270   | |                       |             |  |PLDM Interface (MCTP)          |         |RBC Daemon Manager           |||
271   | |                       |             |  | -Responsible for send /recv   |         |-Responsible for handle BIOS |||
272   | |                       |             |  |  data between BIOS and BMC    |         | configuration attributes.   |||
273   | |                       |             |  |                               |         | -AllBaseAttributes          |||
274   | |                       |             |  |                               |         | -Pending Attributes         |||
275   | |                       |             |  |                               |         | -FactoryDefaultSetting      |||
276   | |                       |             |  |                               |         | -BIOSPwdHashData            |||
277   + +-----------------------+             |  +-------------------------------+         +-----------------------------+||
278   | |Get the table info     |<---Req-/Res--> | Provide the table information |         |                             |||
279   | | & Check table Tag     |             |  |                               |         |                             |||
280   | |using GetBIOS table    |             |  |                               |         |                             |||
281   | |                       |             |  |                               |         |                             |||
282   | |Set BIOS string table  |<---Req-/Res--> | Get the string table          |         |                             |||
283   | | via Set BIOS table    |             |  |                               |         |                             |||
284   | |SetBIOSAttribute table |<---Req-/Res--> | Get the attributes table      |         |                             |||
285   | |SetBIOSAttributeValue  |<---Req-/Res--> | Get the attributes value table|         |                             |||
286   | |table via SetBIOStable |             |  |                               |         |                             |||
287   | |table via SetBIOStable |             |  |                               |         |                             |||
288   | |Init the BIOS config   |             |  | Send the attributes data in   |         |                             |||
289   | |Based on value.        |             |  | native to D-bus format        |--dbus-->| AllBaseAttributes           |||
290   | |via Set BIOS table     |             |  | by Setting AllBaseAttributes  |         |                             |||
291   | |                       |             |  |                               |         |                             |||
292   | | Continue the BIOS boot|             |  |                               |         |                             |||
293   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
294   |                                       +---------------------------------------------------------------------------+|
295   +---------------------------------------+----------------------------------------------------------------------------+
296
297
298#BIOS reset
299   +--------------------------------------------------------------------------------------------------------------------+
300   | +-----------------------+             +---------------------------------------------------------------------------+|
301   | | BIOS                  |             |   BMC                                                                     ||
302   | |                       |             |  +-------------------------------+         +-----------------------------+||
303   | |                       |             |  |PLDM Interface (MCTP)          |         |RBC Daemon Manager           |||
304   | |                       |             |  | -Responsible for send /recv   |         |-Responsible for handle BIOS |||
305   | |                       |             |  |  data between BIOS and BMC    |         | configuration attributes.   |||
306   | |                       |             |  |                               |         | -AllBaseAttributes          |||
307   | |                       |             |  |                               |         | -Pending Attributes         |||
308   | |                       |             |  |                               |         | -FactoryDefaultSetting      |||
309   | |                       |             |  |                               |         | -BIOSPwdHashData            |||
310   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
311   | |Get the table info     |<---Req-/Res--> | Provide the table information |         |                             |||
312   | | & Check table Tag     |             |  |                               |         |                             |||
313   | |using GetBIOS table    |             |  |                               |         |                             |||
314   | |                       |             |  |                               |         |                             |||
315   | | Get the Pending table |<---Req-/Res--> | Provide the Pending attributes|         |                             |||
316   | | using Get BIOS table  |             |  | table                         |         |                             |||
317   | |                       |             |  |                               |         |                             |||
318   | |SetBIOSAttributeValue  |<---Req-/Res--> | Get the attributes table      |         |                             |||
319   | |table via SetBIOStable.|             |  | Delete the Pending attributes |         |                             |||
320   | |Init the BIOS config   |             |  | table                         |         |                             |||
321   | |Based on value.        |             |  |                               |         |                             |||
322   | |                       |             |  | Send the attributes data in   |         |                             |||
323   | |                       |             |  | native to D-bus format by     |--dbus-->| AllBaseAttributes           |||
324   | | Reset the BIOS boot   |             |  | setting AllBaseAttributes     |         |                             |||
325   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
326   |                                       +---------------------------------------------------------------------------+|
327   +---------------------------------------+----------------------------------------------------------------------------+
328
329##Complete BIOS BMC flow for BIOS configuration in deferred update model
330```
331+----------------------------------------+                    +----------------------------------------+
332|                BIOS                    |                    |                  BMC                   |
333|                                        |                    |                                        |
334|  +----------------------------------+  |                    | +------------------------------------+ |
335|  | Send the BIOS capability  Support|  |--------KCS-------->| |1.Get the complete atttributes data.| |
336|  | Send the compressed BIOS file(or)|  |-MCTP/KCS/Redfish-->| |2.Validate and convert into         | |
337|  | Send PLDM data via MCTP  (or)    |  |                    | |  native to D-bus format.           | |
338|  | Send the Redfish host interface  |  |                    | |3.Expose the D-bus interface        | |
339|  +----------------------------------+  |                    | +------------------------------------+ |
340|                                        |                    |                                        |
341|  +----------------------------------+  |                    |                                        |
342|  | Get the file info & config status|   <-Get config status-|                                        |
343|  | - Any config changed or not      |  |                    |                                        |
344|  | - File checksum in BMC           |  |                    |                                        |
345|  | - New attribute values exist     |  |                    |                                        |
346|  +----------------------------------+  |                    |                                        |
347|                                        |                    |  +-----------------------------------+ |
348|  +----------------------------------+  |                    |  |                                   | |
349|  | If new attribute value exist     |<-|-----------------------|  Send the new value attributes    | |
350|  |           then                   |  |                    |  |  (Pending Attributes list)        | |
351|  | Get & Update the BIOS variables  | -| -----+             |  |                                   | |
352|  |                                  |  |      |             |  +-----------------------------------+ |
353|  +---------------+------------------+  |      |             |                                        |
354|                  |                     |      |             |                                        |
355|                  YES                   |      |             |                                        |
356|                  |                     |      |             |  +----------------------------------+  |
357|   +--------------V------------------+  |      |             |  |                                  |  |
358|   |  Send the updated data to BMC   |  |      |             |  | Update the BIOS attributes       |  |
359|   |                                 |------------------------->| (AllBaseBiosTables)              |  |
360|   +---------------------------------+  |      |             |  +----------------------------------+  |
361|                                        |      |             |                                        |
362|                                        |      |             |                                        |
363|   +---------------------------------+  |      |             |                                        |
364|   | Reset the BIOS for BIOS conf    |  |     NO             |                                        |
365|   | update                          |  |      |             |                                        |
366|   +---------------------------------+  |      |             |                                        |
367|                                        |      |             |                                        |
368|  +----------------------------------+  |      |             |                                        |
369|  |  Continue the BIOS boot          | <-------+             |                                        |
370|  +----------------------------------+  |                    |                                        |
371+----------------------------------------+                    +----------------------------------------+
372```
373
374##Complete BIOS BMC flow for BIOS configuration in immediate update model
375```
376+----------------------------------------+                    +----------------------------------------+
377|                BIOS                    |                    |                  BMC                   |
378|                                        |                    |                                        |
379|  +----------------------------------+  |                    | +------------------------------------+ |
380|  | Send the BIOS capability  Support|  |--------KCS-------->| |1.Get the complete atttributes data | |
381|  | Send the compressed BIOS file(or)|  |-MCTP/KCS/Redfish-->| |2.Validate and convert into         | |
382|  | Send PLDM data via MCTP  (or)    |  |                    | |  native to D-bus format.           | |
383|  | Send the Redfish host interface  |  |                    | |3.Expose the D-bus interface        | |
384|  +----------------------------------+  |                    | +------------------------------------+ |
385|                                        |                    |                                        |
386|                                        |                    | +------------------------------------+ |
387|                                        |                    | |PLDM can send complete all tables   | |
388|                                        |                    | | & send the native to D-bus format  | |
389|                                        |                    | | by Setting AllBaseAttributes       | |
390|                                        |                    | +------------------------------------+ |
391|                                        |                    | +------------------------------------+ |
392|                                        |                    | | If attribute  value changed then   | |
393|                                        |                    | | Biosconfig send signal to PLDM.    | |
394|                                        |                    | | PLDM read Pending attributes table | |
395|                                        |                    | | PLDM send the message to the host  | |
396|                                        |                    | | PLDM send the data to the host     | |
397|                                        |                    | +------------------------------------+ |
398|  +----------------------------------+  |                    | +------------------------------------+ |
399|  | Read the new Atributes value     |<-|----------------------| Send new Pending attributes table  | |
400|  |           and                    |  |                    | |                                    | |
401|  | Update in the BIOS structure     |  |                    | +------------------------------------+ |
402|  +---------------+------------------+  |                    |                                        |
403|                  |                     |                    |                                        |
404|                  YES                   |                    |                                        |
405|                  |                     |                    | +-----------------------------------+  |
406|   +--------------V------------------+  |                    | | Update the BIOS atrributes data.  |  |
407|   |  Send the updated data to BMC   |  |                    | | Discard the Pending attributes    |  |
408|   |                                 |------------------------>|                        table      |  |
409|   +---------------------------------+  |                    | +-----------------------------------+  |
410|                                        |                    |                                        |
411+----------------------------------------+                    +----------------------------------------+
412```
413RBC should create the Pending Attribute list whenever SetPendingAttributes &
414SetAttribute Method called and raise the PendingAttributesUpdated signal.
415RBC should preserve the Pending Attributes list across the BMC reset and
416RBC should clear the Pending Attributes list whenever new AllBaseBIOSTables
417received from BIOS.
418
419
420#Redfish interfaces for remote Bios configuration
421
422```
423 +-----------------------------------------------------------------------------------------------------------+
424 | +-------------------------+             +----------------------------------------------------------------+|
425 | | RBC Web tool - POSTMAN  |             |   BMC                                                          ||
426 | |  (Please refer the      |             |  +-----------------------+       +---------------------------+ ||
427 | |   below redfish example |             |  |Redfish Daemon         |       |RBC Daemon Manager         | ||
428 | |   for each request)     |             |  |-Responsible for handle|       |-Parse Bios Data,convert to| ||
429 | |                         |             |  |all Redfish request    |       | required format & return  | ||
430 | |                         |             |  +-----------------------+       +---------------------------+ ||
431 | +-------------------------+             |  +-----------------------+       +---------------------------+ ||
432 | |                         |             |  |                       |       |                           | ||
433 | |1.Get Current attributes |<---Req-/Res--> | Read AllBaseAttributes|<-dbus-| AllBaseAttributes         | ||
434 | |   name & value list     |             |  |                       |       |                           | ||
435 | |                         |             |  |                       |       |                           | ||
436 | |2.Get Attribute Registry |<---Req-/Res--> | Read AllBaseAttributes|<-dbus-| AllBaseAttributes         | ||
437 | |                         |             |  |                       |       |                           | ||
438 | |3.Change BIOS Password   |<---Req-/Res--> | Call RBC D-bus Method |-dbus->| ChangePassword()          | ||
439 | |                         |             |  |                       |       |                           | ||
440 | |4.Reset To default       |<---Req-/Res--> | Call RBC D-bus Method |-dbus->| ResetBiosSettings()       | ||
441 | |            settings     |             |  |                       |       |     -ResetFlag            | ||
442 | |5.Update new BIOS setting|<---Req-/Res--->| Call RBC D-bus Method |-dbus->| SetAttribute()            | ||
443 | |  (For single attribute) |             |  |                       |       |                           | ||
444 | |                         |             |  |                       |       |                           | ||
445 | |6.Get Pending attributes |<---Req-/Res--->| Call RBC D-bus Method |<-dbus-| GetPendingAttributes()    | ||
446 | |           list          |             |  |                       |       |                           | ||
447 | |7.Update new BIOS setting|<---Req-/Res--->| Call RBC D-bus Method |<-dbus-| SetPendingAttributes()    | ||
448 | |           list          |             |  |                       |       |                           | ||
449 | |  For multiple attributes|             |  |                       |       |                           | ||
450 | +-------------------------+             |  +-----------------------+       +---------------------------+ ||
451 |                                         +---------------------------------------------------------------+||
452 +-----------------------------------------+-----------------------------------------------------------------+
453```
4541. Get Current Attributes name and value list:
455   Get the current BIOS settings attribute name and value pair list.
456   GET Method - "https://<BMC IP address>/redfish/v1/Systems/system/Bios"
457
4582. Get Attribute Registry:
459   Get the detailed information about Bios Attribute like current value,
460   supported value, description, Menupath, Default value.
461   GET Method - "https://<BMC IP address>/redfish/v1/Registries/Bios"
462
4633. Change BIOS password:
464   ACTION - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword"
465
4664. Reset To default settings:
467   ACTION - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios"
468
4695. Update new BIOS settings (single attribute):
470   Use to send the new value for particular attribute or list of attributes.
471   PATCH Method - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings"
472  Ex:
473    Attribute name and new value : { "DdrFreqLimit" : 2400}
474
4756. Get the new pending value list:
476   Use to get the new pending attributes list.
477   GET Method - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings"
478   -Valid only in deferred model. For immediate update model, It will be empty.
479   Ex:
480    Attribute name and new value : { "DdrFreqLimit" : 2400,"QuietBoot",0x1 }
481
4827. Update new BIOS settings (multiple attributes):
483   Use to send the new value for particular attribute or list of attributes.
484   PATCH Method - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings"
485  Ex:
486    Attribute name and new value list : { "DdrFreqLimit" : 2400},"QuietBoot",0x1 }
487
488## Alternatives Considered
489Redfish Host specification definition is not completed and ready BIOS support
490also not available.
491There are 1000+ BIOS variables and storing in phosphor-settingsd is not optimal.
492
493## Impacts
494BIOS must support and follow RBC BIOS configuration flow.
495
496## Testing
497Able to change the BIOS configuration via BMC through LAN
498Able to change the BIOS setup password via BMC
499Compliance with Redfish will be tested using the Redfish Service Validator
500