Factor PS derating into power cap limit validation

When the BMC sends a system power cap to the host, the host
validates it is in a certain range or it will reject it. So,
the BMC also checks the range before sending it at all.

This range comes out of the MRW (machine readable workbook)
XML, and is stored as output power.  The user, however,
inputs the power cap value as input power, and so the range
the BMC code checks it against must also be in input power.

To support this, the script that pulls the power cap min
and max values out of the MRW for use in settings validation
will now convert those output power values into input power
by applying the power supply derating factor.

Resolves openbmc/openbmc#2944

Tested: Check that the power cap range that the settings manager
        uses is now the input power versions.

Change-Id: Id5c5851d081ad706fda73054b49e67a93d57f76e
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
1 file changed
tree: f8ec2ded20767c707f77c751bb88e764dfcfd227
  1. classes/
  2. common/
  3. conf/
  4. COPYING.apache-2.0
  5. COPYING.MIT
  6. LICENSE
  7. README.md
README.md

OpenBMC

meta-phosphor is the OpenBMC layer. This layer should be included for all OpenBMC systems. The OpenBMC layer contains content which is shared between all OpenBMC systems.