common: handle match for config intf added/removed

When the configuration interface for any device is added or removed as
part of dynamic configuration (via EM) the software manager has to
handle the dbus match and add or remove devices as necessary.

When an update is in progress, the device is not removed,
even if the configuration was removed.

Tested: On Tyan S8030 with bios software updater

For testing add/remove of configuration interfaces, the configuration
was probed on the powersupply FRU.

In case of InterfacesAdded:

```
May 26 14:54:00 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: [config] found configuration interface at xyz.openbmc_project.EntityManager, /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash
May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: Missing property Name on path /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash, interface xyz.openbmc_project.Configuration.SPIFlash.MuxOutputs1
May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: Missing property Polarity on path /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash, interface xyz.openbmc_project.Configuration.SPIFlash.MuxOutputs1
May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: SPI device: 1:0
May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: Found SPI Address 1e630000.spi
May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: SPI Device HostSPIFlash at 1:0 initialized successfully
May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: HostSPIFlash_5930: created dbus interfaces on path /xyz/openbmc_project/software/HostSPIFlash_5930
May 26 14:54:09 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: [Software] enabling update of /xyz/openbmc_project/software/HostSPIFlash_5930 (adding the update interface)
```

```
busctl tree xyz.openbmc_project.Software.BIOS
`- /xyz
  `- /xyz/openbmc_project
    `- /xyz/openbmc_project/software
      `- /xyz/openbmc_project/software/HostSPIFlash_5930
```

In case of InterfacesRemoved:

```
May 26 14:58:23 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: detected interface xyz.openbmc_project.Configuration.SPIFlash removed on /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash
May 26 14:58:23 s8030-bmc-30303035c0c1 phosphor-bios-software-update[9530]: removing device at /xyz/openbmc_project/inventory/system/board/HostSPIFlash/HostSPIFlash
```

```
 busctl tree xyz.openbmc_project.Software.BIOS
`- /xyz
  `- /xyz/openbmc_project
    `- /xyz/openbmc_project/software
```

Change-Id: I4faeb8e0144408b57767783ba2c5c4f3561f4021
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
3 files changed
tree: 8495948a09895c933f449db75694bd62a8285d7e
  1. bios/
  2. bmc/
  3. common/
  4. eeprom-device/
  5. i2c-vr/
  6. subprojects/
  7. test/
  8. .clang-format
  9. .clang-tidy
  10. .gitignore
  11. .shellcheck
  12. LICENSE
  13. meson.build
  14. meson.options
  15. OWNERS
  16. README.md
README.md

phosphor-bmc-code-mgmt

Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture

To Build

To build this package, do the following steps:

  1. meson build
  2. ninja -C build

To clean the repository run rm -r build.