| <!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_MAP_PE_DMA_WINDOW_REAL — 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_MAP_PE_MMIO_WINDOW" href="opal-pci-map-pe-mmio-window-29.html" /> |
| <link rel="prev" title="OPAL_PCI_MAP_PE_DMA_WINDOW" href="opal-pci-map-pe-dma-window-44.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-map-pe-mmio-window-29.html" title="OPAL_PCI_MAP_PE_MMIO_WINDOW" |
| accesskey="N">next</a> |</li> |
| <li class="right" > |
| <a href="opal-pci-map-pe-dma-window-44.html" title="OPAL_PCI_MAP_PE_DMA_WINDOW" |
| 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_PCI_MAP_PE_DMA_WINDOW_REAL</a></li> |
| </ul> |
| </div> |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <section id="opal-pci-map-pe-dma-window-real"> |
| <span id="id1"></span><h1>OPAL_PCI_MAP_PE_DMA_WINDOW_REAL<a class="headerlink" href="#opal-pci-map-pe-dma-window-real" title="Link to this heading">¶</a></h1> |
| <div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define OPAL_PCI_MAP_PE_DMA_WINDOW_REAL 45</span> |
| |
| <span class="kt">int64_t</span><span class="w"> </span><span class="nf">opal_pci_map_pe_dma_window_real</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">uint64_t</span><span class="w"> </span><span class="n">pe_number</span><span class="p">,</span> |
| <span class="w"> </span><span class="kt">uint16_t</span><span class="w"> </span><span class="n">window_id</span><span class="p">,</span> |
| <span class="w"> </span><span class="kt">uint64_t</span><span class="w"> </span><span class="n">pci_start_addr</span><span class="p">,</span> |
| <span class="w"> </span><span class="kt">uint64_t</span><span class="w"> </span><span class="n">pci_mem_size</span><span class="p">);</span> |
| </pre></div> |
| </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 initialize the specified DMA window for |
| untranslated DMA addresses. This allows a PE to DMA directly to system memory |
| without TCE translation. The DMA window PCI memory address is equal to the |
| system memory real address. The PHB passes PCI address bits 04:63 directly to |
| system real address bits 04:63 when PCI address bits 04:39 are within the |
| region specified by mem_addr t0 mem_addr + window_size.</p> |
| <p>The addresses must be 16MB aligned and a multiple of 16MB in size.</p> |
| <dl class="simple"> |
| <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">dma_window_number</span></code></dt><dd><p>specifies the DMA window</p> |
| </dd> |
| </dl> |
| <p>For ibm,opal-ioda PHBs the dma_window_number is an index from 0 to the PHB |
| total number of windows minus 1. For ibm,opal-ioda2 PHBs the DMA window_number |
| is an index from 0 to n-1, where n is the number of windows per window set, |
| within the window set associated with the specified PE number.</p> |
| <dl class="simple"> |
| <dt><code class="docutils literal notranslate"><span class="pre">pe_number</span></code></dt><dd><p>is the index of the PE that is authorized to DMA to this window |
| address space in PCI memory,</p> |
| </dd> |
| <dt><code class="docutils literal notranslate"><span class="pre">mem_addr</span></code></dt><dd><p>is the starting 64-bit system real address mapped directly to the |
| starting address in PCI memory. Addresses below 4GB are zero in bits above |
| bit 32. This value must be aligned on a 16MB boundary; OPAL returns |
| OPAL_PARAMETER for any value that is not a multiple of 16MB.</p> |
| </dd> |
| <dt><code class="docutils literal notranslate"><span class="pre">window_size</span></code></dt><dd><p>is the size, in bytes, of the address range defined by this |
| window. This value must be a multiple of 16MB; OPAL returns <a class="reference internal" href="return-codes.html#opal-parameter"><span class="std std-ref">OPAL_PARAMETER</span></a> |
| for any value that is not a multiple of 16MB. A value of ‘0’ indicates to |
| disable this DMA 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-map-pe-dma-window-44.html" |
| title="previous chapter">OPAL_PCI_MAP_PE_DMA_WINDOW</a></p> |
| </div> |
| <div> |
| <h4>Next topic</h4> |
| <p class="topless"><a href="opal-pci-map-pe-mmio-window-29.html" |
| title="next chapter">OPAL_PCI_MAP_PE_MMIO_WINDOW</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-map-pe-dma-window-real-45.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-map-pe-mmio-window-29.html" title="OPAL_PCI_MAP_PE_MMIO_WINDOW" |
| >next</a> |</li> |
| <li class="right" > |
| <a href="opal-pci-map-pe-dma-window-44.html" title="OPAL_PCI_MAP_PE_DMA_WINDOW" |
| >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_PCI_MAP_PE_DMA_WINDOW_REAL</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> |