smbios-mdr: Add patch to detect motherboard object creation

In some rare cases, it is observed that the smbios table is
received by smbiosmdr daemon way before Entity Manager creates
the motherboard object path. When that happens, smbios daemon
creates dbus objects for the cpus but fails to associate them with
the chassis. This causes missing "Processors" and "Memory" sections
under "Links" in the chassis response.

The issue can be easily reproduced by rebooting just the BMC without
rebooting the host node.

The fix is to setup a dbus matcher when the motherboard path
is not found. The matcher shall look for the event when
xyz.openbmc_project.Inventory.Item.System interface is added
to the dbus object.

Tested:

Tried rebooting the bmc multiple times and verified
that post reboot, the "Processors" and "Memory" sections
are visible under "Links" section in the Chassis response

```
{
  "@odata.id": "/redfish/v1/Chassis/<Chassis Name>",
  "@odata.type": "#Chassis.v1_17_0.Chassis",
  "Actions": {
    "#Chassis.Reset": {
      "@Redfish.ActionInfo": "/redfish/v1/Chassis/<Chassis Name>/ResetActionInfo",
      "target": "/redfish/v1/Chassis/<Chassis Name>/Actions/Chassis.Reset"
    }
  },
  "Assembly": {
    "@odata.id": "/redfish/v1/Chassis/<Chassis Name>/Assembly"
  },
  "ChassisType": ".....",
  "Id": "<Chassis Name>",
  "Links": {
    "Cables": [
      {
         ....
      }
    ],
    "Cables@odata.count": ..,
    "ComputerSystems": [
      {
        "@odata.id": "/redfish/v1/Systems/system"
      }
    ],
    "Contains": [
      .......
    ],
    "Contains@odata.count": ..,
    "ManagedBy": [
      {
        "@odata.id": "/redfish/v1/Managers/bmc"
      }
    ],
    "Processors": [ <<==== Processor section is present
      {
        "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0"
      },
      {
        "@odata.id": "/redfish/v1/Systems/system/Processors/cpu1"
      },
      {
        "@odata.id": "/redfish/v1/Systems/system/Processors/cpu2"
      },
      .....
    ],
    "Processors@odata.count": ..
  },
  "LogServices": {
    "@odata.id": "/redfish/v1/Chassis/<Chassis Name>/LogServices"
  },
  "Manufacturer": ".....",
  "Memory": { <<==== Memory section is present
    "@odata.id": "/redfish/v1/Systems/system/Memory"
  },
  "Model": ".....",
  "Name": "<Chassis Name>",
  "PCIeDevices": {
    "@odata.id": "/redfish/v1/Systems/system/PCIeDevices"
  },
  "PartNumber": ".....",
  "Power": {
    "@odata.id": "/redfish/v1/Chassis/<Chassis Name>/Power"
  },
  "PowerState": "On",
  "PowerSubsystem": {
    "@odata.id": "/redfish/v1/Chassis/<Chassis Name>/PowerSubsystem"
  },
  "Sensors": {
    "@odata.id": "/redfish/v1/Chassis/<Chassis Name>/Sensors"
  },
  "SerialNumber": ".....",
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Enabled"
  },
  "Thermal": {
    "@odata.id": "/redfish/v1/Chassis/<Chassis Name>/Thermal"
  },
  "ThermalSubsystem": {
    "@odata.id": "/redfish/v1/Chassis/<Chassis Name>/ThermalSubsystem"
  }
}
```

Google-Bug-Id: 273605964
Google-Bug-Id: 272581442
Change-Id: I4899a7f77538e8f1d1cc2636d52e9419d4caac5c
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
2 files changed
tree: b6416bbb9956ef0020690a353c8ea087dc666487
  1. conf/
  2. dynamic-layers/
  3. meta-nuvoton-npcm8xx/
  4. recipes-connectivity/
  5. recipes-core/
  6. recipes-google/
  7. recipes-kernel/
  8. recipes-phosphor/
  9. LICENSE
  10. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.