<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014069#M232012</link>
    <description>&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2024 03:56:51 GMT</pubDate>
    <dc:creator>pROF23</dc:creator>
    <dc:date>2024-12-16T03:56:51Z</dc:date>
    <item>
      <title>How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/308574#M39933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sharing the information that should be documented in the RM but was not and it was very annoying to get thru the issues to use i.MX6 in EP mode. We managed to use the chip to support inbound transactions, outbound transactions and MSI generation.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To generate MSI from i.MX6 in EP mode to the RC you need to do:&lt;/P&gt;&lt;P&gt;1) let the Linux on RC enumerate all PCIe endpoints&lt;/P&gt;&lt;P&gt;2) on RC Linux load the driver for EP that initializes all required interrupt settings for RC and EP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pci_enable_device(dev);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pci_set_master(dev);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pci_enable_msi(dev);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .... and all the usuall PCI stuff. Attached example of very ugly driver we used to test the MSI.&lt;/P&gt;&lt;P&gt;3) manually modify settings on RC:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;cd /unit_tests/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;./memtool -32 0x1ffc828=0xFFFFFFFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;./memtool -32 0x1ffc82c=0x0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This unmasks all MSI interrupt vectors. It is not nice, but you can check which one should really be unmasked. It looks Linux by default enables wrong vectors.&lt;/P&gt;&lt;P&gt;4) on the EP issue interrupt by writing 1 to the address assigned by RC for the MSI (you can get this address in 0x1FFC054&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;./memtool 0x1ff8000=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This generates MSI to RC:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5) check interrupt counters on RC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cat /proc/interrupts | grep MSI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 497:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp; PCIe-MSI&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt; Matevz&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336595"&gt;imx6-as-pci-ep.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 09:15:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/308574#M39933</guid>
      <dc:creator>matevzlangus</dc:creator>
      <dc:date>2014-04-02T09:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014065#M232009</link>
      <description>&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:48:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014065#M232009</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014067#M232010</link>
      <description>&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:55:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014067#M232010</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014068#M232011</link>
      <description>&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:56:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014068#M232011</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014069#M232012</link>
      <description>&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:56:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014069#M232012</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014070#M232013</link>
      <description>&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:57:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014070#M232013</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014072#M232014</link>
      <description>&lt;P&gt;J&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:58:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014072#M232014</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014074#M232015</link>
      <description>&lt;P&gt;/&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:58:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014074#M232015</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014075#M232016</link>
      <description>&lt;P&gt;/.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:59:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014075#M232016</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate MSI interrupt on i.MX6 in PCIe EP/endpoint mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014076#M232017</link>
      <description>&lt;P&gt;..&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 03:59:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-generate-MSI-interrupt-on-i-MX6-in-PCIe-EP-endpoint-mode/m-p/2014076#M232017</guid>
      <dc:creator>pROF23</dc:creator>
      <dc:date>2024-12-16T03:59:57Z</dc:date>
    </item>
  </channel>
</rss>

