commit | 027277a4a95e136dd92af434d3033c1b16dc429c | [log] [tgz] |
---|---|---|
author | Josh Lehan <krellan@google.com> | Mon Sep 11 05:28:19 2023 -0700 |
committer | Josh Lehan <krellan@google.com> | Fri Sep 29 14:21:12 2023 -0700 |
tree | 39983e352c2d14c068f36283c6f0e764457b5bbf | |
parent | e05a542324fcac40c9ff100287302ee92ed03621 [diff] |
Refactor MDRV2 class to allow more than one Refactored the main MDRV2 class to allow more than one object of this class to exist at the same time. All hardcoded paths have been made parameters to the constructor, so that they can be varied at runtime as needed, to avoid overlap. Also did some necessary internal cleanups to facilitate this. Tested: Created multiple copies of the MDRV2 object at the same time, it worked, all appeared on D-Bus, under distinct object paths and inventory paths. Destructed the MDRV2 object, it disappeared from D-Bus, constructed it again, it came back. https://gist.github.com/Krellan/6930bc2ed1ac16b93afcc3a12c02e545 Change-Id: Icd1ebf50086b526cf0cff149eb8ddc59da78f0a9 Signed-off-by: Josh Lehan <krellan@google.com>
The main application in this repo is smbiosmdrv2app
, capable of parsing a binary SMBIOS table and publishing the system information on D-Bus, to be consumed by other OpenBMC applications.
The SMBIOS table is usually sent to the BMC by the host firmware (BIOS). The system designer can theoretically choose any transport and mechanism for sending the SMBIOS data, but there are at least two implementation today:
The primary API is a set of Intel OEM IPMI commands called Managed Data Region version 2 (MDRv2), which provides a means for host firmware to send data through the VGA shared memory region. MDRv2 has a concept of multiple agents, each maintaining a "directory" containing directory entries (aka data sets). The host can query for the existence and version of directories to determine when it needs to send an updated SMBIOS table.
intel-ipmi-oem
implements the IPMI command handlers, routing commands and data to the correct agent (e.g. smbios-mdr
). The D-Bus interface between the IPMI handler and smbios-mdr
is largely a mirror of IPMI commands.
phosphor-ipmi-blobs
is an alternative implementation of a generic IPMI blob transfer API. Compared to MDRv2, it is simpler and easier to use, but also transfers the data in-band with the IPMI commands and therefore slower than using a shared memory region (which may or may not be a concern).
phosphor-ipmi-blobs
provides a blob manager shared library for ipmid
which implements the IPMI commands. In turn, it loads blob handler libraries that each implement support for specific blobs. Here in smbios-mdr
we provide such a blob handler for the /smbios
blob. It works by writing the data into /var/lib/smbios/smbios2
(the local persistent cache for the SMBIOS table) and calling the AgentSynchronizeData
D-Bus method to trigger smbios-mdr
to reload and parse the table from that file.
cpuinfoapp
is an Intel-specific application that uses I2C and PECI to gather more details about Xeon CPUs that aren't included in the SMBIOS table for some reason. It also implements discovery and control for Intel Speed Select Technology (SST).