<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://nvwiki.org/index.php?action=history&amp;feed=atom&amp;title=PTIMER</id>
	<title>PTIMER - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nvwiki.org/index.php?action=history&amp;feed=atom&amp;title=PTIMER"/>
	<link rel="alternate" type="text/html" href="https://nvwiki.org/index.php?title=PTIMER&amp;action=history"/>
	<updated>2026-05-13T17:23:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://nvwiki.org/index.php?title=PTIMER&amp;diff=152&amp;oldid=prev</id>
		<title>Starfrost at 00:05, 28 April 2025</title>
		<link rel="alternate" type="text/html" href="https://nvwiki.org/index.php?title=PTIMER&amp;diff=152&amp;oldid=prev"/>
		<updated>2025-04-28T00:05:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:05, 28 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;PTIMER&#039;&#039;&#039; is a [[hardware subsystem]] that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the [[NV1]]. It is required to, among other things, for the graphics hardware to perform activities that involve waiting a defined amount of time, for the drivers to know when to poll for GPU state changes and many more things. All registers of PTIMER are located within the [[Memory mapping#PCI BAR0 - Core GPU MMIO|main GPU MMIO]] area. In order to use the PTIMER correctly, the &amp;lt;code&amp;gt;PTIMER_NUMERATOR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; registers must be programmed to appropriate values. Then, the &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt; register must be set in order to set when the alarm is reset. Then, each clock cycle, the &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; (bits 31 through 5) and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; (bits 28 through 0) will update based on the number of nanoseconds that have passed. This will occur at a rate set by the result of the calculation &amp;lt;code&amp;gt;MCLK * PTIMER_NUMERATOR / PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; (where MCLK is the [[NV3 PRAMDAC|GPU core clock]] on NV3, and [[NV4 PRAMDAC|memory clock]] on NV4 and later). When &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt;{{ref|a}} is equal to &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; interrupt will be fired and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; will be reset to zero (most likely, &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; is incremented at this time). Disabling this interrupt is possible, but extremely unwise: if you are running under nVIDIA&#039;s Resource Manager, the drivers will most likely immediately cease to work, since [[NV3 PFIFO|PFIFO]] cache errors will never be caught, some I2C communication and several other critical events will not happen. Interrupts for the PTIMER subsystem cannot be turned off by using [[NV3 PMC|PMC]]&#039;s &amp;lt;code&amp;gt;PMC_INTERRUPT_ENABLE&amp;lt;/code&amp;gt; register, nor can PTIMER be turned off using &amp;lt;code&amp;gt;PMC_ENABLE&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;PTIMER&#039;&#039;&#039; is a [[hardware subsystem]] that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the [[NV1]]. It is required to, among other things, for the graphics hardware to perform activities that involve waiting a defined amount of time, for the drivers to know when to poll for GPU state changes and many more things. All registers of PTIMER are located within the [[Memory mapping#PCI BAR0 - Core GPU MMIO|main GPU MMIO]] area. In order to use the PTIMER correctly, the &amp;lt;code&amp;gt;PTIMER_NUMERATOR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; registers must be programmed to appropriate values. Then, the &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt; register must be set in order to set when the alarm is reset. Then, each clock cycle, the &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; (bits 31 through 5) and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; (bits 28 through 0) will update based on the number of nanoseconds that have passed. This will occur at a rate set by the result of the calculation &amp;lt;code&amp;gt;MCLK * PTIMER_NUMERATOR / PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; (where MCLK is the [[NV3 PRAMDAC|GPU core clock]] on NV3, and [[NV4 PRAMDAC|memory clock]] on NV4 and later). When &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt;{{ref|a}} is equal to &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; interrupt will be fired and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; will be reset to zero (most likely, &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; is incremented at this time). Disabling this interrupt is possible, but extremely unwise: if you are running under nVIDIA&#039;s Resource Manager, the drivers will most likely immediately cease to work, since [[NV3 PFIFO|PFIFO]] cache errors will never be caught, some I2C communication and several other critical events will not happen. Interrupts for the PTIMER subsystem cannot be turned off by using [[NV3 PMC|PMC]]&#039;s &amp;lt;code&amp;gt;PMC_INTERRUPT_ENABLE&amp;lt;/code&amp;gt; register, nor can PTIMER be turned off using &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the global subsystem status in &lt;/ins&gt;&amp;lt;code&amp;gt;PMC_ENABLE&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Registers ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Registers ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Starfrost</name></author>
	</entry>
	<entry>
		<id>https://nvwiki.org/index.php?title=PTIMER&amp;diff=151&amp;oldid=prev</id>
		<title>Starfrost at 00:04, 28 April 2025</title>
		<link rel="alternate" type="text/html" href="https://nvwiki.org/index.php?title=PTIMER&amp;diff=151&amp;oldid=prev"/>
		<updated>2025-04-28T00:04:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:04, 28 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;PTIMER&#039;&#039;&#039; is a [[hardware subsystem]] that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the [[NV1]]. It is required to, among other things, for the graphics hardware to perform activities that involve waiting a defined amount of time, for the drivers to know when to poll for GPU state changes and many more things. All registers of PTIMER are located within the [[Memory mapping#PCI BAR0 - Core GPU MMIO|main GPU MMIO]] area. In order to use the PTIMER correctly, the &amp;lt;code&amp;gt;PTIMER_NUMERATOR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; registers must be programmed to appropriate values. Then, the &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt; register must be set in order to set when the alarm is reset. Then, each clock cycle, the &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; (bits 31 through 5) and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; (bits 28 through 0) will update based on the number of nanoseconds that have passed. This will occur at a rate set by the result of the calculation &amp;lt;code&amp;gt;MCLK * PTIMER_NUMERATOR / PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; (where MCLK is the [[NV3 PRAMDAC|GPU core clock]] on NV3, and [[NV4 PRAMDAC|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Memory &lt;/del&gt;clock]] on NV4 and later). When &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt;{{ref|a}} is equal to &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; interrupt will be fired and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; will be reset to zero (most likely, &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; is incremented at this time). Disabling this interrupt is possible, but extremely unwise: if you are running under nVIDIA&#039;s Resource Manager, the drivers will most likely immediately cease to work, since [[NV3 PFIFO|PFIFO]] cache errors will never be caught, some I2C communication and several other critical events will not happen. Interrupts for the PTIMER subsystem cannot be turned off by using [[NV3 PMC|PMC]]&#039;s &amp;lt;code&amp;gt;PMC_INTERRUPT_ENABLE&amp;lt;/code&amp;gt; register, nor can PTIMER be turned off using &amp;lt;code&amp;gt;PMC_ENABLE&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;PTIMER&#039;&#039;&#039; is a [[hardware subsystem]] that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the [[NV1]]. It is required to, among other things, for the graphics hardware to perform activities that involve waiting a defined amount of time, for the drivers to know when to poll for GPU state changes and many more things. All registers of PTIMER are located within the [[Memory mapping#PCI BAR0 - Core GPU MMIO|main GPU MMIO]] area. In order to use the PTIMER correctly, the &amp;lt;code&amp;gt;PTIMER_NUMERATOR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; registers must be programmed to appropriate values. Then, the &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt; register must be set in order to set when the alarm is reset. Then, each clock cycle, the &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; (bits 31 through 5) and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; (bits 28 through 0) will update based on the number of nanoseconds that have passed. This will occur at a rate set by the result of the calculation &amp;lt;code&amp;gt;MCLK * PTIMER_NUMERATOR / PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; (where MCLK is the [[NV3 PRAMDAC|GPU core clock]] on NV3, and [[NV4 PRAMDAC|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;memory &lt;/ins&gt;clock]] on NV4 and later). When &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt;{{ref|a}} is equal to &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; interrupt will be fired and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; will be reset to zero (most likely, &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; is incremented at this time). Disabling this interrupt is possible, but extremely unwise: if you are running under nVIDIA&#039;s Resource Manager, the drivers will most likely immediately cease to work, since [[NV3 PFIFO|PFIFO]] cache errors will never be caught, some I2C communication and several other critical events will not happen. Interrupts for the PTIMER subsystem cannot be turned off by using [[NV3 PMC|PMC]]&#039;s &amp;lt;code&amp;gt;PMC_INTERRUPT_ENABLE&amp;lt;/code&amp;gt; register, nor can PTIMER be turned off using &amp;lt;code&amp;gt;PMC_ENABLE&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Registers ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Registers ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Starfrost</name></author>
	</entry>
	<entry>
		<id>https://nvwiki.org/index.php?title=PTIMER&amp;diff=150&amp;oldid=prev</id>
		<title>Starfrost at 00:04, 28 April 2025</title>
		<link rel="alternate" type="text/html" href="https://nvwiki.org/index.php?title=PTIMER&amp;diff=150&amp;oldid=prev"/>
		<updated>2025-04-28T00:04:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:04, 28 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;PTIMER&#039;&#039;&#039; is a [[hardware subsystem]] that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the [[NV1]]. It is required to, among other things, for the graphics hardware to perform activities that involve waiting a defined amount of time, for the drivers to know when to poll for GPU state changes and many more things. In order to use the PTIMER &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;CORRECTLY&lt;/del&gt;, the &amp;lt;code&amp;gt;PTIMER_NUMERATOR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; registers must be programmed to appropriate values. Then, the &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt; register must be set in order to set when the alarm is reset. Then, each clock cycle, the &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; (bits 31 through 5) and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; (bits 28 through 0) will update based on the number of nanoseconds that have passed. This will occur at a rate set by the result of the calculation &amp;lt;code&amp;gt;MCLK * PTIMER_NUMERATOR / PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; (where MCLK is the [[NV3 PRAMDAC|GPU core clock]] on NV3, and [[NV4 PRAMDAC|Memory clock]] on NV4 and later). When &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt;{{ref|a}} is equal to &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; interrupt will be fired and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; will be reset to zero (most likely, &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; is incremented at this time). Disabling this interrupt is possible, but extremely unwise: if you are running under nVIDIA&#039;s Resource Manager, the drivers will most likely immediately cease to work, since [[NV3 PFIFO|PFIFO]] cache errors will never be caught, some I2C communication and several other critical events will not happen. Interrupts for the PTIMER subsystem cannot be turned off by using [[NV3 PMC|PMC]]&#039;s &amp;lt;code&amp;gt;PMC_INTERRUPT_ENABLE&amp;lt;/code&amp;gt; register, nor can PTIMER be turned off using &amp;lt;code&amp;gt;PMC_ENABLE&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;PTIMER&#039;&#039;&#039; is a [[hardware subsystem]] that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the [[NV1]]. It is required to, among other things, for the graphics hardware to perform activities that involve waiting a defined amount of time, for the drivers to know when to poll for GPU state changes and many more things&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. All registers of PTIMER are located within the [[Memory mapping#PCI BAR0 - Core GPU MMIO|main GPU MMIO]] area&lt;/ins&gt;. In order to use the PTIMER &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;correctly&lt;/ins&gt;, the &amp;lt;code&amp;gt;PTIMER_NUMERATOR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; registers must be programmed to appropriate values. Then, the &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt; register must be set in order to set when the alarm is reset. Then, each clock cycle, the &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; (bits 31 through 5) and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; (bits 28 through 0) will update based on the number of nanoseconds that have passed. This will occur at a rate set by the result of the calculation &amp;lt;code&amp;gt;MCLK * PTIMER_NUMERATOR / PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; (where MCLK is the [[NV3 PRAMDAC|GPU core clock]] on NV3, and [[NV4 PRAMDAC|Memory clock]] on NV4 and later). When &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt;{{ref|a}} is equal to &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; interrupt will be fired and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; will be reset to zero (most likely, &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; is incremented at this time). Disabling this interrupt is possible, but extremely unwise: if you are running under nVIDIA&#039;s Resource Manager, the drivers will most likely immediately cease to work, since [[NV3 PFIFO|PFIFO]] cache errors will never be caught, some I2C communication and several other critical events will not happen. Interrupts for the PTIMER subsystem cannot be turned off by using [[NV3 PMC|PMC]]&#039;s &amp;lt;code&amp;gt;PMC_INTERRUPT_ENABLE&amp;lt;/code&amp;gt; register, nor can PTIMER be turned off using &amp;lt;code&amp;gt;PMC_ENABLE&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Registers ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Registers ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Starfrost</name></author>
	</entry>
	<entry>
		<id>https://nvwiki.org/index.php?title=PTIMER&amp;diff=149&amp;oldid=prev</id>
		<title>Starfrost: Created page with &quot;&#039;&#039;&#039;PTIMER&#039;&#039;&#039; is a hardware subsystem that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the NV1. It is required to, among other things, f...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nvwiki.org/index.php?title=PTIMER&amp;diff=149&amp;oldid=prev"/>
		<updated>2025-04-28T00:03:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;PTIMER&amp;#039;&amp;#039;&amp;#039; is a &lt;a href=&quot;/index.php?title=Hardware_subsystem&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Hardware subsystem (page does not exist)&quot;&gt;hardware subsystem&lt;/a&gt; that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the &lt;a href=&quot;/index.php/NV1&quot; title=&quot;NV1&quot;&gt;NV1&lt;/a&gt;. It is required to, among other things, f...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;PTIMER&amp;#039;&amp;#039;&amp;#039; is a [[hardware subsystem]] that implements a 56-bit programmable interval timer with nanosecond-ish accuracy (it counts in nanoseconds, but cannot be nanosecond accurate due to the clock speed) and controllable speed. It is a foundational component of all Nvidia GPUs and, at least for late 1990s and early 2000s GPU designs, has not changed a huge amount (although some new registers have been added) since the [[NV1]]. It is required to, among other things, for the graphics hardware to perform activities that involve waiting a defined amount of time, for the drivers to know when to poll for GPU state changes and many more things. In order to use the PTIMER CORRECTLY, the &amp;lt;code&amp;gt;PTIMER_NUMERATOR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; registers must be programmed to appropriate values. Then, the &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt; register must be set in order to set when the alarm is reset. Then, each clock cycle, the &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; (bits 31 through 5) and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; (bits 28 through 0) will update based on the number of nanoseconds that have passed. This will occur at a rate set by the result of the calculation &amp;lt;code&amp;gt;MCLK * PTIMER_NUMERATOR / PTIMER_DENOMINATOR&amp;lt;/code&amp;gt; (where MCLK is the [[NV3 PRAMDAC|GPU core clock]] on NV3, and [[NV4 PRAMDAC|Memory clock]] on NV4 and later). When &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt;{{ref|a}} is equal to &amp;lt;code&amp;gt;PTIMER_ALARM&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; interrupt will be fired and &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; will be reset to zero (most likely, &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; is incremented at this time). Disabling this interrupt is possible, but extremely unwise: if you are running under nVIDIA&amp;#039;s Resource Manager, the drivers will most likely immediately cease to work, since [[NV3 PFIFO|PFIFO]] cache errors will never be caught, some I2C communication and several other critical events will not happen. Interrupts for the PTIMER subsystem cannot be turned off by using [[NV3 PMC|PMC]]&amp;#039;s &amp;lt;code&amp;gt;PMC_INTERRUPT_ENABLE&amp;lt;/code&amp;gt; register, nor can PTIMER be turned off using &amp;lt;code&amp;gt;PMC_ENABLE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Registers ==&lt;br /&gt;
