Add Asserted property for IERR

Add "Asserted" property in dbus to make other daemon(for example,
phosphor-ipmi-host) could know whether the error is asserted or not.

Tested:
Case 1.
Enable meson option 'dynamic-sensors' and 'hybrid-sensors' to
phosphor-ipmi-host and set option 'sensor-yaml-gen' to location of
"ipmi-sensors.yaml".
The configuration for IERR sensor in ipmi-sensors.yaml:
```
0x08:
  entityID: 0x41
  entityInstance: 2
  interfaces:
    xyz.openbmc_project.HostErrorMonitor.Processor.IERR:
      Asserted:
        Offsets:
          0x00:
            assert: true
            type: bool
  mutability: Mutability::Read
  path: /xyz/openbmc_project/host_error_monitor/processor/IERR
  readingType: assertion
  sensorNamePattern: nameLeaf
  sensorReadingType: 0x6F
  sensorType: 0x07
  serviceInterface: org.freedesktop.DBus.Properties
```

Result:
IERR is not triggered:
root@qbmc:~# ipmitool sdr elist | grep IERR
IERR             | 06h | ok  | 65.2 |
IERR is triggered:
root@qbmc:~# ipmitool sdr elist | grep IERR
IERR             | 06h | ok  | 65.2 | IERR

Case 2.
Only set option 'sensor-yaml-gen' to location of "ipmi-sensors.yaml" and
set option 'invsensor-yaml-gen' to location of
"ipmi-inventory-sensors.yaml".
The configuration for IERR sensor in "ipmi-sensors.yaml":
```
0xF6:
  entityID: 0x03
  entityInstance: 2
  interfaces:
   xyz.openbmc_project.HostErrorMonitor.Processor.IERR:
      Asserted:
        Offsets:
          0x00:
            type: bool
            assert: true
            deassert: false
  mutability: Mutability::Write|Mutability::Read
  path: /xyz/openbmc_project/host_error_monitor/processor/IERR
  readingType: assertion
  sensorNamePattern: nameLeaf
  sensorReadingType: 0x6f
  sensorType: 0x07
  serviceInterface: org.freedesktop.DBus.Properties
```
The configuration for IERR sensor in ipmi-inventory-sensors.yaml:
```
/xyz/openbmc_project/host_error_monitor/processor/IERR:
    eventReadingType: 0x6F
    offset: 0x00
    sensorID: 0xF6
    sensorType: 0x07
```

Result:
IERR is not triggered:
root@qbmc:~# ipmitool sdr elist | grep IERR
IERR             | F6h | ok  |  3.2 |
IERR is triggered:
root@gbmc:~# ipmitool sdr elist | grep IERR
IERR             | F6h | ok  |  3.2 | IERR

Signed-off-by: JinFuLin <JeffLin2@quantatw.com>
Change-Id: Ib7a16097c68b558c55562ed91b51000ea3278361
1 file changed
tree: d32987eb0546b8848fa50c6134cdb79509f11a69
  1. include/
  2. service_files/
  3. src/
  4. .clang-format
  5. cmake-format.json
  6. CMakeLists.txt
  7. LICENSE
  8. MAINTAINERS
  9. OWNERS
  10. README.md
README.md

host-error-monitor

The host-error-monitor application is intended to monitor various host error signals and take appropriate action (logging, crashdump, reset, etc.) when triggered.