README.md
1# Remote BIOS Configuration
2
3[](LICENSE)
4
5## Overview
6
7The **biosconfig_manager** service enables users to view and modify the BIOS
8setup configuration parameters remotely through the Baseboard Management
9Controller (BMC) at any host state. Changes to these parameters will take effect
10upon the next system reboot or immediately, depending on the host firmware.
11
12For more details, please refer to [design document][rbmc-design-document].
13
14## Features
15
16- **Remote management** of BIOS settings.
17- **Immediate updates** or scheduled changes upon reboot.
18- **Reset BIOS Settings** support through the dbus.
19- **ChangePassword** support to change the BIOS setup password.
20
21## RBC Manager Interface
22
23The Manager interface exposes methods and properties to Get & Set BIOS
24attributes via [dbus][pdi-manager-bios].
25
26### Service Name
27
28```txt
29xyz.openbmc_project.BIOSConfigManager
30```
31
32### Object Path
33
34```txt
35/xyz/openbmc_project/bios_config/manager
36```
37
38### Interface Name
39
40```txt
41xyz.openbmc_project.BIOSConfig.Manager
42```
43
44### Methods
45
46- **SetAttribute** Sets a specific BIOS attribute to a new value.
47- **GetAttribute** Retrieves the current and pending values of a BIOS attribute.
48
49### Properties
50
51- **ResetBIOSSettings** To reset the BIOS settings based on the Reset Flag.
52- **BaseBIOSTable** Captures the entire BIOS table (collective information of
53 all the BIOS attributes and their properties)
54
55## Signature of `BaseBIOSTable`
56
57The `BaseBIOSTable` property in the RBC Manager Interface is a complex
58dictionary that defines the structure of BIOS attributes. Its type signature is
59as follows:
60
61```plaintext
62dict[string, struct[
63 enum[self.AttributeType],
64 boolean,
65 string,
66 string,
67 string,
68 variant[int64, string],
69 variant[int64, string],
70 array[struct[enum[self.BoundType], variant[int64, string], string]]
71]]
72```
73
74This structure consists of:
75
76- **Attribute Name (string)**: The name of the BIOS attribute.
77- **Attribute Type (enum)**: The type of the BIOS attribute (e.g., String,
78 Integer).
79- **Read-only Status (boolean)**: Whether the attribute is read-only.
80- **Display Name (string)**: The human-readable name of the attribute.
81- **Description (string)**: A description of what the attribute does.
82- **Menu Path (string)**: The BIOS menu path where this attribute can be found.
83- **Current Value (variant[int64, string])**: The current value of the
84 attribute.
85- **Default Value (variant[int64, string])**: The default value of the
86 attribute.
87- **Options (array of structs)**: The available options or bounds for this
88 attribute.
89
90### Examples
91
92Here is an example json structure of a `String` attribute with `attributeName`
93`DrdFreqLimit` & its various properties in BaseBIOSTable signature.
94
95```json
96{
97 "DdrFreqLimit": {
98 "attributeType": "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String",
99 "readonlyStatus": false,
100 "displayname": "Memory Operating Speed Selection",
101 "description": "Force specific Memory Operating Speed or use Auto setting.",
102 "menuPath": "Advanced/Memory Configuration/Memory Operating Speed Selection",
103 "current": "0x00",
104 "default": "0x0B",
105 "options": [
106 { "optionstring": "auto", "optionvalue": "enum0" },
107 { "optionstring": "2133", "optionvalue": "enum1" },
108 { "optionstring": "2400", "optionvalue": "enum2" },
109 { "optionstring": "2664", "optionvalue": "enum3" },
110 { "optionstring": "2933", "optionvalue": "enum4" }
111 ]
112 }
113}
114```
115
116Here is another example json structure of a `Integer` attribute with attribute
117with name `BIOSSerialDebugLevel` & its various properties in BaseBIOSTable
118signature.
119
120```json
121{
122 "BIOSSerialDebugLevel": {
123 "attributeType": "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Integer",
124 "readonlyStatus": false,
125 "displayname": "BIOS Serial Debug level",
126 "description": "BIOS Serial Debug level during system boot.",
127 "menuPath": "Advanced/Debug Feature Selection",
128 "current": "0x00",
129 "default": "0x01",
130 "options": [
131 { "optionstring": "MinBound", "optionvalue": 0 },
132 { "optionstring": "MaxBound", "optionvalue": 4 },
133 { "optionstring": "ScalarIncrement", "optionvalue": 1 }
134 ]
135 }
136}
137```
138
139## Initialization of `BaseBIOSTable`
140
141When the `bios-settings-mgr` daemon starts, it initializes with an empty
142`BaseBIOSTable`. It is the responsibility of provider daemons, such as **PLDM**
143or **IPMI**, to populate this table by fetching or defining the BIOS settings.
144These provider daemons are expected to gather the necessary BIOS attributes and
145values from their respective sources (ex: bmc, system firmware) and then
146initialize the `BaseBIOSTable` property with those settings.
147
148### BIOS with PLDM as Communication Protocol
149
150For systems that use the **PLDM (Platform Level Data Model)** protocol between
151BMC & Host, OEM vendors can define their own BIOS attributes in the form of
152[JSON files][pldm-bios-json]. The PLDM daemon parses these files and initializes
153the `BaseBIOSTable` property accordingly. This allows for flexible and custom
154BIOS configuration options based on the vendor's specifications.
155
156For more details , refer to the [BIOS Support in PLDM][pldm-bios].
157
158### BIOS with IPMI as Communication Protocol
159
160For systems that use the **Intelligent Platform Management Interface** protocol
161between BMC & Host, BIOS attributes are gathered from BIOS as an `xml file` &
162`BaseBIOSTable` would then be initialized with the attributes data from the
163parsed xml file.
164
165For more details, refer to the code [BIOS Support in IPMI][ipmi-intel-bios].
166
167## RBC Password Interface
168
169### Service Name
170
171```txt
172xyz.openbmc_project.BIOSConfigManager
173```
174
175### Object Path
176
177```txt
178/xyz/openbmc_project/bios_config/password
179```
180
181### Interface Name
182
183```txt
184xyz.openbmc_project.BIOSConfig.Password
185```
186
187### Methods
188
189- **ChangePassword** Used to change the BIOS setup password.
190
191### Properties
192
193- **PasswordInitialized** Used to indicate whether the BIOS password-related
194 details have been received.
195
196## RBC SecureBoot Interface
197
198The SecureBoot interface exposes methods and properties to Get & Set UEFI
199SecureBoot settings via [dbus][pdi-secureboot-bios].
200
201### Object Path
202
203```txt
204xyz.openbmc_project.BIOSConfig.SecureBoot
205```
206
207### Properties
208
209- **CurrentBoot** Used to indicate UEFI Secure Boot state during current boot
210 cycle
211- **PendingEnable** An indication of whether the UEFI Secure Boot takes effect
212 on next boot
213- **Mode** The current UEFI Secure Boot Mode
214
215### SecureBoot with Redfish Host Interface as Communication Protocol
216
217For systems that use the **Redfish Host Interface** protocol between BMC & Host,
218UEFI SecureBoot configuration is gathered by BMC via redfish. The settings are
219transformed to native dbus format and properties are set accordingly.
220
221[rbmc-design-document]:
222 https://github.com/openbmc/docs/blob/master/designs/remote-bios-configuration.md
223[pldm-bios-json]:
224 https://github.com/openbmc/pldm/blob/master/oem/ibm/configurations/bios/com.ibm.Hardware.Chassis.Model.Rainier2U/bios_attrs.json
225[pldm-bios]: https://github.com/openbmc/pldm?tab=readme-ov-file#bios-support
226[ipmi-intel-bios]:
227 https://github.com/openbmc/intel-ipmi-oem/blob/master/src/biosconfigcommands.cpp
228[pdi-manager-bios]:
229 https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/BIOSConfig/Manager.interface.yaml
230[pdi-secureboot-bios]:
231 https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/BIOSConfig/SecureBoot.interface.yaml
232