diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-10-31 17:27:02 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-14 20:55:12 +0300 |
commit | 1873f358c86ff7f21fefabc76e347ab415a1488b (patch) | |
tree | 6eff96dd941f9c4e9336a2e81de4f69ac829befc /meta-openbmc-machines/meta-openpower | |
parent | e4bdcf7622d326964093fd55e8f5c8f083082f1b (diff) | |
download | openbmc-1873f358c86ff7f21fefabc76e347ab415a1488b.tar.xz |
phosphor-dbus-monitor: Add the witherspoon specific config file
This config file would be used to create the events when
configured property gets changed.
This config file would be used by the phosphor-event-manager
process.
Resolves openbmc/openbmc#2399
Change-Id: Ib933d720cd81313caf025c35074304f55fac401d
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower')
3 files changed, 128 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend index 7de97f313..2831afe21 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend @@ -1,3 +1,4 @@ PHOSPHOR_DBUS_MONITOR_CONFIGS_append = " witherspoon-fan-policy-native" PHOSPHOR_DBUS_MONITOR_CONFIGS_append = " witherspoon-thermal-policy-native" PHOSPHOR_DBUS_MONITOR_CONFIGS_append = " witherspoon-power-supply-policy-native" +PHOSPHOR_DBUS_MONITOR_CONFIGS_append = " witherspoon-events-policy-native" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/events/witherspoon-events-policy-native.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/events/witherspoon-events-policy-native.bb new file mode 100644 index 000000000..c478e12b7 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/events/witherspoon-events-policy-native.bb @@ -0,0 +1,13 @@ +SUMMARY = "Event policy for Witherspoon" +PR = "r1" + +inherit native +inherit obmc-phosphor-license +inherit phosphor-dbus-monitor + +SRC_URI += "file://config.yaml" + +do_install() { + install -D ${WORKDIR}/config.yaml ${D}${config_dir}/config.yaml +} + diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/events/witherspoon-events-policy/config.yaml b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/events/witherspoon-events-policy/config.yaml new file mode 100644 index 000000000..0d31afb2b --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/events/witherspoon-events-policy/config.yaml @@ -0,0 +1,114 @@ +- name: occpath group + class: group + group: path + members: + - meta: PATH + path: /org/open_power/control/occ0 + +- name: occproctemp property + class: group + group: property + type: boolean + members: + - interface: org.open_power.OCC.Status + meta: PROPERTY + property: ThrottleProcTemp + +- name: occprocpower property + class: group + group: property + type: boolean + members: + - interface: org.open_power.OCC.Status + meta: PROPERTY + property: ThrottleProcPower + +- name: occmemtemp property + class: group + group: property + type: boolean + members: + - interface: org.open_power.OCC.Status + meta: PROPERTY + property: ThrottleMemTemp + +- name: watch occproctemp + class: watch + watch: property + paths: occpath group + properties: occproctemp property + callback: check occproctemp + +- name: watch occprocpower + class: watch + watch: property + paths: occpath group + properties: occprocpower property + callback: check occprocpower + +- name: watch occmemtemp + class: watch + watch: property + paths: occpath group + properties: occmemtemp property + callback: check occmemtemp + +- name: check occproctemp + class: condition + condition: count + paths: occpath group + properties: occproctemp property + defer: 1000us + callback: create occproctemp event + countop: '==' + countbound: 1 + op: '==' + bound: true + +- name: check occprocpower + class: condition + condition: count + paths: occpath group + properties: occprocpower property + defer: 1000us + callback: create occprocpower event + countop: '==' + countbound: 1 + op: '==' + bound: true + +- name: check occmemtemp + class: condition + condition: count + paths: occpath group + properties: occmemtemp property + defer: 1000us + callback: create occmemtemp event + countop: '==' + countbound: 1 + op: '==' + bound: true + +- name: create occproctemp event + class: callback + callback: event + paths: occpath group + properties: occproctemp property + eventName: occ + eventMessage: "Processor throttled due to an over temperature condition." + +- name: create occprocpower event + class: callback + callback: event + paths: occpath group + properties: occprocpower property + eventName: occ + eventMessage: "Processor throttled due to reaching the power cap limit." + +- name: create occmemtemp event + class: callback + callback: event + paths: occpath group + properties: occmemtemp property + eventName: occ + eventMessage: "Memory throttled due to an over temperature condition." |