smbios-mdr: Associate with the motherboard

The change associates the objects such as processor, memory and PCIe
slots published by smbios-mdr with the motherboard inventory object.
Presently objects paths created by smbios-mdr have the motherboard path
as the prefix -- "/xyz/openbmc_project/inventory/chassis/motherboard".
For machine with entity-manager dynamic stack, that hardcoded
motherboard path would probably not be the object path of the
motherboard.

We have implemented a DBus method in EM that can return the inventory
object path of the root board in the system. Such associations can be
assembled in Redfish resources can indicate the machine topology.

Tested:
DBus call on the Association interface of a CPU object.

busctl get-property xyz.openbmc_project.Smbios.MDR_V2 \
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0 \
xyz.openbmc_project.Association.Definitions Associations
a(sss) 1 "chassis" "processors" \
"/xyz/openbmc_project/inventory/system/board/GSZ"

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: Ia95159a87c2ce5e69e90e622cf341a68e7db13d4
8 files changed