diff options
author | Deployment Bot (from Travis CI) <deploy@travis-ci.org> | 2021-05-13 12:18:40 +0000 |
---|---|---|
committer | Deployment Bot (from Travis CI) <deploy@travis-ci.org> | 2021-05-13 12:18:40 +0000 |
commit | ff7c0852427a5fa90b6423c31410a7a711a9e3ed (patch) | |
tree | d74a98751c28d87cd0114e9da3976d02603659dd /doc/opal-api/opal-read-write-tpo-dpo-103-104-105.html | |
download | skiboot-ff7c0852427a5fa90b6423c31410a7a711a9e3ed.zip skiboot-ff7c0852427a5fa90b6423c31410a7a711a9e3ed.tar.gz skiboot-ff7c0852427a5fa90b6423c31410a7a711a9e3ed.tar.bz2 |
Deploy open-power/skiboot to github.com/open-power/skiboot.git:gh-pages
Diffstat (limited to 'doc/opal-api/opal-read-write-tpo-dpo-103-104-105.html')
-rw-r--r-- | doc/opal-api/opal-read-write-tpo-dpo-103-104-105.html | 180 |
1 files changed, 180 insertions, 0 deletions
diff --git a/doc/opal-api/opal-read-write-tpo-dpo-103-104-105.html b/doc/opal-api/opal-read-write-tpo-dpo-103-104-105.html new file mode 100644 index 0000000..0959e8d --- /dev/null +++ b/doc/opal-api/opal-read-write-tpo-dpo-103-104-105.html @@ -0,0 +1,180 @@ + +<!DOCTYPE html> + +<html> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>OPAL Timed Power On and Delayed Power Off — skiboot v6.7-45-g4b9ca02 + documentation</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="../_static/classic.css" /> + + <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> + <script src="../_static/jquery.js"></script> + <script src="../_static/underscore.js"></script> + <script src="../_static/doctools.js"></script> + + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="OPAL_REINIT_CPUS" href="opal-reinit-cpus-70.html" /> + <link rel="prev" title="OPAL_QUIESCE" href="opal-quiesce-158.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-reinit-cpus-70.html" title="OPAL_REINIT_CPUS" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="opal-quiesce-158.html" title="OPAL_QUIESCE" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">skiboot v6.7-45-g4b9ca02 + 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 Timed Power On and Delayed Power Off</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <div class="section" id="opal-timed-power-on-and-delayed-power-off"> +<h1>OPAL Timed Power On and Delayed Power Off<a class="headerlink" href="#opal-timed-power-on-and-delayed-power-off" title="Permalink to this headline">¶</a></h1> +<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_WRITE_TPO 103</span> +<span class="cp">#define OPAL_READ_TPO 104</span> +<span class="cp">#define OPAL_GET_DPO_STATUS 105</span> +</pre></div> +</div> +<p>TPO is a Timed Power On facility, and DPO is Delayed Power Off.</p> +<p>It is an OPTIONAL part of the OPAL spec.</p> +<p>If a platform supports Timed Power On (TPO), the RTC node in the device tree +(itself under the “ibm,opal” node will have the has-tpo property:</p> +<div class="highlight-dts notranslate"><div class="highlight"><pre><span></span><span class="nc">rtc</span> <span class="p">{</span> + <span class="nf">compatible</span> <span class="o">=</span> <span class="s">"ibm,opal-rtc"</span><span class="p">;</span> + <span class="nf">has-tpo</span><span class="p">;</span> +<span class="p">};</span> +</pre></div> +</div> +<p>If the “has-tpo” proprety is <em>NOT</em> present then OPAL does <em>NOT</em> support TPO.</p> +<div class="section" id="opal-read-tpo"> +<span id="id1"></span><h2>OPAL_READ_TPO<a class="headerlink" href="#opal-read-tpo" title="Permalink to this headline">¶</a></h2> +<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_READ_TPO 104</span> + +<span class="k">static</span> <span class="kt">int64_t</span> <span class="nf">opal_read_tpo</span><span class="p">(</span><span class="kt">uint64_t</span> <span class="n">async_token</span><span class="p">,</span> <span class="kt">uint32_t</span> <span class="o">*</span><span class="n">y_m_d</span><span class="p">,</span> <span class="kt">uint32_t</span> <span class="o">*</span><span class="n">hr_min</span><span class="p">);</span> +</pre></div> +</div> +</div> +<div class="section" id="opal-write-tpo"> +<span id="id2"></span><h2>OPAL_WRITE_TPO<a class="headerlink" href="#opal-write-tpo" title="Permalink to this headline">¶</a></h2> +<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_WRITE_TPO 103</span> + +<span class="kt">int64_t</span> <span class="nf">fsp_opal_tpo_write</span><span class="p">(</span><span class="kt">uint64_t</span> <span class="n">async_token</span><span class="p">,</span> <span class="kt">uint32_t</span> <span class="n">y_m_d</span><span class="p">,</span> <span class="kt">uint32_t</span> <span class="n">hr_min</span><span class="p">);</span> +</pre></div> +</div> +</div> +<div class="section" id="opal-get-dpo-status"> +<span id="id3"></span><h2>OPAL_GET_DPO_STATUS<a class="headerlink" href="#opal-get-dpo-status" title="Permalink to this headline">¶</a></h2> +<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_GET_DPO_STATUS 105</span> + +<span class="k">static</span> <span class="kt">int64_t</span> <span class="nf">opal_get_dpo_status</span><span class="p">(</span><span class="kt">int64_t</span> <span class="o">*</span><span class="n">dpo_timeout</span><span class="p">);</span> +</pre></div> +</div> +<p>A <a class="reference internal" href="opal-messages.html#opal-msg-dpo"><span class="std std-ref">OPAL_MSG_DPO</span></a> message may be sent to indicate that there will shortly +be a forced system shutdown. In this case, an OS can call +<a class="reference internal" href="#opal-get-dpo-status"><span class="std std-ref">OPAL_GET_DPO_STATUS</span></a> to find out how many seconds it has before power +is cut to the system.</p> +<p>This call could be present on systems where the service processor is integrated +with a UPS or similar.</p> +<p>Returns zero if Delayed Power Off is not active, positive value indicating +number of seconds remaining for a forced system shutdown. This will enable +the host to schedule for shutdown voluntarily before timeout occurs.</p> +<div class="section" id="returns"> +<h3>Returns<a class="headerlink" href="#returns" title="Permalink to this headline">¶</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><code class="docutils literal notranslate"><span class="pre">dpo_timeout</span></code> is set to the number of seconds remaining before power is +cut.</p> +</dd> +<dt><a class="reference internal" href="return-codes.html#opal-wrong-state"><span class="std std-ref">OPAL_WRONG_STATE</span></a></dt><dd><p>A Delayed Power Off is not pending, <code class="docutils literal notranslate"><span class="pre">dpo_timeout</span></code> is set to zero.</p> +</dd> +</dl> +</div> +</div> +</div> + + + <div class="clearer"></div> + </div> + </div> + </div> + <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">OPAL Timed Power On and Delayed Power Off</a><ul> +<li><a class="reference internal" href="#opal-read-tpo">OPAL_READ_TPO</a></li> +<li><a class="reference internal" href="#opal-write-tpo">OPAL_WRITE_TPO</a></li> +<li><a class="reference internal" href="#opal-get-dpo-status">OPAL_GET_DPO_STATUS</a><ul> +<li><a class="reference internal" href="#returns">Returns</a></li> +</ul> +</li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="opal-quiesce-158.html" + title="previous chapter">OPAL_QUIESCE</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="opal-reinit-cpus-70.html" + title="next chapter">OPAL_REINIT_CPUS</a></p> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/opal-api/opal-read-write-tpo-dpo-103-104-105.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" /> + <input type="submit" value="Go" /> + </form> + </div> +</div> +<script>$('#searchbox').show(0);</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-reinit-cpus-70.html" title="OPAL_REINIT_CPUS" + >next</a> |</li> + <li class="right" > + <a href="opal-quiesce-158.html" title="OPAL_QUIESCE" + >previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">skiboot v6.7-45-g4b9ca02 + 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 Timed Power On and Delayed Power Off</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> 4.0.1. + </div> + </body> +</html>
\ No newline at end of file |