xref: /openbmc/docs/designs/remote-bios-configuration.md (revision 754b1048bacca146a1b718b7df336dd7c8606cf8)
198f694ddSPatrick Williams# Remote BIOS Configuration (RBC) via BMC
298f694ddSPatrick Williams
398f694ddSPatrick WilliamsAuthor:
498f694ddSPatrick Williams  Suryakanth Sekar! ssekar
598f694ddSPatrick Williams
698f694ddSPatrick WilliamsPrimary assignee:
798f694ddSPatrick Williams  Suryakanth Sekar! ssekar
898f694ddSPatrick Williams
998f694ddSPatrick WilliamsOther contributors:
1098f694ddSPatrick Williams  Jia Chunhui
1198f694ddSPatrick Williams  Deepak Kodihalli
1298f694ddSPatrick Williams  Patrick Williams
1398f694ddSPatrick Williams
1498f694ddSPatrick WilliamsCreated: 19-Nov-2019
1598f694ddSPatrick Williams
1698f694ddSPatrick Williams## Problem Description
1798f694ddSPatrick WilliamsCurrent OpenBMC doesn't provide mechanism to configure the BIOS remotely.
1898f694ddSPatrick WilliamsThis is needed in data center to maintain several systems under
1998f694ddSPatrick Williamssame configuration.
2098f694ddSPatrick Williams
2198f694ddSPatrick WilliamsRemote BIOS Configuration provides ability for the user to view and modify
2298f694ddSPatrick WilliamsBIOS setup configuration parameters remotely via a BMC at any Host state.
2398f694ddSPatrick WilliamsNew BIOS configuration parameters take effect immediately or next
2498f694ddSPatrick Williamssystem reboot based on the host firmware support model.
2598f694ddSPatrick Williams
2698f694ddSPatrick Williams## Background and References
2798f694ddSPatrick Williams[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0247_1.0.0.pdf
2898f694ddSPatrick Williams[2] https://redfish.dmtf.org/schemas/v1/Bios.v1_1_0.json
2998f694ddSPatrick Williams[3] https://redfish.dmtf.org/schemas/v1/AttributeRegistry.v1_3_2.json
3098f694ddSPatrick Williams
3198f694ddSPatrick Williams## Requirements
3298f694ddSPatrick Williams1. Mechanism to configure BIOS settings remotely over network interface.
3398f694ddSPatrick Williams2. BMC should support the ability to set the value of all BIOS variables
3498f694ddSPatrick Williams   to the factory default state.
3598f694ddSPatrick Williams3. Based on the host firmware support model, BMC should support both
3698f694ddSPatrick Williams   Immediate Update or Deferred update.
3798f694ddSPatrick Williams4. In deferred model, When the system is in S0, S3, S4 or S5 state.
3898f694ddSPatrick Williams   BMC will send the updated BIOS variables on next BIOS boot only.
3998f694ddSPatrick Williams   It will not initiate a BIOS boot immediately.
4098f694ddSPatrick Williams5. In immediate model, BMC should send message to the system firmware (BIOS)
4198f694ddSPatrick Williams   Whenever settings are changed.
4298f694ddSPatrick Williams6. BMC should support BIOS attribute registry in redfish schema for
4398f694ddSPatrick Williams   BIOS configuration.
4498f694ddSPatrick Williams7. BMC should provide secure way for updating BIOS setup password settings.
4598f694ddSPatrick Williams   Detailed password handling design -TBD(will be resolve using ARM TrustZone)
4698f694ddSPatrick WilliamsEx: Updating the BIOS password should be support only before end of post.
4798f694ddSPatrick Williams8. Remote BIOS configuration daemon should be independent of interface specific
4898f694ddSPatrick Williams   data format.
4998f694ddSPatrick Williams9. BMC should able to take default / current settings from host and store &
5098f694ddSPatrick Williams   expose that for out of band updates.
5198f694ddSPatrick Williams10.BMC should provide the new values to the host.
5298f694ddSPatrick Williams
5398f694ddSPatrick Williams
5498f694ddSPatrick Williams## Proposed Design
5598f694ddSPatrick Williams
5698f694ddSPatrick Williams```
5798f694ddSPatrick Williams+----------------------------------------------------------------------------------------------------------------+
5898f694ddSPatrick Williams| Remote BIOS configuration (RBC) via BMC                                                                        |
5998f694ddSPatrick Williams|                                                                                                                |
6098f694ddSPatrick Williams|                                                                                                                |
6198f694ddSPatrick Williams| +-------------+       +-------------+       +--------------------------------+      +-------+                  |
6298f694ddSPatrick Williams| |             |       |             |       |   RBC daemon                   |      |       |    +----------+  |
6398f694ddSPatrick Williams| | NET/ Tools  +<-LAN->+ LAN-IPMID/  +<Dbus->+                                |      |       |    |Web client|  |
6498f694ddSPatrick Williams| |             |       | REDFISH     |       |  Provide following Methods     |      |       |    |          |  |
65*754b1048SSuryakanth Sekar| +-------------+       +-------------+       |     -SetAttribute()            |      |       |    +----^-----+  |
66*754b1048SSuryakanth Sekar|                                             |     -GetAttribute()            |      |       |         |        |
67*754b1048SSuryakanth Sekar| +-------------+       +-------------+       |     -VerifyPassword()          |      |       |        LAN       |
68*754b1048SSuryakanth Sekar| |             |       |             |       |     -ChangePassword()          |      |       |         |        |
6998f694ddSPatrick Williams| | HOST/ BIOS  +<-KCS->+  HOST-IPMID +<Dbus->+                                |      |Redfish|    +----V-----+  |
70*754b1048SSuryakanth Sekar| |             |       |             |       | Properties                     +<Dbus>+  API  |    |Redfish & |  |
71*754b1048SSuryakanth Sekar| +-----+-------+       +-------------+       |     -BaseBIOSTable             |      |       +<-->+BMCWeb    |  |
72*754b1048SSuryakanth Sekar|       |                                     |     -PendingAttributes         |      |       |    +----^-----+  |
73*754b1048SSuryakanth Sekar|       |                                     |     -ResetBIOSSettings         |      |       |         |        |
74*754b1048SSuryakanth Sekar|       |                                     |     -IsPasswordInitDone        |      |       |         |        |
7598f694ddSPatrick Williams|       |                                     |                                |      |       |    +----V-----+  |
7698f694ddSPatrick Williams|       |                                     |                                |      |       |    | Redfish  |  |
7798f694ddSPatrick Williams|       |                                     |                                |      |       |    |  Host    |  |
7898f694ddSPatrick Williams|       |                                     |                                |      |       |    | Interface|  |
7998f694ddSPatrick Williams|       |                                     +----^-----------------+---------+      +-------+    +----------+  |
8098f694ddSPatrick Williams|       |                                          |       PendingAttributesUpdated                              |
8198f694ddSPatrick Williams|       |                                          |                 |    Signal                                 |
8298f694ddSPatrick Williams|       |                                          |                 |                                           |
8398f694ddSPatrick Williams|       |                                     +----V-----------------V---------+                                 |
8498f694ddSPatrick Williams|       |                                     | PLDM daemon                    |                                 |
8598f694ddSPatrick Williams|       |                                     | Collect the BIOS data & convert|                                 |
8698f694ddSPatrick Williams|       +---------MCTP----------------------->| into native D-bus format and   |                                 |
8798f694ddSPatrick Williams|                                             | send to the RBC                |                                 |
8898f694ddSPatrick Williams|                                             +--------------------------------+                                 |
8998f694ddSPatrick Williams+----------------------------------------------------------------------------------------------------------------+
9098f694ddSPatrick Williams```
9198f694ddSPatrick Williams
9298f694ddSPatrick Williams
9398f694ddSPatrick Williams
9498f694ddSPatrick Williams##Intel uses the following logic
9598f694ddSPatrick Williams
9698f694ddSPatrick WilliamsBIOS send data in as Proprietary format to the BMC via IPMI interface.
9798f694ddSPatrick WilliamsThere are two types of proprietary XML format files in BIOS configuration.
9898f694ddSPatrick WilliamsType-0 contain full BIOS variables in XML format. (Generated by BIOS)
9998f694ddSPatrick WilliamsType-1 contain modified BIOS variables in XML format. (Generated by BMC)
10098f694ddSPatrick Williams
10198f694ddSPatrick WilliamsBIOS must provide BIOS capability via KCS interface in early boot stage.
10298f694ddSPatrick WilliamsBIOS must send compressed proprietary XML type 0 file via
10398f694ddSPatrick WilliamsIPMI command to the BMC.
10498f694ddSPatrick Williams
10598f694ddSPatrick WilliamsIPMI interface should decompress & validate the received XML Type 0.
10698f694ddSPatrick WilliamsIPMI interface should convert the XML Type 0 into native to D-bus format
10798f694ddSPatrick Williamsand send to the RBC daemon.
10898f694ddSPatrick Williams
10998f694ddSPatrick Williams
11098f694ddSPatrick WilliamsDuring BDS phase in BIOS. BIOS must get the existing XML info from BMC.
11198f694ddSPatrick WilliamsIf XML version/checksum is mismatch or XML Type 0 is not present in BMC, then
11298f694ddSPatrick WilliamsBIOS must send XML type 0 to the BMC. If XML version and XML checksum matched
11398f694ddSPatrick Williams& pending BIOS attributes list exist (XML Type 1) in BMC then BIOS must get
11498f694ddSPatrick Williamspending BIOS configuration (XML Type 1) from BMC & update in BIOS region and
11598f694ddSPatrick Williamssend updated XML Type 0 to the BMC in order to intact again and then BIOS reset
11698f694ddSPatrick Williamsthe system to reflect the updated values in BIOS boot.
11798f694ddSPatrick Williams
11898f694ddSPatrick WilliamsBIOS have default BIOS settings in BIOS non-volatile memory. BIOS can restore
11998f694ddSPatrick Williamsthe default BIOS configuration based on the flag setting in OEM IPMI command
12098f694ddSPatrick Williamsissued during BIOS booting.
12198f694ddSPatrick WilliamsSo, restore default BIOS configuration can be done by this mechanism.
12298f694ddSPatrick Williams
12398f694ddSPatrick WilliamsRBC daemon should preserve the AllBiosTables, PendingAttributes list in
12498f694ddSPatrick Williamsnon-volatile storage.
12598f694ddSPatrick WilliamsPending attributes list will be cleared whenever new attributes data received.
12698f694ddSPatrick Williams
12798f694ddSPatrick Williams```
12898f694ddSPatrick Williams#Intel uses the following logic for BIOS first boot
12998f694ddSPatrick Williams   +---------------------------------------------------------------------------------------------------------------------+
13098f694ddSPatrick Williams   |                                                                                                                     |
13198f694ddSPatrick Williams   | +-----------------------+             +----------------------------------------------------------------------------+|
13298f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                      ||
13398f694ddSPatrick Williams   | |                       |             |  +-------------------------------+        +------------------------------+ ||
13498f694ddSPatrick Williams   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
13598f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
13698f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
13798f694ddSPatrick Williams   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
13898f694ddSPatrick Williams   | |                       |             |  |                               |        | -Pending Attributes          | ||
13998f694ddSPatrick Williams   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
14098f694ddSPatrick Williams   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
14198f694ddSPatrick Williams   | |                       |             |  +-------------------------------+        +------------------------------+ ||
14298f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
14398f694ddSPatrick Williams   | | Set BIOS capability   |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
14498f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
14598f694ddSPatrick Williams   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |--dbus-->| Set BIOSPwdHash data.       | ||
14698f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
14798f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
14898f694ddSPatrick Williams   | |Check factory settings |<---Req-/Res--> |  Get the FactoryDefault prop  |<-dbus-- | Send FactoryDefaultSettings | ||
14998f694ddSPatrick Williams   | |Init the BIOS config   |             |  |                               |         |                             | ||
15098f694ddSPatrick Williams   | |Based on value.        |             |  |                               |         |                             | ||
15198f694ddSPatrick Williams   | |Get the XML Type0 info |<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
15298f694ddSPatrick Williams   | |Generate & compress    |             |  |                               |         |                             | ||
15398f694ddSPatrick Williams   | |XML type 0 file        |             |  | Validate the XML Type 0       |         |Collect the Attributes Info  | ||
15498f694ddSPatrick Williams   | |                       |             |  | Unzip the XML Type 0          |--dbus-->| AllBaseAttributes           | ||
15598f694ddSPatrick Williams   | | Send the XML Type 0   |<---Req-/Res--->| Convert into D-bus format     |                                       | ||
15698f694ddSPatrick Williams   | | via SetPayload command|             |  | and send to the RBC.          |         |                             | ||
15798f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
15898f694ddSPatrick Williams   | | Continue the BIOS boot|             |  |                               |         |                             | ||
15998f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
16098f694ddSPatrick Williams   |                                       +----------------------------------------------------------------------------+|
16198f694ddSPatrick Williams   +---------------------------------------+-----------------------------------------------------------------------------+
16298f694ddSPatrick Williams```
16398f694ddSPatrick Williams```
16498f694ddSPatrick Williams#Intel uses the following logic for BIOS reset
16598f694ddSPatrick Williams   +---------------------------------------------------------------------------------------------------------------------+
16698f694ddSPatrick Williams   |                                                                                                                     |
16798f694ddSPatrick Williams   | +-----------------------+             +----------------------------------------------------------------------------+|
16898f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                      ||
16998f694ddSPatrick Williams   | |                       |             |  +-------------------------------+        +------------------------------+ ||
17098f694ddSPatrick Williams   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
17198f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
17298f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
17398f694ddSPatrick Williams   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
17498f694ddSPatrick Williams   | |                       |             |  |                               |        | -Pending Attributes          | ||
17598f694ddSPatrick Williams   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
17698f694ddSPatrick Williams   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
17798f694ddSPatrick Williams   + |                       |             |  +-------------------------------+        +------------------------------+ ||
17898f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
17998f694ddSPatrick Williams   | |Set BIOS capability    |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
18098f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
18198f694ddSPatrick Williams   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |--dbus-->| Set BIOSPwdHash data        | ||
18298f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
18398f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
18498f694ddSPatrick Williams   | |Check factory settings |<---Req-/Res--> | Get the FactoryDefault prop   |<-dbus-- | Send FactoryDefaultSettings | ||
18598f694ddSPatrick Williams   | |Init the BIOS config   |             |  |                               |         |                             | ||
18698f694ddSPatrick Williams   | |Based on value.        |             |  |                               |         |                             | ||
18798f694ddSPatrick Williams   | |Get the XML Type 0 info|<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
18898f694ddSPatrick Williams   | |Generate & compress    |             |  |                               |         |                             | ||
18998f694ddSPatrick Williams   | |XML type 0 file.       |             |  |                               |         |Collect the Attributes Info  | ||
190*754b1048SSuryakanth Sekar   | |Check XML file Chksum. |             |  | Validate the XML Type 0       |--dbus-->| BaseBIOSTable               | ||
19198f694ddSPatrick Williams   | |If Chksum mismatch     |<---Req-/Res--->| Unzip XML Type 0 & convert    |         |                             | ||
19298f694ddSPatrick Williams   | |then send the payload  |             |  | into D-bus format and send to |         |                             | ||
19398f694ddSPatrick Williams   | |via SetPayload.        |             |  | the RBC                       |         |                             | ||
19498f694ddSPatrick Williams   | |Continue the BIOS boot |             |  |                               |         |                             | ||
19598f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
19698f694ddSPatrick Williams   |                                       +----------------------------------------------------------------------------+|
19798f694ddSPatrick Williams   +---------------------------------------+-----------------------------------------------------------------------------+
19898f694ddSPatrick Williams```
19998f694ddSPatrick Williams```
20098f694ddSPatrick Williams#Intel uses the following logic for BIOS reset and BMC have new values
20198f694ddSPatrick Williams   +---------------------------------------------------------------------------------------------------------------------+
20298f694ddSPatrick Williams   |                                                                                                                     |
20398f694ddSPatrick Williams   | +-----------------------+             +----------------------------------------------------------------------------+|
20498f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                      ||
20598f694ddSPatrick Williams   | |                       |             |  +-------------------------------+        +------------------------------+ ||
20698f694ddSPatrick Williams   | |                       |             |  |                               |        |                              | ||
20798f694ddSPatrick Williams   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
20898f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
20998f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
21098f694ddSPatrick Williams   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
21198f694ddSPatrick Williams   | |                       |             |  |                               |        | -Pending Attributes          | ||
21298f694ddSPatrick Williams   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
21398f694ddSPatrick Williams   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
21498f694ddSPatrick Williams   + |                       |             |  +-------------------------------+        +------------------------------+ ||
21598f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
21698f694ddSPatrick Williams   | |Set BIOS capability    |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
21798f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
21898f694ddSPatrick Williams   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |---dbus->| Set BIOSPwdHash data        | ||
21998f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
22098f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
22198f694ddSPatrick Williams   | |Check factory settings |<---Req-/Res--> | Get the FactoryDefault prop   |<--dbus--| Send FactoryDefaultSettings | ||
22298f694ddSPatrick Williams   | |Init the BIOS config   |             |  |                               |         |                             | ||
22398f694ddSPatrick Williams   | |Based on value.        |             |  |                               |         |                             | ||
22498f694ddSPatrick Williams   | |Get the XML Type 0 info|<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
22598f694ddSPatrick Williams   | |Generate & compress    |             |  |                               |         |                             | ||
22698f694ddSPatrick Williams   | |XML Type 0 file.       |             |  |                               |         |                             | ||
22798f694ddSPatrick Williams   | |Check XML file Chksum. |             |  |                               |         |                             | ||
22898f694ddSPatrick Williams   | |If Chksum   match      |<---Req-/Res--->| Provide the XML Type 0        |         |                             | ||
22998f694ddSPatrick Williams   | |then get the XML Type 1|             |  |                               |         |                             | ||
23098f694ddSPatrick Williams   | |via GetPayload.        |             |  |                               |         |                             | ||
23198f694ddSPatrick Williams   | |Get  the XML Type 1    |             |  |                               |         |                             | ||
23298f694ddSPatrick Williams   | |via GetPayload command.|<---Req-/Res--->| Provide the XML Type 1        |         |                             | ||
23398f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
23498f694ddSPatrick Williams   | |Update the new value   |             |  |                               |         |                             | ||
23598f694ddSPatrick Williams   | |and new chksum in      |<---Req-/Res--->| Get new XML Type 0 & convert  |--dbus-->| Collect the Atributes info  | ||
23698f694ddSPatrick Williams   | |BIOS.                  |             |  | into native to D-bus format   |         | AllBaseAttributes           | ||
23798f694ddSPatrick Williams   | |Reset the system.      |             |  |                               |         |                             | ||
23898f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
23998f694ddSPatrick Williams   |                                       +----------------------------------------------------------------------------+|
24098f694ddSPatrick Williams   +---------------------------------------+-----------------------------------------------------------------------------+
24198f694ddSPatrick Williams
24298f694ddSPatrick Williams```
24398f694ddSPatrick Williams
24498f694ddSPatrick Williams##BIOS send the data in BIOS configuration PLDM via MCTP
24598f694ddSPatrick Williams
24698f694ddSPatrick WilliamsBIOS should update the BIOS settings via Set BIOS table PLDM command-
24798f694ddSPatrick WilliamsBIOS string table, Attribute name table, Attribute value table via MCTP.
24898f694ddSPatrick Williams
24998f694ddSPatrick WilliamsRBC daemon should create pending BIOS attributes list based on the
25098f694ddSPatrick Williamsuser input configuration and send PendingAttributesUpdated signal.
25198f694ddSPatrick Williams
25298f694ddSPatrick WilliamsPLDM daemon should register for PendingAttributesUpdated signal & RBC daemon
25398f694ddSPatrick Williamsshould generate signal whenever attribute value changed by SetPendingAttributes,
25498f694ddSPatrick Williamsset attribute D-bus call. PLDM should Wait for PendingAttributesUpdated signal
25598f694ddSPatrick Williamsand pull the pending attributes value from RBC daemon. PLDM should delete the
25698f694ddSPatrick WilliamsPending attributes value table once its not valid or updated in BIOS.
25798f694ddSPatrick WilliamsRBC should clear pending attributes list whenever new attributes data received.
25898f694ddSPatrick Williams
25998f694ddSPatrick WilliamsRBC daemon should preserve the AllBaseAttributes, PendingAttributes list in
26098f694ddSPatrick Williamsnon-volatile storage. PLDM daemon should preserve BIOS tables in non-volatile
26198f694ddSPatrick Williamsstorage. RBC and PLDM should restored the data whenever BMC reset.
26298f694ddSPatrick Williams
26398f694ddSPatrick Williams#BIOS first boot
264*754b1048SSuryakanth Sekar
265*754b1048SSuryakanth Sekar```
266*754b1048SSuryakanth Sekar
26798f694ddSPatrick Williams   +--------------------------------------------------------------------------------------------------------------------+
26898f694ddSPatrick Williams   | +-----------------------+             +---------------------------------------------------------------------------+|
26998f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                     ||
27098f694ddSPatrick Williams   | |                       |             |  +-------------------------------+         +-----------------------------+||
27198f694ddSPatrick Williams   | |                       |             |  |PLDM Interface (MCTP)          |         |RBC Daemon Manager           |||
27298f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |         |-Responsible for handle BIOS |||
27398f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |         | configuration attributes.   |||
27498f694ddSPatrick Williams   | |                       |             |  |                               |         | -AllBaseAttributes          |||
27598f694ddSPatrick Williams   | |                       |             |  |                               |         | -Pending Attributes         |||
27698f694ddSPatrick Williams   | |                       |             |  |                               |         | -FactoryDefaultSetting      |||
27798f694ddSPatrick Williams   | |                       |             |  |                               |         | -BIOSPwdHashData            |||
27898f694ddSPatrick Williams   + +-----------------------+             |  +-------------------------------+         +-----------------------------+||
27998f694ddSPatrick Williams   | |Get the table info     |<---Req-/Res--> | Provide the table information |         |                             |||
28098f694ddSPatrick Williams   | | & Check table Tag     |             |  |                               |         |                             |||
28198f694ddSPatrick Williams   | |using GetBIOS table    |             |  |                               |         |                             |||
28298f694ddSPatrick Williams   | |                       |             |  |                               |         |                             |||
28398f694ddSPatrick Williams   | |Set BIOS string table  |<---Req-/Res--> | Get the string table          |         |                             |||
28498f694ddSPatrick Williams   | | via Set BIOS table    |             |  |                               |         |                             |||
28598f694ddSPatrick Williams   | |SetBIOSAttribute table |<---Req-/Res--> | Get the attributes table      |         |                             |||
28698f694ddSPatrick Williams   | |SetBIOSAttributeValue  |<---Req-/Res--> | Get the attributes value table|         |                             |||
28798f694ddSPatrick Williams   | |table via SetBIOStable |             |  |                               |         |                             |||
28898f694ddSPatrick Williams   | |table via SetBIOStable |             |  |                               |         |                             |||
28998f694ddSPatrick Williams   | |Init the BIOS config   |             |  | Send the attributes data in   |         |                             |||
29098f694ddSPatrick Williams   | |Based on value.        |             |  | native to D-bus format        |--dbus-->| AllBaseAttributes           |||
29198f694ddSPatrick Williams   | |via Set BIOS table     |             |  | by Setting AllBaseAttributes  |         |                             |||
29298f694ddSPatrick Williams   | |                       |             |  |                               |         |                             |||
29398f694ddSPatrick Williams   | | Continue the BIOS boot|             |  |                               |         |                             |||
29498f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
29598f694ddSPatrick Williams   |                                       +---------------------------------------------------------------------------+|
29698f694ddSPatrick Williams   +---------------------------------------+----------------------------------------------------------------------------+
29798f694ddSPatrick Williams
29898f694ddSPatrick Williams
29998f694ddSPatrick Williams#BIOS reset
30098f694ddSPatrick Williams   +--------------------------------------------------------------------------------------------------------------------+
30198f694ddSPatrick Williams   | +-----------------------+             +---------------------------------------------------------------------------+|
30298f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                     ||
30398f694ddSPatrick Williams   | |                       |             |  +-------------------------------+         +-----------------------------+||
30498f694ddSPatrick Williams   | |                       |             |  |PLDM Interface (MCTP)          |         |RBC Daemon Manager           |||
30598f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |         |-Responsible for handle BIOS |||
30698f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |         | configuration attributes.   |||
30798f694ddSPatrick Williams   | |                       |             |  |                               |         | -AllBaseAttributes          |||
30898f694ddSPatrick Williams   | |                       |             |  |                               |         | -Pending Attributes         |||
30998f694ddSPatrick Williams   | |                       |             |  |                               |         | -FactoryDefaultSetting      |||
31098f694ddSPatrick Williams   | |                       |             |  |                               |         | -BIOSPwdHashData            |||
31198f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
31298f694ddSPatrick Williams   | |Get the table info     |<---Req-/Res--> | Provide the table information |         |                             |||
31398f694ddSPatrick Williams   | | & Check table Tag     |             |  |                               |         |                             |||
31498f694ddSPatrick Williams   | |using GetBIOS table    |             |  |                               |         |                             |||
31598f694ddSPatrick Williams   | |                       |             |  |                               |         |                             |||
31698f694ddSPatrick Williams   | | Get the Pending table |<---Req-/Res--> | Provide the Pending attributes|         |                             |||
31798f694ddSPatrick Williams   | | using Get BIOS table  |             |  | table                         |         |                             |||
31898f694ddSPatrick Williams   | |                       |             |  |                               |         |                             |||
31998f694ddSPatrick Williams   | |SetBIOSAttributeValue  |<---Req-/Res--> | Get the attributes table      |         |                             |||
32098f694ddSPatrick Williams   | |table via SetBIOStable.|             |  | Delete the Pending attributes |         |                             |||
32198f694ddSPatrick Williams   | |Init the BIOS config   |             |  | table                         |         |                             |||
32298f694ddSPatrick Williams   | |Based on value.        |             |  |                               |         |                             |||
32398f694ddSPatrick Williams   | |                       |             |  | Send the attributes data in   |         |                             |||
32498f694ddSPatrick Williams   | |                       |             |  | native to D-bus format by     |--dbus-->| AllBaseAttributes           |||
32598f694ddSPatrick Williams   | | Reset the BIOS boot   |             |  | setting AllBaseAttributes     |         |                             |||
32698f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
32798f694ddSPatrick Williams   |                                       +---------------------------------------------------------------------------+|
32898f694ddSPatrick Williams   +---------------------------------------+----------------------------------------------------------------------------+
32998f694ddSPatrick Williams
330*754b1048SSuryakanth Sekar```
33198f694ddSPatrick Williams##Complete BIOS BMC flow for BIOS configuration in deferred update model
33298f694ddSPatrick Williams```
33398f694ddSPatrick Williams+----------------------------------------+                    +----------------------------------------+
33498f694ddSPatrick Williams|                BIOS                    |                    |                  BMC                   |
33598f694ddSPatrick Williams|                                        |                    |                                        |
33698f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
33798f694ddSPatrick Williams|  | Send the BIOS capability  Support|  |--------KCS-------->| |1.Get the complete atttributes data.| |
33898f694ddSPatrick Williams|  | Send the compressed BIOS file(or)|  |-MCTP/KCS/Redfish-->| |2.Validate and convert into         | |
33998f694ddSPatrick Williams|  | Send PLDM data via MCTP  (or)    |  |                    | |  native to D-bus format.           | |
34098f694ddSPatrick Williams|  | Send the Redfish host interface  |  |                    | |3.Expose the D-bus interface        | |
34198f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
34298f694ddSPatrick Williams|                                        |                    |                                        |
34398f694ddSPatrick Williams|  +----------------------------------+  |                    |                                        |
34498f694ddSPatrick Williams|  | Get the file info & config status|   <-Get config status-|                                        |
34598f694ddSPatrick Williams|  | - Any config changed or not      |  |                    |                                        |
34698f694ddSPatrick Williams|  | - File checksum in BMC           |  |                    |                                        |
34798f694ddSPatrick Williams|  | - New attribute values exist     |  |                    |                                        |
34898f694ddSPatrick Williams|  +----------------------------------+  |                    |                                        |
34998f694ddSPatrick Williams|                                        |                    |  +-----------------------------------+ |
35098f694ddSPatrick Williams|  +----------------------------------+  |                    |  |                                   | |
35198f694ddSPatrick Williams|  | If new attribute value exist     |<-|-----------------------|  Send the new value attributes    | |
35298f694ddSPatrick Williams|  |           then                   |  |                    |  |  (Pending Attributes list)        | |
35398f694ddSPatrick Williams|  | Get & Update the BIOS variables  | -| -----+             |  |                                   | |
35498f694ddSPatrick Williams|  |                                  |  |      |             |  +-----------------------------------+ |
35598f694ddSPatrick Williams|  +---------------+------------------+  |      |             |                                        |
35698f694ddSPatrick Williams|                  |                     |      |             |                                        |
35798f694ddSPatrick Williams|                  YES                   |      |             |                                        |
35898f694ddSPatrick Williams|                  |                     |      |             |  +----------------------------------+  |
35998f694ddSPatrick Williams|   +--------------V------------------+  |      |             |  |                                  |  |
36098f694ddSPatrick Williams|   |  Send the updated data to BMC   |  |      |             |  | Update the BIOS attributes       |  |
361*754b1048SSuryakanth Sekar|   |                                 |------------------------->| (BaseBIOSTable)                  |  |
36298f694ddSPatrick Williams|   +---------------------------------+  |      |             |  +----------------------------------+  |
36398f694ddSPatrick Williams|                                        |      |             |                                        |
36498f694ddSPatrick Williams|                                        |      |             |                                        |
36598f694ddSPatrick Williams|   +---------------------------------+  |      |             |                                        |
36698f694ddSPatrick Williams|   | Reset the BIOS for BIOS conf    |  |     NO             |                                        |
36798f694ddSPatrick Williams|   | update                          |  |      |             |                                        |
36898f694ddSPatrick Williams|   +---------------------------------+  |      |             |                                        |
36998f694ddSPatrick Williams|                                        |      |             |                                        |
37098f694ddSPatrick Williams|  +----------------------------------+  |      |             |                                        |
37198f694ddSPatrick Williams|  |  Continue the BIOS boot          | <-------+             |                                        |
37298f694ddSPatrick Williams|  +----------------------------------+  |                    |                                        |
37398f694ddSPatrick Williams+----------------------------------------+                    +----------------------------------------+
37498f694ddSPatrick Williams```
37598f694ddSPatrick Williams
37698f694ddSPatrick Williams##Complete BIOS BMC flow for BIOS configuration in immediate update model
37798f694ddSPatrick Williams```
37898f694ddSPatrick Williams+----------------------------------------+                    +----------------------------------------+
37998f694ddSPatrick Williams|                BIOS                    |                    |                  BMC                   |
38098f694ddSPatrick Williams|                                        |                    |                                        |
38198f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
38298f694ddSPatrick Williams|  | Send the BIOS capability  Support|  |--------KCS-------->| |1.Get the complete atttributes data | |
38398f694ddSPatrick Williams|  | Send the compressed BIOS file(or)|  |-MCTP/KCS/Redfish-->| |2.Validate and convert into         | |
38498f694ddSPatrick Williams|  | Send PLDM data via MCTP  (or)    |  |                    | |  native to D-bus format.           | |
38598f694ddSPatrick Williams|  | Send the Redfish host interface  |  |                    | |3.Expose the D-bus interface        | |
38698f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
38798f694ddSPatrick Williams|                                        |                    |                                        |
38898f694ddSPatrick Williams|                                        |                    | +------------------------------------+ |
38998f694ddSPatrick Williams|                                        |                    | |PLDM can send complete all tables   | |
39098f694ddSPatrick Williams|                                        |                    | | & send the native to D-bus format  | |
39198f694ddSPatrick Williams|                                        |                    | | by Setting AllBaseAttributes       | |
39298f694ddSPatrick Williams|                                        |                    | +------------------------------------+ |
39398f694ddSPatrick Williams|                                        |                    | +------------------------------------+ |
39498f694ddSPatrick Williams|                                        |                    | | If attribute  value changed then   | |
39598f694ddSPatrick Williams|                                        |                    | | Biosconfig send signal to PLDM.    | |
39698f694ddSPatrick Williams|                                        |                    | | PLDM read Pending attributes table | |
39798f694ddSPatrick Williams|                                        |                    | | PLDM send the message to the host  | |
39898f694ddSPatrick Williams|                                        |                    | | PLDM send the data to the host     | |
39998f694ddSPatrick Williams|                                        |                    | +------------------------------------+ |
40098f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
40198f694ddSPatrick Williams|  | Read the new Atributes value     |<-|----------------------| Send new Pending attributes table  | |
40298f694ddSPatrick Williams|  |           and                    |  |                    | |                                    | |
40398f694ddSPatrick Williams|  | Update in the BIOS structure     |  |                    | +------------------------------------+ |
40498f694ddSPatrick Williams|  +---------------+------------------+  |                    |                                        |
40598f694ddSPatrick Williams|                  |                     |                    |                                        |
40698f694ddSPatrick Williams|                  YES                   |                    |                                        |
40798f694ddSPatrick Williams|                  |                     |                    | +-----------------------------------+  |
40898f694ddSPatrick Williams|   +--------------V------------------+  |                    | | Update the BIOS atrributes data.  |  |
40998f694ddSPatrick Williams|   |  Send the updated data to BMC   |  |                    | | Discard the Pending attributes    |  |
41098f694ddSPatrick Williams|   |                                 |------------------------>|                        table      |  |
41198f694ddSPatrick Williams|   +---------------------------------+  |                    | +-----------------------------------+  |
41298f694ddSPatrick Williams|                                        |                    |                                        |
41398f694ddSPatrick Williams+----------------------------------------+                    +----------------------------------------+
41498f694ddSPatrick Williams```
41598f694ddSPatrick WilliamsRBC should create the Pending Attribute list whenever SetPendingAttributes &
41698f694ddSPatrick WilliamsSetAttribute Method called and raise the PendingAttributesUpdated signal.
41798f694ddSPatrick WilliamsRBC should preserve the Pending Attributes list across the BMC reset and
41898f694ddSPatrick WilliamsRBC should clear the Pending Attributes list whenever new AllBaseBIOSTables
41998f694ddSPatrick Williamsreceived from BIOS.
42098f694ddSPatrick Williams
42198f694ddSPatrick Williams
42298f694ddSPatrick Williams#Redfish interfaces for remote Bios configuration
42398f694ddSPatrick Williams
42498f694ddSPatrick Williams```
42598f694ddSPatrick Williams +-----------------------------------------------------------------------------------------------------------+
42698f694ddSPatrick Williams | +-------------------------+             +----------------------------------------------------------------+|
42798f694ddSPatrick Williams | | RBC Web tool - POSTMAN  |             |   BMC                                                          ||
42898f694ddSPatrick Williams | |  (Please refer the      |             |  +-----------------------+       +---------------------------+ ||
42998f694ddSPatrick Williams | |   below redfish example |             |  |Redfish Daemon         |       |RBC Daemon Manager         | ||
43098f694ddSPatrick Williams | |   for each request)     |             |  |-Responsible for handle|       |-Parse Bios Data,convert to| ||
43198f694ddSPatrick Williams | |                         |             |  |all Redfish request    |       | required format & return  | ||
43298f694ddSPatrick Williams | |                         |             |  +-----------------------+       +---------------------------+ ||
43398f694ddSPatrick Williams | +-------------------------+             |  +-----------------------+       +---------------------------+ ||
43498f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
435*754b1048SSuryakanth Sekar | |1.Get Current attributes |<---Req-/Res--> | Read BaseBIOSTable    |<-dbus-| BaseBIOSTable             | ||
43698f694ddSPatrick Williams | |   name & value list     |             |  |                       |       |                           | ||
43798f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
438*754b1048SSuryakanth Sekar | |2.Get Attribute Registry |<---Req-/Res--> | Read BaseBIOSTable    |<-dbus-| BaseBIOSTable             | ||
43998f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
44098f694ddSPatrick Williams | |3.Change BIOS Password   |<---Req-/Res--> | Call RBC D-bus Method |-dbus->| ChangePassword()          | ||
44198f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
442*754b1048SSuryakanth Sekar | |4.Reset To default       |<---Req-/Res--> | Set ResetBIOSSettings |-dbus->| ResetBiosSettings         | ||
44398f694ddSPatrick Williams | |            settings     |             |  |                       |       |     -ResetFlag            | ||
44498f694ddSPatrick Williams | |5.Update new BIOS setting|<---Req-/Res--->| Call RBC D-bus Method |-dbus->| SetAttribute()            | ||
44598f694ddSPatrick Williams | |  (For single attribute) |             |  |                       |       |                           | ||
44698f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
447*754b1048SSuryakanth Sekar | |6.Get Pending attributes |<---Req-/Res--->| Get PendingAttributes |<-dbus-| PendingAttributes         | ||
44898f694ddSPatrick Williams | |           list          |             |  |                       |       |                           | ||
449*754b1048SSuryakanth Sekar | |7.Update new BIOS setting|<---Req-/Res--->| Set PendingAttributes |<-dbus-| PendingAttributes         | ||
45098f694ddSPatrick Williams | |           list          |             |  |                       |       |                           | ||
45198f694ddSPatrick Williams | |  For multiple attributes|             |  |                       |       |                           | ||
45298f694ddSPatrick Williams | +-------------------------+             |  +-----------------------+       +---------------------------+ ||
45398f694ddSPatrick Williams |                                         +---------------------------------------------------------------+||
45498f694ddSPatrick Williams +-----------------------------------------+-----------------------------------------------------------------+
45598f694ddSPatrick Williams```
45698f694ddSPatrick Williams1. Get Current Attributes name and value list:
45798f694ddSPatrick Williams   Get the current BIOS settings attribute name and value pair list.
45898f694ddSPatrick Williams   GET Method - "https://<BMC IP address>/redfish/v1/Systems/system/Bios"
45998f694ddSPatrick Williams
46098f694ddSPatrick Williams2. Get Attribute Registry:
46198f694ddSPatrick Williams   Get the detailed information about Bios Attribute like current value,
46298f694ddSPatrick Williams   supported value, description, Menupath, Default value.
46398f694ddSPatrick Williams   GET Method - "https://<BMC IP address>/redfish/v1/Registries/Bios"
46498f694ddSPatrick Williams
46598f694ddSPatrick Williams3. Change BIOS password:
46698f694ddSPatrick Williams   ACTION - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword"
46798f694ddSPatrick Williams
46898f694ddSPatrick Williams4. Reset To default settings:
46998f694ddSPatrick Williams   ACTION - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios"
47098f694ddSPatrick Williams
47198f694ddSPatrick Williams5. Update new BIOS settings (single attribute):
47298f694ddSPatrick Williams   Use to send the new value for particular attribute or list of attributes.
47398f694ddSPatrick Williams   PATCH Method - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings"
47498f694ddSPatrick Williams  Ex:
47598f694ddSPatrick Williams    Attribute name and new value : { "DdrFreqLimit" : 2400}
47698f694ddSPatrick Williams
47798f694ddSPatrick Williams6. Get the new pending value list:
47898f694ddSPatrick Williams   Use to get the new pending attributes list.
47998f694ddSPatrick Williams   GET Method - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings"
48098f694ddSPatrick Williams   -Valid only in deferred model. For immediate update model, It will be empty.
48198f694ddSPatrick Williams   Ex:
48298f694ddSPatrick Williams    Attribute name and new value : { "DdrFreqLimit" : 2400,"QuietBoot",0x1 }
48398f694ddSPatrick Williams
48498f694ddSPatrick Williams7. Update new BIOS settings (multiple attributes):
48598f694ddSPatrick Williams   Use to send the new value for particular attribute or list of attributes.
48698f694ddSPatrick Williams   PATCH Method - "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings"
48798f694ddSPatrick Williams  Ex:
48898f694ddSPatrick Williams    Attribute name and new value list : { "DdrFreqLimit" : 2400},"QuietBoot",0x1 }
48998f694ddSPatrick Williams
49098f694ddSPatrick Williams## Alternatives Considered
49198f694ddSPatrick WilliamsRedfish Host specification definition is not completed and ready BIOS support
49298f694ddSPatrick Williamsalso not available.
49398f694ddSPatrick WilliamsThere are 1000+ BIOS variables and storing in phosphor-settingsd is not optimal.
49498f694ddSPatrick Williams
49598f694ddSPatrick Williams## Impacts
49698f694ddSPatrick WilliamsBIOS must support and follow RBC BIOS configuration flow.
49798f694ddSPatrick Williams
49898f694ddSPatrick Williams## Testing
49998f694ddSPatrick WilliamsAble to change the BIOS configuration via BMC through LAN
50098f694ddSPatrick WilliamsAble to change the BIOS setup password via BMC
50198f694ddSPatrick WilliamsCompliance with Redfish will be tested using the Redfish Service Validator
502