| <!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_GET_MSG — 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_GET_MSI_32 and OPAL_GET_MSI_64" href="opal-get-msi-39-40.html" /> |
| <link rel="prev" title="OPAL_GET_EPOW_STATUS" href="opal-get-epow-status-56.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-get-msi-39-40.html" title="OPAL_GET_MSI_32 and OPAL_GET_MSI_64" |
| accesskey="N">next</a> |</li> |
| <li class="right" > |
| <a href="opal-get-epow-status-56.html" title="OPAL_GET_EPOW_STATUS" |
| 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_GET_MSG</a></li> |
| </ul> |
| </div> |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <section id="opal-get-msg"> |
| <span id="id1"></span><h1>OPAL_GET_MSG<a class="headerlink" href="#opal-get-msg" title="Link to this heading">¶</a></h1> |
| <div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_GET_MSG 85</span> |
| |
| <span class="kt">int64_t</span><span class="w"> </span><span class="nf">opal_get_msg</span><span class="p">(</span><span class="kt">uint64_t</span><span class="w"> </span><span class="o">*</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="kt">uint64_t</span><span class="w"> </span><span class="n">size</span><span class="p">);</span> |
| </pre></div> |
| </div> |
| <p><a class="reference internal" href="#opal-get-msg"><span class="std std-ref">OPAL_GET_MSG</span></a> will get the next pending OPAL Message (see <a class="reference internal" href="opal-messages.html#opal-messages"><span class="std std-ref">OPAL_MESSAGE</span></a>).</p> |
| <p>The maximum size of an opal message is specified in the device tree passed |
| to the host OS:</p> |
| <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ibm</span><span class="p">,</span><span class="n">opal</span> <span class="p">{</span> |
| <span class="n">opal</span><span class="o">-</span><span class="n">msg</span><span class="o">-</span><span class="n">size</span> <span class="o">=</span> <span class="o"><</span><span class="mh">0x48</span><span class="o">></span><span class="p">;</span> |
| <span class="p">}</span> |
| </pre></div> |
| </div> |
| <p>It is ALWAYS at least 72 bytes. In the future, OPAL may have messages larger |
| than 72 bytes. Naturally, a HOST OS will only be able to interpret these |
| if it correctly uses opal-msg-size. Any OPAL message > 72 bytes, a host OS |
| may safely ignore.</p> |
| <p>A host OS <em>SHOULD</em> always supply a buffer to OPAL_GET_MSG of either 72 |
| bytes or opal-msg-size. It MUST NOT supply a buffer of < 72 bytes.</p> |
| <section id="return-values"> |
| <h2>Return values<a class="headerlink" href="#return-values" title="Link to this heading">¶</a></h2> |
| <dl class="simple"> |
| <dt><a class="reference internal" href="return-codes.html#opal-resource"><span class="std std-ref">OPAL_RESOURCE</span></a></dt><dd><p>no available message.</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>buffer is NULL or size is < 72 bytes. |
| If buffer size < 72 bytes, the message will NOT be discarded by OPAL.</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-partial"><span class="std std-ref">OPAL_PARTIAL</span></a></dt><dd><p>If pending opal message is greater than supplied buffer. |
| In this case the message is <em>DISCARDED</em> by OPAL. |
| This is to keep compatibility with host Operating Systems |
| with a hard coded opal-msg-size of 72 bytes. |
| <strong>NOT CURRENTLY IMPLEMENTED</strong>. Specified so that host OS can |
| prepare for the possible future with either a sensible |
| error message or by gracefully ignoring such OPAL messages.</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a></dt><dd><p>message successfully copied to buffer.</p> |
| </dd> |
| </dl> |
| </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_GET_MSG</a><ul> |
| <li><a class="reference internal" href="#return-values">Return values</a></li> |
| </ul> |
| </li> |
| </ul> |
| |
| </div> |
| <div> |
| <h4>Previous topic</h4> |
| <p class="topless"><a href="opal-get-epow-status-56.html" |
| title="previous chapter">OPAL_GET_EPOW_STATUS</a></p> |
| </div> |
| <div> |
| <h4>Next topic</h4> |
| <p class="topless"><a href="opal-get-msi-39-40.html" |
| title="next chapter">OPAL_GET_MSI_32 and OPAL_GET_MSI_64</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-get-msg-85.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-get-msi-39-40.html" title="OPAL_GET_MSI_32 and OPAL_GET_MSI_64" |
| >next</a> |</li> |
| <li class="right" > |
| <a href="opal-get-epow-status-56.html" title="OPAL_GET_EPOW_STATUS" |
| >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_GET_MSG</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> |