Ipmbbridge: Add host Identification support for ipmid.
Added hostId support for ipmid. This helps in identifying
host and sending host id to ipmid for multi host support.
Host ids are configured through channel config json.
TESTED : Built Facebook YosemiteV2 & Tiogapass images and loaded on
the target hardware. We are able to see hostId's for all the hosts.
Note : This is the follow-up patch for multiple channels
support in ipmbbridge.
https://gerrit.openbmc-project.xyz/c/openbmc/ipmbbridge/+/34579
Signed-off-by: Kumar Thangavel <thangavel.k@hcl.com>
Change-Id: Ie232d61a0e1f69d2a48d472160ba58a1ea64a6d7
diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp
index 3dc1a76..3bf8469 100644
--- a/ipmbbridged.cpp
+++ b/ipmbbridged.cpp
@@ -428,8 +428,12 @@
auto ipmbMessageReceived = IpmbRequest();
ipmbMessageReceived.i2cToIpmbConstruct(ipmbFrame, r);
+ int devId = getDevIndex();
+
std::map<std::string, std::variant<int>> options{
- {"rqSA", ipmbAddressTo7BitSet(ipmbMessageReceived.rqSA)}};
+ {"rqSA", ipmbAddressTo7BitSet(ipmbMessageReceived.rqSA)},
+ {"hostId", devId}};
+
using IpmiDbusRspType = std::tuple<uint8_t, uint8_t, uint8_t, uint8_t,
std::vector<uint8_t>>;
conn->async_method_call(