summaryrefslogtreecommitdiff
path: root/meta-ibm/meta-witherspoon/recipes-phosphor/power/power-supply-policy/power-supply-policy.yaml
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2019-06-12 20:31:30 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-06-27 23:22:43 +0300
commitee6efccdcb19807a141c5c2d93c3f6bfe8f8fc4c (patch)
tree6ef8746477861c33da307e7ed063f05ed48f2e77 /meta-ibm/meta-witherspoon/recipes-phosphor/power/power-supply-policy/power-supply-policy.yaml
parent9c525870b9bc81cb91455cd7b051fda83f686209 (diff)
downloadopenbmc-ee6efccdcb19807a141c5c2d93c3f6bfe8f8fc4c.tar.xz
swift: Add dbus monitor policy configurations
Swift has two power supplies, same as Witherspoon, therefore will use the same power supply policy configuration. Swift and Witherspoon will also share the event policy configuration for OCC throttling. The thermal policy configuration will be shared between Swift and Witherspoon, but may change for air cooled Swift to not also shutdown at 3 or more cores over 115C. The fan policy configurations will be different for Swift, therefore they will be separate. At this time, there are some areas unknown on how fan presence and functional states will be handled for both air and water cooled Swift machines, so these are configured to be the same. Tested: Built witherspoon phosphor-dbus-monitor resulting in no image change Built swift phosphor-dbus-monitor resulting in correct policies (From meta-ibm rev: fd06a2cbfd5f6e43aba4887ae1398984410d52cc) Change-Id: I1125f00ecd51c23aac2da4cd2a47432ac3bc2de7 Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-ibm/meta-witherspoon/recipes-phosphor/power/power-supply-policy/power-supply-policy.yaml')
-rw-r--r--meta-ibm/meta-witherspoon/recipes-phosphor/power/power-supply-policy/power-supply-policy.yaml215
1 files changed, 215 insertions, 0 deletions
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/power/power-supply-policy/power-supply-policy.yaml b/meta-ibm/meta-witherspoon/recipes-phosphor/power/power-supply-policy/power-supply-policy.yaml
new file mode 100644
index 000000000..e00e747b6
--- /dev/null
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/power/power-supply-policy/power-supply-policy.yaml
@@ -0,0 +1,215 @@
+# Machine power supply policy for PDM.
+#
+# Create an error if a power supply is removed while the system is powered on
+
+- name: power supply0
+ class: group
+ group: path
+ members:
+ - meta: POWER SUPPLY
+ path: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
+
+- name: power supply1
+ class: group
+ group: path
+ members:
+ - meta: POWER SUPPLY
+ path: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
+
+- name: power supplies
+ description: >
+ 'The machine has two power supplies to monitor.'
+ class: group
+ group: path
+ members:
+ - meta: POWER SUPPLY
+ path: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
+ - meta: POWER SUPPLY
+ path: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
+
+- name: chassis state
+ description: >
+ 'The machine has a single chassis to monitor.'
+ class: group
+ group: path
+ members:
+ - meta: CHASSISSTATE
+ path: /xyz/openbmc_project/state/chassis0
+
+- name: power supply present
+ description: >
+ 'Monitor the presence state of each power supply.'
+ class: group
+ group: property
+ type: boolean
+ members:
+ - interface: xyz.openbmc_project.Inventory.Item
+ meta: PRESENT
+ property: Present
+
+- name: chassis powered
+ description: >
+ 'Monitor the chassis power state.'
+ class: group
+ group: property
+ type: string
+ members:
+ - interface: xyz.openbmc_project.State.Chassis
+ meta: CHASSIS_STATE
+ property: CurrentPowerState
+
+- name: watch power supply present
+ description: >
+ 'Trigger logic on power supply presence state changes.'
+ class: watch
+ watch: property
+ paths: power supplies
+ properties: power supply present
+ callback: check power
+
+- name: watch chassis state
+ description: >
+ 'Trigger logic on chassis power state changes.'
+ class: watch
+ watch: property
+ paths: chassis state
+ properties: chassis powered
+ callback: check power
+
+- name: check power
+ description: >
+ 'If the chassis has power, check for power supplies.'
+ class: condition
+ condition: count
+ paths: chassis state
+ properties: chassis powered
+ callback: check power supplies
+ countop: '>'
+ countbound: 0
+ op: '=='
+ bound: xyz.openbmc_project.State.Chassis.PowerState.On
+
+- name: check power supplies
+ description: >
+ 'Create an error if a power supply is not present.'
+ class: callback
+ callback: group
+ members:
+ - check power supply0 presence
+ - check power supply1 presence
+
+- name: check power supply0 presence
+ description: >
+ 'If this condition passes power supply0 has been unplugged for more than
+ 5 seconds. Count present power supplies rather than non-present
+ power supplies since the latter would pass if the power supply has not
+ been created for some reason.
+
+ For a more detailed definition of unplugged, consult the documentation
+ of xyz.openbmc_project.Inventory.Item and/or the documentation
+ of the power supply inventory object implementation.'
+ class: condition
+ condition: count
+ paths: power supply0
+ properties: power supply present
+ defer: 5000000us
+ callback: notpresent power supply0 error
+ countop: '<'
+ countbound: 1
+ op: '=='
+ bound: true
+
+- name: check power supply1 presence
+ description: >
+ 'If this condition passes power supply1 has been unplugged for more than
+ 5 seconds.'
+ class: condition
+ condition: count
+ paths: power supply1
+ properties: power supply present
+ defer: 5000000us
+ callback: notpresent power supply1 error
+ countop: '<'
+ countbound: 1
+ op: '=='
+ bound: true
+
+- name: notpresent power supply0 error
+ class: callback
+ callback: elog
+ paths: power supply0
+ properties: power supply present
+ error: xyz::openbmc_project::Inventory::Error::NotPresent
+ metadata:
+ - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH
+ value: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
+ type: string
+
+- name: notpresent power supply1 error
+ class: callback
+ callback: elog
+ paths: power supply1
+ properties: power supply present
+ error: xyz::openbmc_project::Inventory::Error::NotPresent
+ metadata:
+ - name: xyz::openbmc_project::Inventory::NotPresent::CALLOUT_INVENTORY_PATH
+ value: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
+ type: string
+
+- name: resolve power supply0 errors if present
+ description: >
+ 'If power supply0 is present, call the resolve ps0 errors callback.'
+ class: condition
+ condition: count
+ paths: power supply0
+ properties: power supply present
+ callback: resolve power supply0 errors
+ countop: '>'
+ countbound: 0
+ op: '=='
+ bound: true
+
+- name: resolve power supply1 errors if present
+ description: >
+ 'If power supply1 is present, call the resolve ps1 errors callback.'
+ class: condition
+ condition: count
+ paths: power supply1
+ properties: power supply present
+ callback: resolve power supply1 errors
+ countop: '>'
+ countbound: 0
+ op: '=='
+ bound: true
+
+- name: resolve power supply0 errors
+ class: callback
+ callback: resolve callout
+ paths: power supply0
+ properties: power supply present
+ callout: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
+
+- name: resolve power supply1 errors
+ class: callback
+ callback: resolve callout
+ paths: power supply1
+ properties: power supply present
+ callout: /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
+
+- name: watch power supply0 present for resolving error logs
+ description: >
+ 'On supply present state changes, check if errors need to be resolved.'
+ class: watch
+ watch: property
+ paths: power supply0
+ properties: power supply present
+ callback: resolve power supply0 errors if present
+
+- name: watch power supply1 present for resolving error logs
+ description: >
+ 'On supply present state changes, check if errors need to be resolved.'
+ class: watch
+ watch: property
+ paths: power supply1
+ properties: power supply present
+ callback: resolve power supply1 errors if present