How openbmc/phosphor-bmc-code-mgmt works
phosphor-bmc-code-mgmt is a collection of BMC software-management applications. A representative update flow accepts a firmware archive (including via USB), validates and registers an image, then exposes software/device state and update operations through D-Bus. Separate managers cover programmable and peripheral devices such as CPLDs, EEPROMs, and TPMs; shared software-manager and GPIO layers support device discovery and access. The README describes the product broadly, while excerpts establish only selected implementation links; unverified cross-process update wiring is omitted or marked dashed.
Main entry points: software.cpp Software objects · software_manager.cpp Device discovery · usb_manager.cpp USB update · image_manager.cpp Image manager
Components 27
BMC Updates
- USB update
bmc/usb/usb_manager.cpp - Image manager
bmc/image_manager.cpp - Version metadata
bmc/version.cpp - Update watches
bmc/watch.cpp - Image downloads
bmc/download_manager.cpp - Update coordination
bmc/update_manager.cpp - Activation
bmc/activation.cpp - Image synchronization
bmc/sync_manager.cpp - Side switching
bmc/side-switch/side_switch.cpp
Shared Services
- Device discovery
common/src/software_manager.cpp - Software objects
common/src/software.cpp - Update interface
common/src/software_update.cpp - System state
common/src/system_state.cpp - GPIO mux control
common/src/gpio_controller.cpp - I2C access
common/i2c/i2c.cpp - PLDM firmware tools
common/pldm/pldm_package_util.cpp
Device Management
- CPLD manager
cpld/cpld_software_manager.cpp - EEPROM manager
eeprom-device/eeprom_device_software_manager.cpp - Voltage regulator manager
i2c-vr/i2cvr_software_manager.cpp - SPI flash manager
spi-flash/spi_software_manager.cpp - TPM manager
tpm/tpm_software_manager.cpp
Hardware Drivers
- CPLD devices
cpld/cpld.cpp - EEPROM devices
eeprom-device/eeprom_device.cpp - Voltage regulators
i2c-vr/i2cvr_device.cpp - SPI flash devices
spi-flash/spi_device.cpp - TPM devices
tpm/tpm_device.cpp
Other components
- Update initiator
Connections 19
- Update initiator → USB update: initiates
- USB update → Image manager: stages archive
- USB update → Update coordination: requests update
- Image manager → Version metadata: reads metadata
bmc/image_manager.cpp - Image manager → Update watches: uses watches
bmc/image_manager.cpp - Device discovery → CPLD manager: dispatches discovery
- Device discovery → EEPROM manager: dispatches discovery
- Device discovery → TPM manager: dispatches discovery
- CPLD manager → CPLD devices: constructs device
cpld/cpld_software_manager.cpp - CPLD manager → Software objects: creates object
cpld/cpld_software_manager.cpp - EEPROM manager → EEPROM devices: constructs device
eeprom-device/eeprom_device_software_manager.cpp - EEPROM manager → Software objects: creates object
eeprom-device/eeprom_device_software_manager.cpp - TPM manager → TPM devices: constructs device
tpm/tpm_software_manager.cpp - TPM manager → Software objects: creates object
tpm/tpm_software_manager.cpp - CPLD devices → GPIO mux control: uses mux
- EEPROM devices → GPIO mux control: uses mux
- Voltage regulator manager → Voltage regulators: manages devices
- SPI flash manager → SPI flash devices: manages devices
- Software objects → Update interface: exposes updates