Use mobo's object system iface to find mobo path.
This change use system interface to find the inventory object path
of the root board in the system. This replaces the `ReScan`
method to get the root object path. The `ReScan` implementation in
EntityManager never upstreamed and that CL was abandoned.
CL: https://gerrit.openbmc.org/c/openbmc/entity-manager/+/46128
TESTED:
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/motherboard"
busctl get-property xyz.openbmc_project.Smbios.MDR_V2 \
> /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1 \
> xyz.openbmc_project.Association.Definitions Associations
a(sss) 1 "chassis" "processors" "/xyz/openbmc_project/inventory/system/board/motherboard"
busctl --verbose get-property xyz.openbmc_project.ObjectMapper \
/xyz/openbmc_project/inventory/system/board/motherboard/processors \
xyz.openbmc_project.Association endpoints
ARRAY "s" {
STRING "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0";
STRING "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1";
};
Signed-off-by: Gobinath Krishnamoorthy <gobinathk@google.com>
Change-Id: Idc6f8c58324c7618a2c4c5a2c4079599c7c29cf4
diff --git a/include/mdrv2.hpp b/include/mdrv2.hpp
index ddde0ef..994598c 100644
--- a/include/mdrv2.hpp
+++ b/include/mdrv2.hpp
@@ -49,6 +49,14 @@
static constexpr const char* smbiosPath = "/xyz/openbmc_project/Smbios";
static constexpr const char* smbiosInterfaceName =
"xyz.openbmc_project.Smbios.GetRecordType";
+static constexpr const char* mapperBusName = "xyz.openbmc_project.ObjectMapper";
+static constexpr const char* mapperPath = "/xyz/openbmc_project/object_mapper";
+static constexpr const char* mapperInterface =
+ "xyz.openbmc_project.ObjectMapper";
+static constexpr const char* systemInterfacePath =
+ "/xyz/openbmc_project/inventory/system";
+static constexpr const char* systemInterface =
+ "xyz.openbmc_project.Inventory.Item.System";
constexpr const int limitEntryLen = 0xff;
class MDR_V2 :