xref: /openbmc/docs/designs/remote-bios-configuration.md (revision f4febd002df578bad816239b70950f84ea4567e8)
198f694ddSPatrick Williams# Remote BIOS Configuration (RBC) via BMC
298f694ddSPatrick Williams
3*f4febd00SPatrick WilliamsAuthor: Suryakanth Sekar! ssekar
498f694ddSPatrick Williams
5*f4febd00SPatrick WilliamsOther contributors: Jia Chunhui Deepak Kodihalli Patrick Williams
698f694ddSPatrick Williams
798f694ddSPatrick WilliamsCreated: 19-Nov-2019
898f694ddSPatrick Williams
998f694ddSPatrick Williams## Problem Description
1098f694ddSPatrick Williams
11*f4febd00SPatrick WilliamsCurrent OpenBMC doesn't provide mechanism to configure the BIOS remotely. This
12*f4febd00SPatrick Williamsis needed in data center to maintain several systems under same configuration.
13*f4febd00SPatrick Williams
14*f4febd00SPatrick WilliamsRemote BIOS Configuration provides ability for the user to view and modify BIOS
15*f4febd00SPatrick Williamssetup configuration parameters remotely via a BMC at any Host state. New BIOS
16*f4febd00SPatrick Williamsconfiguration parameters take effect immediately or next system reboot based on
17*f4febd00SPatrick Williamsthe host firmware support model.
1898f694ddSPatrick Williams
1998f694ddSPatrick Williams## Background and References
20*f4febd00SPatrick Williams
21*f4febd00SPatrick Williams[1]
22*f4febd00SPatrick Williamshttps://www.dmtf.org/sites/default/files/standards/documents/DSP0247_1.0.0.pdf
23*f4febd00SPatrick Williams[2] https://redfish.dmtf.org/schemas/v1/Bios.v1_1_0.json [3]
24*f4febd00SPatrick Williamshttps://redfish.dmtf.org/schemas/v1/AttributeRegistry.v1_3_2.json
2598f694ddSPatrick Williams
2698f694ddSPatrick Williams## Requirements
27*f4febd00SPatrick Williams
2898f694ddSPatrick Williams1. Mechanism to configure BIOS settings remotely over network interface.
29*f4febd00SPatrick Williams2. BMC should support the ability to set the value of all BIOS variables to the
30*f4febd00SPatrick Williams   factory default state.
31*f4febd00SPatrick Williams3. Based on the host firmware support model, BMC should support both Immediate
32*f4febd00SPatrick Williams   Update or Deferred update.
33*f4febd00SPatrick Williams4. In deferred model, When the system is in S0, S3, S4 or S5 state. BMC will
34*f4febd00SPatrick Williams   send the updated BIOS variables on next BIOS boot only. It will not initiate
35*f4febd00SPatrick Williams   a BIOS boot immediately.
3698f694ddSPatrick Williams5. In immediate model, BMC should send message to the system firmware (BIOS)
3798f694ddSPatrick Williams   Whenever settings are changed.
38*f4febd00SPatrick Williams6. BMC should support BIOS attribute registry in redfish schema for BIOS
39*f4febd00SPatrick Williams   configuration.
4098f694ddSPatrick Williams7. BMC should provide secure way for updating BIOS setup password settings.
4198f694ddSPatrick Williams   Detailed password handling design -TBD(will be resolve using ARM TrustZone)
4298f694ddSPatrick Williams   Ex: Updating the BIOS password should be support only before end of post.
4398f694ddSPatrick Williams8. Remote BIOS configuration daemon should be independent of interface specific
4498f694ddSPatrick Williams   data format.
4598f694ddSPatrick Williams9. BMC should able to take default / current settings from host and store &
46*f4febd00SPatrick Williams   expose that for out of band updates. 10.BMC should provide the new values to
47*f4febd00SPatrick Williams   the host.
4898f694ddSPatrick Williams
4998f694ddSPatrick Williams## Proposed Design
5098f694ddSPatrick Williams
5198f694ddSPatrick Williams```
5298f694ddSPatrick Williams+----------------------------------------------------------------------------------------------------------------+
5398f694ddSPatrick Williams| Remote BIOS configuration (RBC) via BMC                                                                        |
5498f694ddSPatrick Williams|                                                                                                                |
5598f694ddSPatrick Williams|                                                                                                                |
5698f694ddSPatrick Williams| +-------------+       +-------------+       +--------------------------------+      +-------+                  |
5798f694ddSPatrick Williams| |             |       |             |       |   RBC daemon                   |      |       |    +----------+  |
5898f694ddSPatrick Williams| | NET/ Tools  +<-LAN->+ LAN-IPMID/  +<Dbus->+                                |      |       |    |Web client|  |
5998f694ddSPatrick Williams| |             |       | REDFISH     |       |  Provide following Methods     |      |       |    |          |  |
60754b1048SSuryakanth Sekar| +-------------+       +-------------+       |     -SetAttribute()            |      |       |    +----^-----+  |
61754b1048SSuryakanth Sekar|                                             |     -GetAttribute()            |      |       |         |        |
62754b1048SSuryakanth Sekar| +-------------+       +-------------+       |     -VerifyPassword()          |      |       |        LAN       |
63754b1048SSuryakanth Sekar| |             |       |             |       |     -ChangePassword()          |      |       |         |        |
6498f694ddSPatrick Williams| | HOST/ BIOS  +<-KCS->+  HOST-IPMID +<Dbus->+                                |      |Redfish|    +----V-----+  |
65754b1048SSuryakanth Sekar| |             |       |             |       | Properties                     +<Dbus>+  API  |    |Redfish & |  |
66754b1048SSuryakanth Sekar| +-----+-------+       +-------------+       |     -BaseBIOSTable             |      |       +<-->+BMCWeb    |  |
67754b1048SSuryakanth Sekar|       |                                     |     -PendingAttributes         |      |       |    +----^-----+  |
68754b1048SSuryakanth Sekar|       |                                     |     -ResetBIOSSettings         |      |       |         |        |
69754b1048SSuryakanth Sekar|       |                                     |     -IsPasswordInitDone        |      |       |         |        |
7098f694ddSPatrick Williams|       |                                     |                                |      |       |    +----V-----+  |
7198f694ddSPatrick Williams|       |                                     |                                |      |       |    | Redfish  |  |
7298f694ddSPatrick Williams|       |                                     |                                |      |       |    |  Host    |  |
7398f694ddSPatrick Williams|       |                                     |                                |      |       |    | Interface|  |
7498f694ddSPatrick Williams|       |                                     +----^-----------------+---------+      +-------+    +----------+  |
7598f694ddSPatrick Williams|       |                                          |       PendingAttributesUpdated                              |
7698f694ddSPatrick Williams|       |                                          |                 |    Signal                                 |
7798f694ddSPatrick Williams|       |                                          |                 |                                           |
7898f694ddSPatrick Williams|       |                                     +----V-----------------V---------+                                 |
7998f694ddSPatrick Williams|       |                                     | PLDM daemon                    |                                 |
8098f694ddSPatrick Williams|       |                                     | Collect the BIOS data & convert|                                 |
8198f694ddSPatrick Williams|       +---------MCTP----------------------->| into native D-bus format and   |                                 |
8298f694ddSPatrick Williams|                                             | send to the RBC                |                                 |
8398f694ddSPatrick Williams|                                             +--------------------------------+                                 |
8498f694ddSPatrick Williams+----------------------------------------------------------------------------------------------------------------+
8598f694ddSPatrick Williams```
8698f694ddSPatrick Williams
8798f694ddSPatrick Williams##Intel uses the following logic
8898f694ddSPatrick Williams
89*f4febd00SPatrick WilliamsBIOS send data in as Proprietary format to the BMC via IPMI interface. There are
90*f4febd00SPatrick Williamstwo types of proprietary XML format files in BIOS configuration. Type-0 contain
91*f4febd00SPatrick Williamsfull BIOS variables in XML format. (Generated by BIOS) Type-1 contain modified
92*f4febd00SPatrick WilliamsBIOS variables in XML format. (Generated by BMC)
9398f694ddSPatrick Williams
94*f4febd00SPatrick WilliamsBIOS must provide BIOS capability via KCS interface in early boot stage. BIOS
95*f4febd00SPatrick Williamsmust send compressed proprietary XML type 0 file via IPMI command to the BMC.
9698f694ddSPatrick Williams
97*f4febd00SPatrick WilliamsIPMI interface should decompress & validate the received XML Type 0. IPMI
98*f4febd00SPatrick Williamsinterface should convert the XML Type 0 into native to D-bus format and send to
99*f4febd00SPatrick Williamsthe RBC daemon.
10098f694ddSPatrick Williams
101*f4febd00SPatrick WilliamsDuring BDS phase in BIOS. BIOS must get the existing XML info from BMC. If XML
102*f4febd00SPatrick Williamsversion/checksum is mismatch or XML Type 0 is not present in BMC, then BIOS must
103*f4febd00SPatrick Williamssend XML type 0 to the BMC. If XML version and XML checksum matched & pending
104*f4febd00SPatrick WilliamsBIOS attributes list exist (XML Type 1) in BMC then BIOS must get pending BIOS
105*f4febd00SPatrick Williamsconfiguration (XML Type 1) from BMC & update in BIOS region and send updated XML
106*f4febd00SPatrick WilliamsType 0 to the BMC in order to intact again and then BIOS reset the system to
107*f4febd00SPatrick Williamsreflect the updated values in BIOS boot.
10898f694ddSPatrick Williams
10998f694ddSPatrick WilliamsBIOS have default BIOS settings in BIOS non-volatile memory. BIOS can restore
11098f694ddSPatrick Williamsthe default BIOS configuration based on the flag setting in OEM IPMI command
111*f4febd00SPatrick Williamsissued during BIOS booting. So, restore default BIOS configuration can be done
112*f4febd00SPatrick Williamsby this mechanism.
11398f694ddSPatrick Williams
11498f694ddSPatrick WilliamsRBC daemon should preserve the AllBiosTables, PendingAttributes list in
115*f4febd00SPatrick Williamsnon-volatile storage. Pending attributes list will be cleared whenever new
116*f4febd00SPatrick Williamsattributes data received.
11798f694ddSPatrick Williams
11898f694ddSPatrick Williams```
11998f694ddSPatrick Williams#Intel uses the following logic for BIOS first boot
12098f694ddSPatrick Williams   +---------------------------------------------------------------------------------------------------------------------+
12198f694ddSPatrick Williams   |                                                                                                                     |
12298f694ddSPatrick Williams   | +-----------------------+             +----------------------------------------------------------------------------+|
12398f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                      ||
12498f694ddSPatrick Williams   | |                       |             |  +-------------------------------+        +------------------------------+ ||
12598f694ddSPatrick Williams   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
12698f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
12798f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
12898f694ddSPatrick Williams   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
12998f694ddSPatrick Williams   | |                       |             |  |                               |        | -Pending Attributes          | ||
13098f694ddSPatrick Williams   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
13198f694ddSPatrick Williams   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
13298f694ddSPatrick Williams   | |                       |             |  +-------------------------------+        +------------------------------+ ||
13398f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
13498f694ddSPatrick Williams   | | Set BIOS capability   |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
13598f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
13698f694ddSPatrick Williams   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |--dbus-->| Set BIOSPwdHash data.       | ||
13798f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
13898f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
13998f694ddSPatrick Williams   | |Check factory settings |<---Req-/Res--> |  Get the FactoryDefault prop  |<-dbus-- | Send FactoryDefaultSettings | ||
14098f694ddSPatrick Williams   | |Init the BIOS config   |             |  |                               |         |                             | ||
14198f694ddSPatrick Williams   | |Based on value.        |             |  |                               |         |                             | ||
14298f694ddSPatrick Williams   | |Get the XML Type0 info |<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
14398f694ddSPatrick Williams   | |Generate & compress    |             |  |                               |         |                             | ||
14498f694ddSPatrick Williams   | |XML type 0 file        |             |  | Validate the XML Type 0       |         |Collect the Attributes Info  | ||
14598f694ddSPatrick Williams   | |                       |             |  | Unzip the XML Type 0          |--dbus-->| AllBaseAttributes           | ||
14698f694ddSPatrick Williams   | | Send the XML Type 0   |<---Req-/Res--->| Convert into D-bus format     |                                       | ||
14798f694ddSPatrick Williams   | | via SetPayload command|             |  | and send to the RBC.          |         |                             | ||
14898f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
14998f694ddSPatrick Williams   | | Continue the BIOS boot|             |  |                               |         |                             | ||
15098f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
15198f694ddSPatrick Williams   |                                       +----------------------------------------------------------------------------+|
15298f694ddSPatrick Williams   +---------------------------------------+-----------------------------------------------------------------------------+
15398f694ddSPatrick Williams```
154*f4febd00SPatrick Williams
15598f694ddSPatrick Williams```
15698f694ddSPatrick Williams#Intel uses the following logic for BIOS reset
15798f694ddSPatrick Williams   +---------------------------------------------------------------------------------------------------------------------+
15898f694ddSPatrick Williams   |                                                                                                                     |
15998f694ddSPatrick Williams   | +-----------------------+             +----------------------------------------------------------------------------+|
16098f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                      ||
16198f694ddSPatrick Williams   | |                       |             |  +-------------------------------+        +------------------------------+ ||
16298f694ddSPatrick Williams   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
16398f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
16498f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
16598f694ddSPatrick Williams   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
16698f694ddSPatrick Williams   | |                       |             |  |                               |        | -Pending Attributes          | ||
16798f694ddSPatrick Williams   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
16898f694ddSPatrick Williams   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
16998f694ddSPatrick Williams   + |                       |             |  +-------------------------------+        +------------------------------+ ||
17098f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
17198f694ddSPatrick Williams   | |Set BIOS capability    |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
17298f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
17398f694ddSPatrick Williams   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |--dbus-->| Set BIOSPwdHash data        | ||
17498f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
17598f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
17698f694ddSPatrick Williams   | |Check factory settings |<---Req-/Res--> | Get the FactoryDefault prop   |<-dbus-- | Send FactoryDefaultSettings | ||
17798f694ddSPatrick Williams   | |Init the BIOS config   |             |  |                               |         |                             | ||
17898f694ddSPatrick Williams   | |Based on value.        |             |  |                               |         |                             | ||
17998f694ddSPatrick Williams   | |Get the XML Type 0 info|<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
18098f694ddSPatrick Williams   | |Generate & compress    |             |  |                               |         |                             | ||
18198f694ddSPatrick Williams   | |XML type 0 file.       |             |  |                               |         |Collect the Attributes Info  | ||
182754b1048SSuryakanth Sekar   | |Check XML file Chksum. |             |  | Validate the XML Type 0       |--dbus-->| BaseBIOSTable               | ||
18398f694ddSPatrick Williams   | |If Chksum mismatch     |<---Req-/Res--->| Unzip XML Type 0 & convert    |         |                             | ||
18498f694ddSPatrick Williams   | |then send the payload  |             |  | into D-bus format and send to |         |                             | ||
18598f694ddSPatrick Williams   | |via SetPayload.        |             |  | the RBC                       |         |                             | ||
18698f694ddSPatrick Williams   | |Continue the BIOS boot |             |  |                               |         |                             | ||
18798f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
18898f694ddSPatrick Williams   |                                       +----------------------------------------------------------------------------+|
18998f694ddSPatrick Williams   +---------------------------------------+-----------------------------------------------------------------------------+
19098f694ddSPatrick Williams```
191*f4febd00SPatrick Williams
19298f694ddSPatrick Williams```
19398f694ddSPatrick Williams#Intel uses the following logic for BIOS reset and BMC have new values
19498f694ddSPatrick Williams   +---------------------------------------------------------------------------------------------------------------------+
19598f694ddSPatrick Williams   |                                                                                                                     |
19698f694ddSPatrick Williams   | +-----------------------+             +----------------------------------------------------------------------------+|
19798f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                      ||
19898f694ddSPatrick Williams   | |                       |             |  +-------------------------------+        +------------------------------+ ||
19998f694ddSPatrick Williams   | |                       |             |  |                               |        |                              | ||
20098f694ddSPatrick Williams   | |                       |             |  |IPMI Interface (kcs)           |        |RBC daemon Manager            | ||
20198f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |        |-Responsible for handling BIOS| ||
20298f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |        | configuration attributes.    | ||
20398f694ddSPatrick Williams   | |                       |             |  |                               |        | -AllBaseAttributes           | ||
20498f694ddSPatrick Williams   | |                       |             |  |                               |        | -Pending Attributes          | ||
20598f694ddSPatrick Williams   | |                       |             |  |                               |        | -FactoryDefaultSetting       | ||
20698f694ddSPatrick Williams   | |                       |             |  |                               |        | -BIOSPwdHashData             | ||
20798f694ddSPatrick Williams   + |                       |             |  +-------------------------------+        +------------------------------+ ||
20898f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
20998f694ddSPatrick Williams   | |Set BIOS capability    |<---Req-/Res--> | Set the BIOS capability       |         |                             | ||
21098f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
21198f694ddSPatrick Williams   | |Set BIOS Pwd hash/Seed |<---Req-/Res--> | Forward to the RBC daemon     |---dbus->| Set BIOSPwdHash data        | ||
21298f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
21398f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
21498f694ddSPatrick Williams   | |Check factory settings |<---Req-/Res--> | Get the FactoryDefault prop   |<--dbus--| Send FactoryDefaultSettings | ||
21598f694ddSPatrick Williams   | |Init the BIOS config   |             |  |                               |         |                             | ||
21698f694ddSPatrick Williams   | |Based on value.        |             |  |                               |         |                             | ||
21798f694ddSPatrick Williams   | |Get the XML Type 0 info|<---Req-/Res--> | Provide the XML Type 0 Info   |         |                             | ||
21898f694ddSPatrick Williams   | |Generate & compress    |             |  |                               |         |                             | ||
21998f694ddSPatrick Williams   | |XML Type 0 file.       |             |  |                               |         |                             | ||
22098f694ddSPatrick Williams   | |Check XML file Chksum. |             |  |                               |         |                             | ||
22198f694ddSPatrick Williams   | |If Chksum   match      |<---Req-/Res--->| Provide the XML Type 0        |         |                             | ||
22298f694ddSPatrick Williams   | |then get the XML Type 1|             |  |                               |         |                             | ||
22398f694ddSPatrick Williams   | |via GetPayload.        |             |  |                               |         |                             | ||
22498f694ddSPatrick Williams   | |Get  the XML Type 1    |             |  |                               |         |                             | ||
22598f694ddSPatrick Williams   | |via GetPayload command.|<---Req-/Res--->| Provide the XML Type 1        |         |                             | ||
22698f694ddSPatrick Williams   | |                       |             |  |                               |         |                             | ||
22798f694ddSPatrick Williams   | |Update the new value   |             |  |                               |         |                             | ||
22898f694ddSPatrick Williams   | |and new chksum in      |<---Req-/Res--->| Get new XML Type 0 & convert  |--dbus-->| Collect the Atributes info  | ||
22998f694ddSPatrick Williams   | |BIOS.                  |             |  | into native to D-bus format   |         | AllBaseAttributes           | ||
23098f694ddSPatrick Williams   | |Reset the system.      |             |  |                               |         |                             | ||
23198f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+ ||
23298f694ddSPatrick Williams   |                                       +----------------------------------------------------------------------------+|
23398f694ddSPatrick Williams   +---------------------------------------+-----------------------------------------------------------------------------+
23498f694ddSPatrick Williams
23598f694ddSPatrick Williams```
23698f694ddSPatrick Williams
23798f694ddSPatrick Williams##BIOS send the data in BIOS configuration PLDM via MCTP
23898f694ddSPatrick Williams
239*f4febd00SPatrick WilliamsBIOS should update the BIOS settings via Set BIOS table PLDM command- BIOS
240*f4febd00SPatrick Williamsstring table, Attribute name table, Attribute value table via MCTP.
24198f694ddSPatrick Williams
242*f4febd00SPatrick WilliamsRBC daemon should create pending BIOS attributes list based on the user input
243*f4febd00SPatrick Williamsconfiguration and send PendingAttributesUpdated signal.
24498f694ddSPatrick Williams
24598f694ddSPatrick WilliamsPLDM daemon should register for PendingAttributesUpdated signal & RBC daemon
24698f694ddSPatrick Williamsshould generate signal whenever attribute value changed by SetPendingAttributes,
24798f694ddSPatrick Williamsset attribute D-bus call. PLDM should Wait for PendingAttributesUpdated signal
24898f694ddSPatrick Williamsand pull the pending attributes value from RBC daemon. PLDM should delete the
249*f4febd00SPatrick WilliamsPending attributes value table once its not valid or updated in BIOS. RBC should
250*f4febd00SPatrick Williamsclear pending attributes list whenever new attributes data received.
25198f694ddSPatrick Williams
25298f694ddSPatrick WilliamsRBC daemon should preserve the AllBaseAttributes, PendingAttributes list in
25398f694ddSPatrick Williamsnon-volatile storage. PLDM daemon should preserve BIOS tables in non-volatile
25498f694ddSPatrick Williamsstorage. RBC and PLDM should restored the data whenever BMC reset.
25598f694ddSPatrick Williams
25698f694ddSPatrick Williams#BIOS first boot
257754b1048SSuryakanth Sekar
258754b1048SSuryakanth Sekar```
259754b1048SSuryakanth Sekar
26098f694ddSPatrick Williams   +--------------------------------------------------------------------------------------------------------------------+
26198f694ddSPatrick Williams   | +-----------------------+             +---------------------------------------------------------------------------+|
26298f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                     ||
26398f694ddSPatrick Williams   | |                       |             |  +-------------------------------+         +-----------------------------+||
26498f694ddSPatrick Williams   | |                       |             |  |PLDM Interface (MCTP)          |         |RBC Daemon Manager           |||
26598f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |         |-Responsible for handle BIOS |||
26698f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |         | configuration attributes.   |||
26798f694ddSPatrick Williams   | |                       |             |  |                               |         | -AllBaseAttributes          |||
26898f694ddSPatrick Williams   | |                       |             |  |                               |         | -Pending Attributes         |||
26998f694ddSPatrick Williams   | |                       |             |  |                               |         | -FactoryDefaultSetting      |||
27098f694ddSPatrick Williams   | |                       |             |  |                               |         | -BIOSPwdHashData            |||
27198f694ddSPatrick Williams   + +-----------------------+             |  +-------------------------------+         +-----------------------------+||
27298f694ddSPatrick Williams   | |Get the table info     |<---Req-/Res--> | Provide the table information |         |                             |||
27398f694ddSPatrick Williams   | | & Check table Tag     |             |  |                               |         |                             |||
27498f694ddSPatrick Williams   | |using GetBIOS table    |             |  |                               |         |                             |||
27598f694ddSPatrick Williams   | |                       |             |  |                               |         |                             |||
27698f694ddSPatrick Williams   | |Set BIOS string table  |<---Req-/Res--> | Get the string table          |         |                             |||
27798f694ddSPatrick Williams   | | via Set BIOS table    |             |  |                               |         |                             |||
27898f694ddSPatrick Williams   | |SetBIOSAttribute table |<---Req-/Res--> | Get the attributes table      |         |                             |||
27998f694ddSPatrick Williams   | |SetBIOSAttributeValue  |<---Req-/Res--> | Get the attributes value table|         |                             |||
28098f694ddSPatrick Williams   | |table via SetBIOStable |             |  |                               |         |                             |||
28198f694ddSPatrick Williams   | |table via SetBIOStable |             |  |                               |         |                             |||
28298f694ddSPatrick Williams   | |Init the BIOS config   |             |  | Send the attributes data in   |         |                             |||
28398f694ddSPatrick Williams   | |Based on value.        |             |  | native to D-bus format        |--dbus-->| AllBaseAttributes           |||
28498f694ddSPatrick Williams   | |via Set BIOS table     |             |  | by Setting AllBaseAttributes  |         |                             |||
28598f694ddSPatrick Williams   | |                       |             |  |                               |         |                             |||
28698f694ddSPatrick Williams   | | Continue the BIOS boot|             |  |                               |         |                             |||
28798f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
28898f694ddSPatrick Williams   |                                       +---------------------------------------------------------------------------+|
28998f694ddSPatrick Williams   +---------------------------------------+----------------------------------------------------------------------------+
29098f694ddSPatrick Williams
29198f694ddSPatrick Williams
29298f694ddSPatrick Williams#BIOS reset
29398f694ddSPatrick Williams   +--------------------------------------------------------------------------------------------------------------------+
29498f694ddSPatrick Williams   | +-----------------------+             +---------------------------------------------------------------------------+|
29598f694ddSPatrick Williams   | | BIOS                  |             |   BMC                                                                     ||
29698f694ddSPatrick Williams   | |                       |             |  +-------------------------------+         +-----------------------------+||
29798f694ddSPatrick Williams   | |                       |             |  |PLDM Interface (MCTP)          |         |RBC Daemon Manager           |||
29898f694ddSPatrick Williams   | |                       |             |  | -Responsible for send /recv   |         |-Responsible for handle BIOS |||
29998f694ddSPatrick Williams   | |                       |             |  |  data between BIOS and BMC    |         | configuration attributes.   |||
30098f694ddSPatrick Williams   | |                       |             |  |                               |         | -AllBaseAttributes          |||
30198f694ddSPatrick Williams   | |                       |             |  |                               |         | -Pending Attributes         |||
30298f694ddSPatrick Williams   | |                       |             |  |                               |         | -FactoryDefaultSetting      |||
30398f694ddSPatrick Williams   | |                       |             |  |                               |         | -BIOSPwdHashData            |||
30498f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
30598f694ddSPatrick Williams   | |Get the table info     |<---Req-/Res--> | Provide the table information |         |                             |||
30698f694ddSPatrick Williams   | | & Check table Tag     |             |  |                               |         |                             |||
30798f694ddSPatrick Williams   | |using GetBIOS table    |             |  |                               |         |                             |||
30898f694ddSPatrick Williams   | |                       |             |  |                               |         |                             |||
30998f694ddSPatrick Williams   | | Get the Pending table |<---Req-/Res--> | Provide the Pending attributes|         |                             |||
31098f694ddSPatrick Williams   | | using Get BIOS table  |             |  | table                         |         |                             |||
31198f694ddSPatrick Williams   | |                       |             |  |                               |         |                             |||
31298f694ddSPatrick Williams   | |SetBIOSAttributeValue  |<---Req-/Res--> | Get the attributes table      |         |                             |||
31398f694ddSPatrick Williams   | |table via SetBIOStable.|             |  | Delete the Pending attributes |         |                             |||
31498f694ddSPatrick Williams   | |Init the BIOS config   |             |  | table                         |         |                             |||
31598f694ddSPatrick Williams   | |Based on value.        |             |  |                               |         |                             |||
31698f694ddSPatrick Williams   | |                       |             |  | Send the attributes data in   |         |                             |||
31798f694ddSPatrick Williams   | |                       |             |  | native to D-bus format by     |--dbus-->| AllBaseAttributes           |||
31898f694ddSPatrick Williams   | | Reset the BIOS boot   |             |  | setting AllBaseAttributes     |         |                             |||
31998f694ddSPatrick Williams   | +-----------------------+             |  +-------------------------------+         +-----------------------------+||
32098f694ddSPatrick Williams   |                                       +---------------------------------------------------------------------------+|
32198f694ddSPatrick Williams   +---------------------------------------+----------------------------------------------------------------------------+
32298f694ddSPatrick Williams
323754b1048SSuryakanth Sekar```
324*f4febd00SPatrick Williams
32598f694ddSPatrick Williams##Complete BIOS BMC flow for BIOS configuration in deferred update model
326*f4febd00SPatrick Williams
32798f694ddSPatrick Williams```
32898f694ddSPatrick Williams+----------------------------------------+                    +----------------------------------------+
32998f694ddSPatrick Williams|                BIOS                    |                    |                  BMC                   |
33098f694ddSPatrick Williams|                                        |                    |                                        |
33198f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
33298f694ddSPatrick Williams|  | Send the BIOS capability  Support|  |--------KCS-------->| |1.Get the complete atttributes data.| |
33398f694ddSPatrick Williams|  | Send the compressed BIOS file(or)|  |-MCTP/KCS/Redfish-->| |2.Validate and convert into         | |
33498f694ddSPatrick Williams|  | Send PLDM data via MCTP  (or)    |  |                    | |  native to D-bus format.           | |
33598f694ddSPatrick Williams|  | Send the Redfish host interface  |  |                    | |3.Expose the D-bus interface        | |
33698f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
33798f694ddSPatrick Williams|                                        |                    |                                        |
33898f694ddSPatrick Williams|  +----------------------------------+  |                    |                                        |
33998f694ddSPatrick Williams|  | Get the file info & config status|   <-Get config status-|                                        |
34098f694ddSPatrick Williams|  | - Any config changed or not      |  |                    |                                        |
34198f694ddSPatrick Williams|  | - File checksum in BMC           |  |                    |                                        |
34298f694ddSPatrick Williams|  | - New attribute values exist     |  |                    |                                        |
34398f694ddSPatrick Williams|  +----------------------------------+  |                    |                                        |
34498f694ddSPatrick Williams|                                        |                    |  +-----------------------------------+ |
34598f694ddSPatrick Williams|  +----------------------------------+  |                    |  |                                   | |
34698f694ddSPatrick Williams|  | If new attribute value exist     |<-|-----------------------|  Send the new value attributes    | |
34798f694ddSPatrick Williams|  |           then                   |  |                    |  |  (Pending Attributes list)        | |
34898f694ddSPatrick Williams|  | Get & Update the BIOS variables  | -| -----+             |  |                                   | |
34998f694ddSPatrick Williams|  |                                  |  |      |             |  +-----------------------------------+ |
35098f694ddSPatrick Williams|  +---------------+------------------+  |      |             |                                        |
35198f694ddSPatrick Williams|                  |                     |      |             |                                        |
35298f694ddSPatrick Williams|                  YES                   |      |             |                                        |
35398f694ddSPatrick Williams|                  |                     |      |             |  +----------------------------------+  |
35498f694ddSPatrick Williams|   +--------------V------------------+  |      |             |  |                                  |  |
35598f694ddSPatrick Williams|   |  Send the updated data to BMC   |  |      |             |  | Update the BIOS attributes       |  |
356754b1048SSuryakanth Sekar|   |                                 |------------------------->| (BaseBIOSTable)                  |  |
35798f694ddSPatrick Williams|   +---------------------------------+  |      |             |  +----------------------------------+  |
35898f694ddSPatrick Williams|                                        |      |             |                                        |
35998f694ddSPatrick Williams|                                        |      |             |                                        |
36098f694ddSPatrick Williams|   +---------------------------------+  |      |             |                                        |
36198f694ddSPatrick Williams|   | Reset the BIOS for BIOS conf    |  |     NO             |                                        |
36298f694ddSPatrick Williams|   | update                          |  |      |             |                                        |
36398f694ddSPatrick Williams|   +---------------------------------+  |      |             |                                        |
36498f694ddSPatrick Williams|                                        |      |             |                                        |
36598f694ddSPatrick Williams|  +----------------------------------+  |      |             |                                        |
36698f694ddSPatrick Williams|  |  Continue the BIOS boot          | <-------+             |                                        |
36798f694ddSPatrick Williams|  +----------------------------------+  |                    |                                        |
36898f694ddSPatrick Williams+----------------------------------------+                    +----------------------------------------+
36998f694ddSPatrick Williams```
37098f694ddSPatrick Williams
37198f694ddSPatrick Williams##Complete BIOS BMC flow for BIOS configuration in immediate update model
372*f4febd00SPatrick Williams
37398f694ddSPatrick Williams```
37498f694ddSPatrick Williams+----------------------------------------+                    +----------------------------------------+
37598f694ddSPatrick Williams|                BIOS                    |                    |                  BMC                   |
37698f694ddSPatrick Williams|                                        |                    |                                        |
37798f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
37898f694ddSPatrick Williams|  | Send the BIOS capability  Support|  |--------KCS-------->| |1.Get the complete atttributes data | |
37998f694ddSPatrick Williams|  | Send the compressed BIOS file(or)|  |-MCTP/KCS/Redfish-->| |2.Validate and convert into         | |
38098f694ddSPatrick Williams|  | Send PLDM data via MCTP  (or)    |  |                    | |  native to D-bus format.           | |
38198f694ddSPatrick Williams|  | Send the Redfish host interface  |  |                    | |3.Expose the D-bus interface        | |
38298f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
38398f694ddSPatrick Williams|                                        |                    |                                        |
38498f694ddSPatrick Williams|                                        |                    | +------------------------------------+ |
38598f694ddSPatrick Williams|                                        |                    | |PLDM can send complete all tables   | |
38698f694ddSPatrick Williams|                                        |                    | | & send the native to D-bus format  | |
38798f694ddSPatrick Williams|                                        |                    | | by Setting AllBaseAttributes       | |
38898f694ddSPatrick Williams|                                        |                    | +------------------------------------+ |
38998f694ddSPatrick Williams|                                        |                    | +------------------------------------+ |
39098f694ddSPatrick Williams|                                        |                    | | If attribute  value changed then   | |
39198f694ddSPatrick Williams|                                        |                    | | Biosconfig send signal to PLDM.    | |
39298f694ddSPatrick Williams|                                        |                    | | PLDM read Pending attributes table | |
39398f694ddSPatrick Williams|                                        |                    | | PLDM send the message to the host  | |
39498f694ddSPatrick Williams|                                        |                    | | PLDM send the data to the host     | |
39598f694ddSPatrick Williams|                                        |                    | +------------------------------------+ |
39698f694ddSPatrick Williams|  +----------------------------------+  |                    | +------------------------------------+ |
39798f694ddSPatrick Williams|  | Read the new Atributes value     |<-|----------------------| Send new Pending attributes table  | |
39898f694ddSPatrick Williams|  |           and                    |  |                    | |                                    | |
39998f694ddSPatrick Williams|  | Update in the BIOS structure     |  |                    | +------------------------------------+ |
40098f694ddSPatrick Williams|  +---------------+------------------+  |                    |                                        |
40198f694ddSPatrick Williams|                  |                     |                    |                                        |
40298f694ddSPatrick Williams|                  YES                   |                    |                                        |
40398f694ddSPatrick Williams|                  |                     |                    | +-----------------------------------+  |
40498f694ddSPatrick Williams|   +--------------V------------------+  |                    | | Update the BIOS atrributes data.  |  |
40598f694ddSPatrick Williams|   |  Send the updated data to BMC   |  |                    | | Discard the Pending attributes    |  |
40698f694ddSPatrick Williams|   |                                 |------------------------>|                        table      |  |
40798f694ddSPatrick Williams|   +---------------------------------+  |                    | +-----------------------------------+  |
40898f694ddSPatrick Williams|                                        |                    |                                        |
40998f694ddSPatrick Williams+----------------------------------------+                    +----------------------------------------+
41098f694ddSPatrick Williams```
41198f694ddSPatrick Williams
412*f4febd00SPatrick WilliamsRBC should create the Pending Attribute list whenever SetPendingAttributes &
413*f4febd00SPatrick WilliamsSetAttribute Method called and raise the PendingAttributesUpdated signal. RBC
414*f4febd00SPatrick Williamsshould preserve the Pending Attributes list across the BMC reset and RBC should
415*f4febd00SPatrick Williamsclear the Pending Attributes list whenever new AllBaseBIOSTables received from
416*f4febd00SPatrick WilliamsBIOS.
41798f694ddSPatrick Williams
41898f694ddSPatrick Williams#Redfish interfaces for remote Bios configuration
41998f694ddSPatrick Williams
42098f694ddSPatrick Williams```
42198f694ddSPatrick Williams +-----------------------------------------------------------------------------------------------------------+
42298f694ddSPatrick Williams | +-------------------------+             +----------------------------------------------------------------+|
42398f694ddSPatrick Williams | | RBC Web tool - POSTMAN  |             |   BMC                                                          ||
42498f694ddSPatrick Williams | |  (Please refer the      |             |  +-----------------------+       +---------------------------+ ||
42598f694ddSPatrick Williams | |   below redfish example |             |  |Redfish Daemon         |       |RBC Daemon Manager         | ||
42698f694ddSPatrick Williams | |   for each request)     |             |  |-Responsible for handle|       |-Parse Bios Data,convert to| ||
42798f694ddSPatrick Williams | |                         |             |  |all Redfish request    |       | required format & return  | ||
42898f694ddSPatrick Williams | |                         |             |  +-----------------------+       +---------------------------+ ||
42998f694ddSPatrick Williams | +-------------------------+             |  +-----------------------+       +---------------------------+ ||
43098f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
431754b1048SSuryakanth Sekar | |1.Get Current attributes |<---Req-/Res--> | Read BaseBIOSTable    |<-dbus-| BaseBIOSTable             | ||
43298f694ddSPatrick Williams | |   name & value list     |             |  |                       |       |                           | ||
43398f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
434754b1048SSuryakanth Sekar | |2.Get Attribute Registry |<---Req-/Res--> | Read BaseBIOSTable    |<-dbus-| BaseBIOSTable             | ||
43598f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
43698f694ddSPatrick Williams | |3.Change BIOS Password   |<---Req-/Res--> | Call RBC D-bus Method |-dbus->| ChangePassword()          | ||
43798f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
438754b1048SSuryakanth Sekar | |4.Reset To default       |<---Req-/Res--> | Set ResetBIOSSettings |-dbus->| ResetBiosSettings         | ||
43998f694ddSPatrick Williams | |            settings     |             |  |                       |       |     -ResetFlag            | ||
44098f694ddSPatrick Williams | |5.Update new BIOS setting|<---Req-/Res--->| Call RBC D-bus Method |-dbus->| SetAttribute()            | ||
44198f694ddSPatrick Williams | |  (For single attribute) |             |  |                       |       |                           | ||
44298f694ddSPatrick Williams | |                         |             |  |                       |       |                           | ||
443754b1048SSuryakanth Sekar | |6.Get Pending attributes |<---Req-/Res--->| Get PendingAttributes |<-dbus-| PendingAttributes         | ||
44498f694ddSPatrick Williams | |           list          |             |  |                       |       |                           | ||
445754b1048SSuryakanth Sekar | |7.Update new BIOS setting|<---Req-/Res--->| Set PendingAttributes |<-dbus-| PendingAttributes         | ||
44698f694ddSPatrick Williams | |           list          |             |  |                       |       |                           | ||
44798f694ddSPatrick Williams | |  For multiple attributes|             |  |                       |       |                           | ||
44898f694ddSPatrick Williams | +-------------------------+             |  +-----------------------+       +---------------------------+ ||
44998f694ddSPatrick Williams |                                         +---------------------------------------------------------------+||
45098f694ddSPatrick Williams +-----------------------------------------+-----------------------------------------------------------------+
45198f694ddSPatrick Williams```
45298f694ddSPatrick Williams
453*f4febd00SPatrick Williams1. Get Current Attributes name and value list: Get the current BIOS settings
454*f4febd00SPatrick Williams   attribute name and value pair list. GET Method -
455*f4febd00SPatrick Williams   "https://<BMC IP address>/redfish/v1/Systems/system/Bios"
456*f4febd00SPatrick Williams
457*f4febd00SPatrick Williams2. Get Attribute Registry: Get the detailed information about Bios Attribute
458*f4febd00SPatrick Williams   like current value, supported value, description, Menupath, Default value.
45998f694ddSPatrick Williams   GET Method - "https://<BMC IP address>/redfish/v1/Registries/Bios"
46098f694ddSPatrick Williams
461*f4febd00SPatrick Williams3. Change BIOS password: ACTION -
462*f4febd00SPatrick Williams   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword"
46398f694ddSPatrick Williams
464*f4febd00SPatrick Williams4. Reset To default settings: ACTION -
465*f4febd00SPatrick Williams   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios"
46698f694ddSPatrick Williams
467*f4febd00SPatrick Williams5. Update new BIOS settings (single attribute): Use to send the new value for
468*f4febd00SPatrick Williams   particular attribute or list of attributes. PATCH Method -
469*f4febd00SPatrick Williams   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings" Ex:
47098f694ddSPatrick Williams   Attribute name and new value : { "DdrFreqLimit" : 2400}
47198f694ddSPatrick Williams
472*f4febd00SPatrick Williams6. Get the new pending value list: Use to get the new pending attributes list.
473*f4febd00SPatrick Williams   GET Method -
474*f4febd00SPatrick Williams   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings" -Valid
475*f4febd00SPatrick Williams   only in deferred model. For immediate update model, It will be empty. Ex:
47698f694ddSPatrick Williams   Attribute name and new value : { "DdrFreqLimit" : 2400,"QuietBoot",0x1 }
47798f694ddSPatrick Williams
478*f4febd00SPatrick Williams7. Update new BIOS settings (multiple attributes): Use to send the new value for
479*f4febd00SPatrick Williams   particular attribute or list of attributes. PATCH Method -
480*f4febd00SPatrick Williams   "https://<BMC IP address>/redfish/v1/Systems/system/Bios/Settings" Ex:
481*f4febd00SPatrick Williams   Attribute name and new value list : { "DdrFreqLimit" : 2400},"QuietBoot",0x1
482*f4febd00SPatrick Williams   }
48398f694ddSPatrick Williams
48498f694ddSPatrick Williams## Alternatives Considered
485*f4febd00SPatrick Williams
48698f694ddSPatrick WilliamsRedfish Host specification definition is not completed and ready BIOS support
487*f4febd00SPatrick Williamsalso not available. There are 1000+ BIOS variables and storing in
488*f4febd00SPatrick Williamsphosphor-settingsd is not optimal.
48998f694ddSPatrick Williams
49098f694ddSPatrick Williams## Impacts
491*f4febd00SPatrick Williams
49298f694ddSPatrick WilliamsBIOS must support and follow RBC BIOS configuration flow.
49398f694ddSPatrick Williams
49498f694ddSPatrick Williams## Testing
495*f4febd00SPatrick Williams
496*f4febd00SPatrick WilliamsAble to change the BIOS configuration via BMC through LAN Able to change the
497*f4febd00SPatrick WilliamsBIOS setup password via BMC Compliance with Redfish will be tested using the
498*f4febd00SPatrick WilliamsRedfish Service Validator
499