| <!DOCTYPE html> |
| |
| <html lang="en" data-content_root="../"> |
| <head> |
| <meta charset="utf-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" /> |
| |
| <title>OPAL Power Caps — skiboot d365a01 |
| documentation</title> |
| <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" /> |
| <link rel="stylesheet" type="text/css" href="../_static/classic.css?v=514cf933" /> |
| |
| <script src="../_static/documentation_options.js?v=e1fecbe9"></script> |
| <script src="../_static/doctools.js?v=888ff710"></script> |
| <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> |
| |
| <link rel="index" title="Index" href="../genindex.html" /> |
| <link rel="search" title="Search" href="../search.html" /> |
| <link rel="next" title="OPAL_PRD_MSG" href="opal-prd-msg-113.html" /> |
| <link rel="prev" title="OPAL Power Shift Ratio" href="opal-power-shift-ratio.html" /> |
| </head><body> |
| <div class="related" role="navigation" aria-label="related navigation"> |
| <h3>Navigation</h3> |
| <ul> |
| <li class="right" style="margin-right: 10px"> |
| <a href="../genindex.html" title="General Index" |
| accesskey="I">index</a></li> |
| <li class="right" > |
| <a href="opal-prd-msg-113.html" title="OPAL_PRD_MSG" |
| accesskey="N">next</a> |</li> |
| <li class="right" > |
| <a href="opal-power-shift-ratio.html" title="OPAL Power Shift Ratio" |
| accesskey="P">previous</a> |</li> |
| <li class="nav-item nav-item-0"><a href="../index.html">skiboot d365a01 |
| documentation</a> »</li> |
| <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">OPAL API Documentation</a> »</li> |
| <li class="nav-item nav-item-this"><a href="">OPAL Power Caps</a></li> |
| </ul> |
| </div> |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <section id="opal-power-caps"> |
| <span id="opal-powercap"></span><h1>OPAL Power Caps<a class="headerlink" href="#opal-power-caps" title="Link to this heading">¶</a></h1> |
| <p>Each entity that can be power capped is described in the device tree, |
| see <a class="reference internal" href="../device-tree/ibm%2Copal/power-mgt/powercap.html#device-tree-ibm-opal-power-mgt-powercap"><span class="std std-ref">power-mgt/powercap</span></a>. The values for each |
| power cap aren’t in the device tree, but rather fetched using the |
| <a class="reference internal" href="#opal-get-powercap"><span class="std std-ref">OPAL_GET_POWERCAP</span></a> OPAL call. This is because there may be other |
| entities such as a service processor that can change the nature of the |
| power cap asynchronously to OPAL.</p> |
| <section id="opal-get-powercap"> |
| <span id="id1"></span><h2>OPAL_GET_POWERCAP<a class="headerlink" href="#opal-get-powercap" title="Link to this heading">¶</a></h2> |
| <p>The OPAL_GET_POWERCAP call retreives current information on the power |
| cap.</p> |
| <p>For each entity that can be power capped, the device tree |
| binding indicates what handle should be passed for each of the power cap |
| properties (minimum possible, maximum possible, current powercap).</p> |
| <p>The current power cap must be between the minimium possible and maximum |
| possible power cap. The minimum and maximum values are dynamic to allow |
| for them possibly being changed by other factors or entities |
| (e.g. service processor).</p> |
| <p>The call can be asynchronus, where the token parameter is used to wait |
| for the completion.</p> |
| <section id="parameters"> |
| <h3>Parameters<a class="headerlink" href="#parameters" title="Link to this heading">¶</a></h3> |
| <table class="docutils align-default"> |
| <thead> |
| <tr class="row-odd"><th class="head"></th> |
| <th class="head"></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="row-even"><td><p>u32</p></td> |
| <td><p>handle</p></td> |
| </tr> |
| <tr class="row-odd"><td><p>int</p></td> |
| <td><p>token</p></td> |
| </tr> |
| <tr class="row-even"><td><p>u32</p></td> |
| <td><p>*pcap</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </section> |
| <section id="returns"> |
| <h3>Returns<a class="headerlink" href="#returns" title="Link to this heading">¶</a></h3> |
| <dl class="simple"> |
| <dt><a class="reference internal" href="return-codes.html#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a></dt><dd><p>Success</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-parameter"><span class="std std-ref">OPAL_PARAMETER</span></a></dt><dd><p>Invalid pcap pointer</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-unsupported"><span class="std std-ref">OPAL_UNSUPPORTED</span></a></dt><dd><p>No support for reading powercap sensor</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-hardware"><span class="std std-ref">OPAL_HARDWARE</span></a></dt><dd><p>Unable to procced due to the current hardware state</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-async-completion"><span class="std std-ref">OPAL_ASYNC_COMPLETION</span></a></dt><dd><p>Request was sent and an async completion message will be sent with |
| token and status of the request.</p> |
| </dd> |
| </dl> |
| </section> |
| </section> |
| <section id="opal-set-powercap"> |
| <span id="id2"></span><h2>OPAL_SET_POWERCAP<a class="headerlink" href="#opal-set-powercap" title="Link to this heading">¶</a></h2> |
| <p>The OPAL_SET_POWERCAP call sets a power cap.</p> |
| <p>For each entity that can be power capped, the device tree |
| binding indicates what handle should be passed for each of the power cap |
| properties (minimum possible, maximum possible, current powercap).</p> |
| <p>The current power cap must be between the minimium possible and maximum |
| possible power cap.</p> |
| <p>You cannot currently set the minimum or maximum power cap, and thus |
| OPAL_PERMISSION will be returned if it is attempted to set. In the |
| future, this may change - but for now, the correct behaviour for an |
| Operating System is to not attempt to set them.</p> |
| <section id="id3"> |
| <h3>Parameters<a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3> |
| <dl class="simple"> |
| <dt>::</dt><dd><p>u32 handle |
| int token |
| u32 pcap</p> |
| </dd> |
| </dl> |
| </section> |
| <section id="id4"> |
| <h3>Returns<a class="headerlink" href="#id4" title="Link to this heading">¶</a></h3> |
| <dl class="simple"> |
| <dt><a class="reference internal" href="return-codes.html#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a></dt><dd><p>Success</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-parameter"><span class="std std-ref">OPAL_PARAMETER</span></a></dt><dd><p>Invalid powercap requested beyond powercap limits</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-unsupported"><span class="std std-ref">OPAL_UNSUPPORTED</span></a></dt><dd><p>No support for changing the powercap</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-permission"><span class="std std-ref">OPAL_PERMISSION</span></a></dt><dd><p>Hardware cannot take the request</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-async-completion"><span class="std std-ref">OPAL_ASYNC_COMPLETION</span></a></dt><dd><p>Request was sent and an async completion message will be sent with |
| token and status of the request.</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-hardware"><span class="std std-ref">OPAL_HARDWARE</span></a></dt><dd><p>Unable to procced due to the current hardware state</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-busy"><span class="std std-ref">OPAL_BUSY</span></a></dt><dd><p>Previous request in progress</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-internal-error"><span class="std std-ref">OPAL_INTERNAL_ERROR</span></a></dt><dd><p>Error in request response</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-timeout"><span class="std std-ref">OPAL_TIMEOUT</span></a></dt><dd><p>Timeout in request completion</p> |
| </dd> |
| </dl> |
| </section> |
| </section> |
| </section> |
| |
| |
| <div class="clearer"></div> |
| </div> |
| </div> |
| </div> |
| <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
| <div class="sphinxsidebarwrapper"> |
| <div> |
| <h3><a href="../index.html">Table of Contents</a></h3> |
| <ul> |
| <li><a class="reference internal" href="#">OPAL Power Caps</a><ul> |
| <li><a class="reference internal" href="#opal-get-powercap">OPAL_GET_POWERCAP</a><ul> |
| <li><a class="reference internal" href="#parameters">Parameters</a></li> |
| <li><a class="reference internal" href="#returns">Returns</a></li> |
| </ul> |
| </li> |
| <li><a class="reference internal" href="#opal-set-powercap">OPAL_SET_POWERCAP</a><ul> |
| <li><a class="reference internal" href="#id3">Parameters</a></li> |
| <li><a class="reference internal" href="#id4">Returns</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| |
| </div> |
| <div> |
| <h4>Previous topic</h4> |
| <p class="topless"><a href="opal-power-shift-ratio.html" |
| title="previous chapter">OPAL Power Shift Ratio</a></p> |
| </div> |
| <div> |
| <h4>Next topic</h4> |
| <p class="topless"><a href="opal-prd-msg-113.html" |
| title="next chapter">OPAL_PRD_MSG</a></p> |
| </div> |
| <div role="note" aria-label="source link"> |
| <h3>This Page</h3> |
| <ul class="this-page-menu"> |
| <li><a href="../_sources/opal-api/opal-powercap.rst.txt" |
| rel="nofollow">Show Source</a></li> |
| </ul> |
| </div> |
| <div id="searchbox" style="display: none" role="search"> |
| <h3 id="searchlabel">Quick search</h3> |
| <div class="searchformwrapper"> |
| <form class="search" action="../search.html" method="get"> |
| <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> |
| <input type="submit" value="Go" /> |
| </form> |
| </div> |
| </div> |
| <script>document.getElementById('searchbox').style.display = "block"</script> |
| </div> |
| </div> |
| <div class="clearer"></div> |
| </div> |
| <div class="related" role="navigation" aria-label="related navigation"> |
| <h3>Navigation</h3> |
| <ul> |
| <li class="right" style="margin-right: 10px"> |
| <a href="../genindex.html" title="General Index" |
| >index</a></li> |
| <li class="right" > |
| <a href="opal-prd-msg-113.html" title="OPAL_PRD_MSG" |
| >next</a> |</li> |
| <li class="right" > |
| <a href="opal-power-shift-ratio.html" title="OPAL Power Shift Ratio" |
| >previous</a> |</li> |
| <li class="nav-item nav-item-0"><a href="../index.html">skiboot d365a01 |
| documentation</a> »</li> |
| <li class="nav-item nav-item-1"><a href="index.html" >OPAL API Documentation</a> »</li> |
| <li class="nav-item nav-item-this"><a href="">OPAL Power Caps</a></li> |
| </ul> |
| </div> |
| <div class="footer" role="contentinfo"> |
| © Copyright 2016-2017, IBM, others. |
| Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6. |
| </div> |
| </body> |
| </html> |