xref: /openbmc/pldm/docs/bios_implementation.md (revision 571d7d44635580ee7bb29e84ee3114c472d3fc61)
1*571d7d44SManojkiran Eda# BIOS Support
2*571d7d44SManojkiran Eda
3*571d7d44SManojkiran EdaRedfish supports the BIOS Attribute Registry, which provides users with a list
4*571d7d44SManojkiran Edaof BIOS attributes supported in the BIOS configuration. To incorporate BIOS
5*571d7d44SManojkiran Edaattribute registry support in openBMC, BmcWeb is designed to read data from the
6*571d7d44SManojkiran EdaBase BIOS Table. PLDM populates the Base BIOS Table for the BIOS Config Manager
7*571d7d44SManojkiran Edabased on BIOS JSON files. BIOS functionality is integrated into PLDM according
8*571d7d44SManojkiran Edato the guidelines in the
9*571d7d44SManojkiran Eda[PLDM BIOS Specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0247_1.0.0.pdf).
10*571d7d44SManojkiran EdaBIOS attributes, also referred to as BIOS parameters or configuration settings,
11*571d7d44SManojkiran Edaare structured within JSON files. Each attribute is defined by its name, type,
12*571d7d44SManojkiran Edaand type-specific metadata. PLDM parses
13*571d7d44SManojkiran Eda[BIOS JSON file](https://github.com/openbmc/pldm/tree/master/oem/ibm/configurations/bios/com.ibm.Hardware.Chassis.Model.Rainier2U)
14*571d7d44SManojkiran Edaand creates the
15*571d7d44SManojkiran Eda[Base BIOS Table](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/BIOSConfig/Manager.interface.yaml#L62)
16*571d7d44SManojkiran Edahosted by [BIOS Config Manager](https://github.com/openbmc/bios-settings-mgr).
17*571d7d44SManojkiran EdaThe design is documented in
18*571d7d44SManojkiran Eda[DesignDoc](https://github.com/openbmc/docs/blob/master/designs/remote-bios-configuration.md).
19*571d7d44SManojkiran EdaRedfish supports
20*571d7d44SManojkiran Eda[BIOS Attribute registry](https://redfish.dmtf.org/schemas/v1/AttributeRegistry.v1_3_8.json),
21*571d7d44SManojkiran Edawhich provides users with the list of BIOS attributes supported in the BIOS
22*571d7d44SManojkiran Edaconfiguration. The BIOS Attribute registry data is supposed to be derived from
23*571d7d44SManojkiran Eda[Base BIOS Table](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/BIOSConfig/Manager.interface.yaml#L62).
24*571d7d44SManojkiran EdaPLDM populates the Base BIOS Table for BIOS Config Manager based on BIOS Json
25*571d7d44SManojkiran Edafiles.
26*571d7d44SManojkiran Eda
27*571d7d44SManojkiran EdaAfter the JSON files are parsed, pldm would also create the string table,
28*571d7d44SManojkiran Edaattribute table, and attribute value table as per Section7 in
29*571d7d44SManojkiran Eda[PLDM BIOS Specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0247_1.0.0.pdf).
30*571d7d44SManojkiran EdaThose BIOS tables are exchanged with remote PLDM terminus using the
31*571d7d44SManojkiran Eda`GetBiosTable` command as defined in DSP0247_1.0.0.pdf Section 8.1. All the
32*571d7d44SManojkiran Eda`bios attribute json files are kept under OEM`
33*571d7d44SManojkiran Eda[Path](https://github.com/openbmc/pldm/tree/master/oem). BIOS json configuration
34*571d7d44SManojkiran Edais provided in bios_attr.json file which contains attributes of type enum,
35*571d7d44SManojkiran Edainteger and string.
36*571d7d44SManojkiran Eda
37*571d7d44SManojkiran EdaInteger Attribute details as documented at Table9 of
38*571d7d44SManojkiran Eda[PLDM BIOS Specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0247_1.0.0.pdf):
39*571d7d44SManojkiran Eda
40*571d7d44SManojkiran Eda```json
41*571d7d44SManojkiran Eda{
42*571d7d44SManojkiran Eda  "entries": [
43*571d7d44SManojkiran Eda    {
44*571d7d44SManojkiran Eda      "attribute_type": "integer",
45*571d7d44SManojkiran Eda      "attribute_name": "Attribute Name",
46*571d7d44SManojkiran Eda      "lower_bound": "The lower bound on the integer value",
47*571d7d44SManojkiran Eda      "upper_bound": "The upper bound on the integer value",
48*571d7d44SManojkiran Eda      "scalar_increment": "The scalar value that is used for the increments to this integer ",
49*571d7d44SManojkiran Eda      "default_value": "The default value of the integer",
50*571d7d44SManojkiran Eda      "help_text": "Help text about attribute usage",
51*571d7d44SManojkiran Eda      "display_name": "Attribute Display Name",
52*571d7d44SManojkiran Eda      "read_only": "Read only Attribute"
53*571d7d44SManojkiran Eda    }
54*571d7d44SManojkiran Eda  ]
55*571d7d44SManojkiran Eda}
56*571d7d44SManojkiran Eda```
57*571d7d44SManojkiran Eda
58*571d7d44SManojkiran EdaEnum Attribute details as documented at Table6 of
59*571d7d44SManojkiran Eda[PLDM BIOS Specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0247_1.0.0.pdf):
60*571d7d44SManojkiran Eda
61*571d7d44SManojkiran Eda```json
62*571d7d44SManojkiran Eda{
63*571d7d44SManojkiran Eda  "entries": [
64*571d7d44SManojkiran Eda    {
65*571d7d44SManojkiran Eda      "attribute_type": "enum",
66*571d7d44SManojkiran Eda      "attribute_name": "Attribute Name",
67*571d7d44SManojkiran Eda      "possible_values": [
68*571d7d44SManojkiran Eda        "An array of character strings of variable to indicate the possible values of the BIOS attribute"
69*571d7d44SManojkiran Eda      ],
70*571d7d44SManojkiran Eda      "default_values": "Default value",
71*571d7d44SManojkiran Eda      "help_text": "Help text about attribute usage",
72*571d7d44SManojkiran Eda      "display_name": "Display Name",
73*571d7d44SManojkiran Eda      "read_only": "Read only Attribute"
74*571d7d44SManojkiran Eda    }
75*571d7d44SManojkiran Eda  ]
76*571d7d44SManojkiran Eda}
77*571d7d44SManojkiran Eda```
78*571d7d44SManojkiran Eda
79*571d7d44SManojkiran EdaString Attribute details as documented at Table7 of
80*571d7d44SManojkiran Eda[PLDM BIOS Specification](https://www.dmtf.org/sites/default/files/standards/documents/DSP0247_1.0.0.pdf):
81*571d7d44SManojkiran Eda
82*571d7d44SManojkiran Eda```json
83*571d7d44SManojkiran Eda{
84*571d7d44SManojkiran Eda  "entries": [
85*571d7d44SManojkiran Eda    {
86*571d7d44SManojkiran Eda      "attribute_type": "string",
87*571d7d44SManojkiran Eda      "attribute_name": "Attribute Name",
88*571d7d44SManojkiran Eda      "string_type": "It specifies the character encoding format, which can be ASCII, Hex, UTF-8, UTF-16LE, or UTF-16BE. Currently, only ASCII is supported",
89*571d7d44SManojkiran Eda      "minimum_string_length": "The minimum length of the string in bytes",
90*571d7d44SManojkiran Eda      "maximum_string_length": "The maximum length of the string in bytes",
91*571d7d44SManojkiran Eda      "default_string": "The default string itself",
92*571d7d44SManojkiran Eda      "help_text": "Help text about attribute usage",
93*571d7d44SManojkiran Eda      "display_name": "Attribute Display Name",
94*571d7d44SManojkiran Eda      "read_only": "Read only Attribute"
95*571d7d44SManojkiran Eda    }
96*571d7d44SManojkiran Eda  ]
97*571d7d44SManojkiran Eda}
98*571d7d44SManojkiran Eda```
99*571d7d44SManojkiran Eda
100*571d7d44SManojkiran EdaAs PLDM BIOS Attributes may differ across platforms and systems, supporting
101*571d7d44SManojkiran Edasystem-specific BIOS attributes is crucial. To achieve this, BIOS JSON files are
102*571d7d44SManojkiran Edaorganized under folders named after the system type. System type information is
103*571d7d44SManojkiran Edaretrieved from the Entity Manager service, which hosts the
104*571d7d44SManojkiran Eda[Compatible Interface](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory/Decorator/Compatible.interface.yaml).
105*571d7d44SManojkiran Eda
106*571d7d44SManojkiran EdaThis interface dynamically populates the Names property with system type
107*571d7d44SManojkiran Edainformation. However, determining the system type in the application space may
108*571d7d44SManojkiran Edatake some time since the compatible interface and the Names property are
109*571d7d44SManojkiran Edadynamically created by the Entity Manager. Consequently, BIOS tables are lazily
110*571d7d44SManojkiran Edaconstructed upon receiving the system type.
111*571d7d44SManojkiran Eda
112*571d7d44SManojkiran EdaTo enable system-specific BIOS attribute support within PLDM, the meson option
113*571d7d44SManojkiran Eda`system-specific-bios-json` can be utilized. With `system-specific-bios-json`
114*571d7d44SManojkiran Edaoption `enabled` BIOS JSON files specific to the system type are fetched during
115*571d7d44SManojkiran Edaruntime.
116