&lt;br /&gt;
=== PTIMER_INTR (Interrupt Status) ===&lt;br /&gt;
* MMIO offset: &amp;lt;code&amp;gt;0x9100&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available in: NV1+&lt;br /&gt;
* Read/write&lt;br /&gt;
&lt;br /&gt;
Displays the current interrupt state for the PTIMER subsystem. &lt;br /&gt;
&lt;br /&gt;
* Bit 0 - &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; - If this bit is set, the PTIMER alarm fired. Clear it when the interrupt has been successfully handled. &lt;br /&gt;
&lt;br /&gt;
If bit 0 of &amp;lt;code&amp;gt;PTIMER_INTR_EN&amp;lt;/code&amp;gt; is not set, disregard the value of this register.&lt;br /&gt;
&lt;br /&gt;
=== PTIMER_INTR_EN (Interrupt Enable) ===&lt;br /&gt;
* MMIO offset: &amp;lt;code&amp;gt;0x9140&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available in: NV1+&lt;br /&gt;
* Read/write&lt;br /&gt;
&lt;br /&gt;
Allows enabling and disabling interrupts for the PTIMER subsystem. In this case, there is only one interrupt to enable.&lt;br /&gt;
&lt;br /&gt;
* Bit 0 - &amp;lt;code&amp;gt;PTIMER_INTR_EN_0_ALARM&amp;lt;/code&amp;gt;. Determines if the alarm interrupt is enabled - if this bit is not set, it will not be fired, effectively making this subsystem rather useless.&lt;br /&gt;
&lt;br /&gt;
=== PTIMER_NUMERATOR (Time Count Speed Numerator)===&lt;br /&gt;
* MMIO offset: &amp;lt;code&amp;gt;0x9200&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available in: NV1+&lt;br /&gt;
* Read/write&lt;br /&gt;
&lt;br /&gt;
Bits 15 through 0 of this register contain the numerator of the fractional speed that the &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; register will increment. &lt;br /&gt;
&lt;br /&gt;
=== PTIMER_DENOMINATOR (Time Count Speed Denominator)===&lt;br /&gt;
* MMIO offset: &amp;lt;code&amp;gt;0x9210&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available in: NV1+&lt;br /&gt;
* Read/write&lt;br /&gt;
&lt;br /&gt;
Bits 15 through 0 of this register contain the denominator of the fractional speed that the &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; register will increment. Presumably it is a bad idea to set this to zero (although it seems the &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; just doesn&amp;#039;t count when you do)&lt;br /&gt;
&lt;br /&gt;
=== PTIMER_TIME_0 ===&lt;br /&gt;
* MMIO offset: &amp;lt;code&amp;gt;0x9400&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available in: NV1+&lt;br /&gt;
* Read/write&lt;br /&gt;
&lt;br /&gt;
* Bits 31 through 5 of this register contain the high 27 bits of the PTIMER count register. This increments whenever &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; rolls over to zero due to overflow.&lt;br /&gt;
&lt;br /&gt;
=== PTIMER_TIME_1 ===&lt;br /&gt;
* MMIO offset: &amp;lt;code&amp;gt;0x9410&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available in: NV1+&lt;br /&gt;
* Read/write&lt;br /&gt;
&lt;br /&gt;
* Bits 28 through 0 of this register contain the low 29 bits of the PTIMER count register. This increments every clock cycle by an amount equivalent to the result of the computation &amp;lt;code&amp;gt;MCLK * PTIMER_NUMERATOR / PTIMER_DENOMINATOR&amp;lt;/code&amp;gt;, where MCLK is the aforementioned core GPU clock.&lt;br /&gt;
&lt;br /&gt;
=== PTIMER_ALARM ===&lt;br /&gt;
* MMIO offset: &amp;lt;code&amp;gt;0x9420&amp;lt;/code&amp;gt;&lt;br /&gt;
* Available in: NV1+&lt;br /&gt;
* Read/write&lt;br /&gt;
&lt;br /&gt;
* Contain the value that &amp;lt;code&amp;gt;PTIMER_TIME_1&amp;lt;/code&amp;gt; needs to hold for the &amp;lt;code&amp;gt;PTIMER_INTR_ALARM&amp;lt;/code&amp;gt; interrupt to be triggered. There is no way to trigger an interrupt based on the value of &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
{{note|a}} The value of &amp;lt;code&amp;gt;PTIMER_TIME_0&amp;lt;/code&amp;gt; is not taken into account for the purposes of triggering the alarm interrupt.&lt;/div&gt;</summary>
		<author><name>Starfrost</name></author>
	</entry>
</feed>