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