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