| <!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>Starting and stopping secondary CPUs — 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_SYNC_HOST_REBOOT" href="opal-sync-host-reboot-87.html" /> |
| <link rel="prev" title="OPAL_SLW_SET_REG" href="opal-slw-set-reg-100.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-sync-host-reboot-87.html" title="OPAL_SYNC_HOST_REBOOT" |
| accesskey="N">next</a> |</li> |
| <li class="right" > |
| <a href="opal-slw-set-reg-100.html" title="OPAL_SLW_SET_REG" |
| 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="">Starting and stopping secondary CPUs</a></li> |
| </ul> |
| </div> |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <section id="starting-and-stopping-secondary-cpus"> |
| <h1>Starting and stopping secondary CPUs<a class="headerlink" href="#starting-and-stopping-secondary-cpus" title="Link to this heading">¶</a></h1> |
| <p>In this context, each thread is a CPU. That is, you start and stop threads of |
| CPUs.</p> |
| <section id="opal-start-cpu"> |
| <span id="id1"></span><h2>OPAL_START_CPU<a class="headerlink" href="#opal-start-cpu" title="Link to this heading">¶</a></h2> |
| <div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_START_CPU 41</span> |
| |
| <span class="kt">int64_t</span><span class="w"> </span><span class="nf">opal_start_cpu_thread</span><span class="p">(</span><span class="kt">uint64_t</span><span class="w"> </span><span class="n">server_no</span><span class="p">,</span><span class="w"> </span><span class="kt">uint64_t</span><span class="w"> </span><span class="n">start_address</span><span class="p">);</span> |
| </pre></div> |
| </div> |
| <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>The CPU was instructed to start executing instructions from the specified |
| <cite>start_address</cite>. |
| This is an <em>asynchronous</em> operation, so it may take a short period of |
| time before the CPU actually starts at that address.</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 CPU.</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>If the CPU thread is not in OPAL, or is being re-initialized through <a class="reference internal" href="opal-reinit-cpus-70.html#opal-reinit-cpus"><span class="std std-ref">OPAL_REINIT_CPUS</span></a></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>Something else went horribly wrong.</p> |
| </dd> |
| </dl> |
| </section> |
| </section> |
| <section id="opal-return-cpu"> |
| <span id="id2"></span><h2>OPAL_RETURN_CPU<a class="headerlink" href="#opal-return-cpu" title="Link to this heading">¶</a></h2> |
| <div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_RETURN_CPU 69</span> |
| |
| <span class="kt">int64_t</span><span class="w"> </span><span class="nf">opal_return_cpu</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> |
| </pre></div> |
| </div> |
| <p>When OPAL first starts the host, all secondary CPUs are spinning in OPAL. |
| To start them, one must call OPAL_START_CPU (you may want to OPAL_REINIT_CPUS |
| to set the HILE bit first).</p> |
| <p>In cases where you need OPAL to do something for you across all CPUs, such |
| as OPAL_REINIT_CPUS, (on some platforms) a firmware update or get the machine |
| back into a similar state as to when the host OS was started (e.g. for kexec) |
| you may also need to return control of the CPU to OPAL.</p> |
| <section id="id3"> |
| <h3>Returns<a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3> |
| <p>This call does <strong>not return</strong>. You need to OPAL_START_CPU.</p> |
| </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="#">Starting and stopping secondary CPUs</a><ul> |
| <li><a class="reference internal" href="#opal-start-cpu">OPAL_START_CPU</a><ul> |
| <li><a class="reference internal" href="#returns">Returns</a></li> |
| </ul> |
| </li> |
| <li><a class="reference internal" href="#opal-return-cpu">OPAL_RETURN_CPU</a><ul> |
| <li><a class="reference internal" href="#id3">Returns</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| |
| </div> |
| <div> |
| <h4>Previous topic</h4> |
| <p class="topless"><a href="opal-slw-set-reg-100.html" |
| title="previous chapter">OPAL_SLW_SET_REG</a></p> |
| </div> |
| <div> |
| <h4>Next topic</h4> |
| <p class="topless"><a href="opal-sync-host-reboot-87.html" |
| title="next chapter">OPAL_SYNC_HOST_REBOOT</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-start-return-cpu-41-69.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-sync-host-reboot-87.html" title="OPAL_SYNC_HOST_REBOOT" |
| >next</a> |</li> |
| <li class="right" > |
| <a href="opal-slw-set-reg-100.html" title="OPAL_SLW_SET_REG" |
| >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="">Starting and stopping secondary CPUs</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> |