From bf15e9737581afd29c7e4e2aeb7aa236184a7859 Mon Sep 17 00:00:00 2001 From: Deepak Kodihalli Date: Sun, 13 Aug 2017 12:00:36 -0500 Subject: ipmi sensors: fix d-bus mappings in input yaml A system specific YAML file helps map ipmi sensors to corresponding d-bus objects. This YAML was using the sensor type as the key. This was an issue because there is a possibility of different sensors, with the same sensor type, mapping to different d-bus objects and interfaces. While still maintaining the sensor number as the key in the "output" YAML (generated by an MRW parser), use the sensor instance name as the key in the input YAML. This helps to have 1x1 mappings between sensors and d-bus objects. Resolves openbmc/openbmc#2130. Change-Id: I3e87fa88d8622615f1a21aa46084f7082dcc4d0f Signed-off-by: Deepak Kodihalli --- .../openpower-config.yaml | 3 +- .../config.yaml | 37 ++++++++++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw/openpower-config.yaml b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw/openpower-config.yaml index d0082ffe1..bd928b847 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw/openpower-config.yaml +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem-sensor-inventory-mrw/openpower-config.yaml @@ -1,5 +1,4 @@ -0x09: - path: /org/open_power/control/ +occ_active_sensor: serviceInterface: org.freedesktop.DBus.Properties readingType: assertion interfaces: diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml index a0dce0e02..61c43cf1d 100644 --- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml +++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml @@ -1,13 +1,14 @@ -0xC3: +boot_count_sensor: path: /xyz/openbmc_project/state/host0 serviceInterface: org.freedesktop.DBus.Properties - readingType: assertion + readingType: readingAssertion interfaces: xyz.openbmc_project.Control.Boot.RebootAttempts: AttemptsLeft: 0xFF: type: uint32_t -0x1F: + +os_boot_sensor: path: /xyz/openbmc_project/state/host0 serviceInterface: org.freedesktop.DBus.Properties readingType: assertion @@ -32,7 +33,8 @@ 0x06: assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.BootComplete" type: string -0x0F: + +fw_boot_sensor: path: /xyz/openbmc_project/state/host0 serviceInterface: org.freedesktop.DBus.Properties readingType: eventdata2 @@ -54,10 +56,10 @@ 0x14: type: string set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.MotherboardInit" -0x0C: + +dimm_func_sensor: serviceInterface: xyz.openbmc_project.Inventory.Manager readingType: assertion - byteOffset: 0x00 interfaces: xyz.openbmc_project.State.Decorator.OperationalStatus: Functional: @@ -71,16 +73,33 @@ type: "bool" assert: true deassert: false -0x07: + +cpu_func_sensor: serviceInterface: xyz.openbmc_project.Inventory.Manager readingType: assertion - byteOffset: 0x00 interfaces: xyz.openbmc_project.State.Decorator.OperationalStatus: Functional: 0x08: type: "bool" - assert: false + assert: false + deassert: true + xyz.openbmc_project.Inventory.Item: + Present: + 0x07: + type: "bool" + assert: true + deassert: false + +cpucore_func_sensor: + serviceInterface: xyz.openbmc_project.Inventory.Manager + readingType: assertion + interfaces: + xyz.openbmc_project.State.Decorator.OperationalStatus: + Functional: + 0x08: + type: "bool" + assert: false deassert: true xyz.openbmc_project.Inventory.Item: Present: -- cgit v1.2.1