blob: 1333276dd9404ca4076e2235fbf78699e29d5c22 [file] [log] [blame]
<!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_PCI_PHB_MMIO_ENABLE &#8212; 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_PCI_POLL" href="opal-pci-poll-62.html" />
<link rel="prev" title="OPAL_PCI_NEXT_ERROR" href="opal-pci-next-error-60.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-pci-poll-62.html" title="OPAL_PCI_POLL"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="opal-pci-next-error-60.html" title="OPAL_PCI_NEXT_ERROR"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">skiboot d365a01
documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">OPAL API Documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">OPAL_PCI_PHB_MMIO_ENABLE</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="opal-pci-phb-mmio-enable">
<span id="id1"></span><h1>OPAL_PCI_PHB_MMIO_ENABLE<a class="headerlink" href="#opal-pci-phb-mmio-enable" title="Link to this heading"></a></h1>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_PCI_PHB_MMIO_ENABLE 27</span>
<span class="kt">int64_t</span><span class="w"> </span><span class="nf">opal_pci_phb_mmio_enable</span><span class="p">(</span><span class="kt">uint64_t</span><span class="w"> </span><span class="n">phb_id</span><span class="p">,</span><span class="w"> </span><span class="kt">uint16_t</span><span class="w"> </span><span class="n">window_type</span><span class="p">,</span>
<span class="w"> </span><span class="kt">uint16_t</span><span class="w"> </span><span class="n">window_num</span><span class="p">,</span><span class="w"> </span><span class="kt">uint16_t</span><span class="w"> </span><span class="n">enable</span><span class="p">);</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Appears to be POWER7 p7ioc specific. Likely to be removed soon.</p>
</div>
<p><strong>WARNING:</strong> following documentation is from old sources, and is possibly
not representative of OPALv3 as implemented by skiboot. This should be
used as a starting point for full documentation.</p>
<p>The host calls this function to enable or disable PHB decode of the PCI IO
and Memory address spaces below that PHB. Window_num selects an mmio window
within that address space. Enable set to ‘1’ enables the PHB to decode and
forward system real addresses to PCI memory, while enable set to ‘0’ disables
PHB decode and forwarding for the address range defined in a particular MMIO
window.</p>
<p>Not all PHB hardware may support disabling some or all MMIO windows. OPAL
returns <a class="reference internal" href="return-codes.html#opal-unsupported"><span class="std std-ref">OPAL_UNSUPPORTED</span></a> if called to disable an MMIO window for which
hardware does not support disable. KVM may call this function for all MMIO
windows and ignore the opal_unsuppsorted return code so long as KVM has
disabled MMIO to all downstream PCI devices and assured that KVM and OS guest
partitions cannot issue CI loads/stores to these address spaces from the
processor (e.g.,via HPT).</p>
<p>OPAL returns <a class="reference internal" href="return-codes.html#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a> for calls to OPAL to enable them for PHBs that do
not support disable.</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">phb_id</span></code></dt><dd><p>is the value from the PHB node ibm,opal-phbid property.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">window_type</span></code></dt><dd><p>specifies 32-bit or 64-bit PCI memory</p>
<p>‘0’ selects PCI IO Space</p>
<p>‘1’ selects 32-bit PCI memory space</p>
<p>‘2’ selects 64 bit PCI memory space</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">window_num</span></code></dt><dd><p>is the MMIO window number within the specified PCI memory space</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">enable</span></code></dt><dd><p>specifies to enable or disable this MMIO window.</p>
</dd>
</dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="opal-pci-next-error-60.html"
title="previous chapter">OPAL_PCI_NEXT_ERROR</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="opal-pci-poll-62.html"
title="next chapter">OPAL_PCI_POLL</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-pci-phb-mmio-enable-27.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-pci-poll-62.html" title="OPAL_PCI_POLL"
>next</a> |</li>
<li class="right" >
<a href="opal-pci-next-error-60.html" title="OPAL_PCI_NEXT_ERROR"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">skiboot d365a01
documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" >OPAL API Documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">OPAL_PCI_PHB_MMIO_ENABLE</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016-2017, IBM, others.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
</div>
</body>
</html>