<?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 do we set Revision and Serial from proc/cpuinfo</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682181#M105396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code for getting this information should be in the kernel code inside &amp;lt;Kernel&amp;gt;/arch/arm/kernel/setup.c&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2017 19:17:32 GMT</pubDate>
    <dc:creator>Carlos_Musich</dc:creator>
    <dc:date>2017-07-26T19:17:32Z</dc:date>
    <item>
      <title>How do we set Revision and Serial from proc/cpuinfo</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682178#M105393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use &lt;A href="https://github.com/Freescale/meta-freescale/tree/master/recipes-devtools/devregs"&gt;devregs from the meta-freescale repo&lt;/A&gt; and one of the first things that tool does is read /proc/cpuinfo to parse out the "Revision :" field. The tool was coming back with a "Error reading CPU type" message due to the fact that Revision was returning all 0s.&lt;/P&gt;&lt;P&gt;It does seem odd that "Revision" and "Serial" from cpuinfo are returning all 0s for this i.MX6DL. What are correct values to be returned? How do these get set correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# cat /proc/cpuinfo &lt;BR /&gt;processor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0&lt;BR /&gt;model name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : ARMv7 Processor rev 10 (v7l)&lt;BR /&gt;BogoMIPS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 3.00&lt;BR /&gt;Features&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 &lt;BR /&gt;CPU implementer : 0x41&lt;BR /&gt;CPU architecture: 7&lt;BR /&gt;CPU variant&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0x2&lt;BR /&gt;CPU part&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0xc09&lt;BR /&gt;CPU revision&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;processor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 1&lt;BR /&gt;model name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : ARMv7 Processor rev 10 (v7l)&lt;BR /&gt;BogoMIPS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 3.00&lt;BR /&gt;Features&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 &lt;BR /&gt;CPU implementer : 0x41&lt;BR /&gt;CPU architecture: 7&lt;BR /&gt;CPU variant&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0x2&lt;BR /&gt;CPU part&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0xc09&lt;BR /&gt;CPU revision&amp;nbsp;&amp;nbsp;&amp;nbsp; : 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hardware&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Freescale i.MX6 Quad/DualLite (Device Tree)&lt;BR /&gt;Revision&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0000&lt;BR /&gt;Serial&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 0000000000000000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2017 16:43:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682178#M105393</guid>
      <dc:creator>michaelworster</dc:creator>
      <dc:date>2017-07-25T16:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do we set Revision and Serial from proc/cpuinfo</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682179#M105394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside u-boot source code in &lt;EM&gt;&lt;STRONG&gt;arch/arm/cpu/armv7/mx6/soc.c&lt;/STRONG&gt;&lt;/EM&gt; you will find the call to &lt;STRONG&gt;&lt;EM&gt;cpurev = get_cpu_rev(); &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But this depends on CONFIG_REVISION_TAG which must be enabled in mx6_common.h.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jul 2017 20:09:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682179#M105394</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2017-07-25T20:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do we set Revision and Serial from proc/cpuinfo</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682180#M105395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Carlos, thanks for the hints. I found where U-Boot is checking the board's revision and serial number, and I tossed in a little code to check the results in U-Boot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ret = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;struct tag_serialnr serialnr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rev = get_board_rev();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;printf("\nboard revision: %lu\n", rev);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;get_board_serial(&amp;amp;serialnr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;printf("\nboard serial: %lu %lu\n", serialnr.low, serialnr.high);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I booted up I was able to see some values showing up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; board revision: 397331&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; board serial: 1324543428 3961&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it looks like that's working, but when I get to the kernel, /proc/cpuinfo reports all 0's for revision and serial. Does this information need to be passed from the bootloader to the kernel somehow?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a custom board, so perhaps we missed some changes in the bootloader/kernel required to pass information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 18:55:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682180#M105395</guid>
      <dc:creator>michaelworster</dc:creator>
      <dc:date>2017-07-26T18:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do we set Revision and Serial from proc/cpuinfo</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682181#M105396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code for getting this information should be in the kernel code inside &amp;lt;Kernel&amp;gt;/arch/arm/kernel/setup.c&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Carlos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 19:17:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682181#M105396</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2017-07-26T19:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do we set Revision and Serial from proc/cpuinfo</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682182#M105397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Carlos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I looked into setup.c and it seems that Revision and Serial are being set by system_rev and serial_high/serial_low respectively. After some further investigation, it appears that these are &lt;STRONG&gt;only&lt;/STRONG&gt; being set via atags in atags_compat.c. So, I suppose the system rev and serial must be set by atags and there is currently no device tree support for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I searched around in the bootloader for any place this was set, but as far as I can tell, it looks like this information is not being passed. I can't find any fsl/i.mx code which passes these variables via the atags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing anything here? Is it correct that this information must currently be passed by atags but that is not happening?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 13:34:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682182#M105397</guid>
      <dc:creator>michaelworster</dc:creator>
      <dc:date>2017-07-27T13:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do we set Revision and Serial from proc/cpuinfo</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682183#M105398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just looked at the device tree, there is a serial-number property for root node,&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://elixir.free-electrons.com/linux/latest/source/Documentation/devicetree/booting-without-of.txt#L874" title="http://elixir.free-electrons.com/linux/latest/source/Documentation/devicetree/booting-without-of.txt#L874"&gt;linux/Documentation/devicetree/booting-without-of.txt - Elixir - Free Electrons&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the code to parse it is,&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://elixir.free-electrons.com/linux/v4.11-rc8/source/arch/arm/kernel/setup.c#L929" title="http://elixir.free-electrons.com/linux/v4.11-rc8/source/arch/arm/kernel/setup.c#L929"&gt;linux/arch/arm/kernel/setup.c - Elixir - Free Electrons&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So,&amp;nbsp;either uboot updates it or just have it in kernel while building device tree should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 18:34:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682183#M105398</guid>
      <dc:creator>JayTu</dc:creator>
      <dc:date>2017-07-27T18:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do we set Revision and Serial from proc/cpuinfo</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682184#M105399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jay, you are correct for a 4.11 kernel. I'm based off a &lt;A href="https://github.com/Freescale/meta-freescale/tree/master/recipes-kernel/linux"&gt;4.1.15&lt;/A&gt;, so it looks like support was not added at that point in time. Also, it would appear even in the later kernels only serial-number has an entry. Since devregs still requires a Revision to be set, it would see that atags are required still. Does that seem correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 20:53:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-do-we-set-Revision-and-Serial-from-proc-cpuinfo/m-p/682184#M105399</guid>
      <dc:creator>michaelworster</dc:creator>
      <dc:date>2017-07-27T20:53:47Z</dc:date>
    </item>
  </channel>
</rss>

