<?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>topic Can PCM Read/Write a WO registry bit? in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/Can-PCM-Read-Write-a-WO-registry-bit/m-p/980636#M3125</link>
    <description>&lt;P&gt;Hi , all:&lt;/P&gt;
&lt;P&gt;Recently I was reading the PCM source code and the document "Intel Xeon Processor E5-2600 Product Family Uncore Performance Monitoring Guide"(Reference Number:327043-001). There&amp;nbsp;are some&amp;nbsp; questions confused me.&lt;/P&gt;
&lt;P&gt;In the guide 2.7.3.1, Page 89, I can get the "Q_Py_PCI_PMON_BOX_CTL Register – Field Definitions",and the attr of bit[8] is WO.&lt;/P&gt;
&lt;P&gt;And I find the definition of "WO" in the EDS of E5-2600 family:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Write Only: These bits can only be written by microcode, reads return indeterminate values. Microcode that wants to ensure this bit was written must read wherever the side-effect takes place.&lt;/P&gt;
&lt;P&gt;Then I read the source of PCM v2.5, from Line 2849 to Line 2860 in cpucounter.cpp, I can get the code to write &amp;amp; read the registry:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // freeze enable&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qpiLLHandles&lt;I&gt;-&amp;gt;write32(Q_P_PCI_PMON_BOX_CTL, Q_P_PCI_PMON_BOX_CTL_RST_FRZ_EN);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // freeze&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qpiLLHandles&lt;I&gt;-&amp;gt;write32(Q_P_PCI_PMON_BOX_CTL, Q_P_PCI_PMON_BOX_CTL_RST_FRZ_EN + Q_P_PCI_PMON_BOX_CTL_RST_FRZ);&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; val = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qpiLLHandles&lt;I&gt;-&amp;gt;read32(Q_P_PCI_PMON_BOX_CTL, &amp;amp;val);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (val != (Q_P_PCI_PMON_BOX_CTL_RST_FRZ_EN + Q_P_PCI_PMON_BOX_CTL_RST_FRZ))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "ERROR: QPI LL counter programming seems not to work. Q_P" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; "_PCI_PMON_BOX_CTL=0x" &amp;lt;&amp;lt; std::hex &amp;lt;&amp;lt; val &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::cout &amp;lt;&amp;lt; "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please see BIOS options to enable the export of performance monitoring devices (devices 8 and 9: function 2)." &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;}&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;So comes the questions.&lt;/P&gt;
&lt;P&gt;1.As the bit[8] is WO and can&amp;nbsp;only be written by microcode,&amp;nbsp;can a linux process write this bit?&lt;/P&gt;
&lt;P&gt;2.As the bit[8] is WO and read return indeterminate values, is the if statement resonable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2013 02:34:51 GMT</pubDate>
    <dc:creator>Tongliang_L_</dc:creator>
    <dc:date>2013-08-22T02:34:51Z</dc:date>
    <item>
      <title>Can PCM Read/Write a WO registry bit?</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Can-PCM-Read-Write-a-WO-registry-bit/m-p/980636#M3125</link>
      <description>&lt;P&gt;Hi , all:&lt;/P&gt;
&lt;P&gt;Recently I was reading the PCM source code and the document "Intel Xeon Processor E5-2600 Product Family Uncore Performance Monitoring Guide"(Reference Number:327043-001). There&amp;nbsp;are some&amp;nbsp; questions confused me.&lt;/P&gt;
&lt;P&gt;In the guide 2.7.3.1, Page 89, I can get the "Q_Py_PCI_PMON_BOX_CTL Register – Field Definitions",and the attr of bit[8] is WO.&lt;/P&gt;
&lt;P&gt;And I find the definition of "WO" in the EDS of E5-2600 family:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Write Only: These bits can only be written by microcode, reads return indeterminate values. Microcode that wants to ensure this bit was written must read wherever the side-effect takes place.&lt;/P&gt;
&lt;P&gt;Then I read the source of PCM v2.5, from Line 2849 to Line 2860 in cpucounter.cpp, I can get the code to write &amp;amp; read the registry:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // freeze enable&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qpiLLHandles&lt;I&gt;-&amp;gt;write32(Q_P_PCI_PMON_BOX_CTL, Q_P_PCI_PMON_BOX_CTL_RST_FRZ_EN);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // freeze&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qpiLLHandles&lt;I&gt;-&amp;gt;write32(Q_P_PCI_PMON_BOX_CTL, Q_P_PCI_PMON_BOX_CTL_RST_FRZ_EN + Q_P_PCI_PMON_BOX_CTL_RST_FRZ);&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; val = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qpiLLHandles&lt;I&gt;-&amp;gt;read32(Q_P_PCI_PMON_BOX_CTL, &amp;amp;val);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (val != (Q_P_PCI_PMON_BOX_CTL_RST_FRZ_EN + Q_P_PCI_PMON_BOX_CTL_RST_FRZ))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "ERROR: QPI LL counter programming seems not to work. Q_P" &amp;lt;&amp;lt; i &amp;lt;&amp;lt; "_PCI_PMON_BOX_CTL=0x" &amp;lt;&amp;lt; std::hex &amp;lt;&amp;lt; val &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::cout &amp;lt;&amp;lt; "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please see BIOS options to enable the export of performance monitoring devices (devices 8 and 9: function 2)." &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;}&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;So comes the questions.&lt;/P&gt;
&lt;P&gt;1.As the bit[8] is WO and can&amp;nbsp;only be written by microcode,&amp;nbsp;can a linux process write this bit?&lt;/P&gt;
&lt;P&gt;2.As the bit[8] is WO and read return indeterminate values, is the if statement resonable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 02:34:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Can-PCM-Read-Write-a-WO-registry-bit/m-p/980636#M3125</guid>
      <dc:creator>Tongliang_L_</dc:creator>
      <dc:date>2013-08-22T02:34:51Z</dc:date>
    </item>
  </channel>
</rss>

