Add CPU and memory LocationCode DBus interface
LocationCode DBus interface can describe the sockets with physical
labels printed on the board. Bmcweb looks up the LocationCode for CPU
and DIMM resources and then identify the resource location. Those
physical CPU and DIMM socket labels are hardcoded in SMBIOS table as
socket designation.
Tested:
CPU and memory DBus objects show the
xyz.openbmc_project.Inventory.Decorator.LocationCode interface and the
LocationCode property is the socket label.
Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I6131567aca1958505989773fc800a4c2d1dd7e1f
diff --git a/src/cpu.cpp b/src/cpu.cpp
index 1010b58..5e96254 100644
--- a/src/cpu.cpp
+++ b/src/cpu.cpp
@@ -30,6 +30,8 @@
std::string result = positionToString(positionNum, structLen, dataIn);
processor::socket(result);
+
+ location::locationCode(result);
}
void Cpu::family(const uint8_t value)