Get i2c addresses from configuration files.
Different platforms have different bus topology.
Use the peci address and i2c address specified in
json file to read data from cpu.
Tested:
Update baseboard json file:
{
"Address": "0x30",
"Bus": 0,
"CpuID": 1,
"Name": "CPU 1",
"PresenceGpio": [
{
"Name": "CPU1_PRESENCE",
"Polarity": "Low"
}
],
"PiromI2cBus": 13,
"PiromI2cAddress": "0x50",
"Type": "XeonCPU"
}
Verified that correct bus addresses are used.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Ib133958af8349b43c2f8f73c32d1aaa0d5bf52eb
diff --git a/service_files/xyz.openbmc_project.cpuinfo.service b/service_files/xyz.openbmc_project.cpuinfo.service
index e29bf7e..64a1adf 100644
--- a/service_files/xyz.openbmc_project.cpuinfo.service
+++ b/service_files/xyz.openbmc_project.cpuinfo.service
@@ -1,7 +1,9 @@
[Unit]
Description=Intel BMC CPU Info
Requires=smbios-mdrv2.service
+Requires=xyz.openbmc_project.EntityManager.service
After=smbios-mdrv2.service
+After=xyz.openbmc_project.EntityManager.service
[Service]
Restart=always