Registry support in PCI Latency Patch 0.20 beta 15

George Breese 10/27/02
Updated 12/26/02

This is VERY preliminary. Anyone believing that the final patch will work this way should save me some time by smacking their heads against the wall right now.

Concepts:

If you are using Windows NT or 2000 or XP, you can try many combinations of registry settings without rebooting. Simply open a command prompt, make your changes to the registry, then restart the patch by typing "NET STOP VLATENCY" and "NET START VLATENCY" at the command prompt.

If you are using Windows 98 or ME, you must reboot before any registry changes will take effect.

I want feedback from users of this beta patch. I need to know what the best STABLE settings for your motherboard are. I have invested something like $3000 in hardware over the last 18 months for this, but I don't have enough time or energy to try every possible combination. Your input counts.

These registry entries are meant to be written by my Control Panel applet. If people become worried that the applet will overwrite their settings, I may create a separate set of entries for the applet to use. If you have an opinion on this, write it down in complete sentences and send it to me at georgebreese.com. Spelling counts. Remember, the correct spelling of "sux0rs" is "I find this disappointing because...".

The registry stuff:

The registry is built like a hard disk's directory tree. The registry key, or branch of the tree, that we'll be messing with is:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VLATENCY

Big note: CurrentControlSet is a "pointer", and it's changeable by the OS. If you boot in Safe Mode then the pointer will probably be pointing to a set of Safe Mode settings that you shouldn't adjust. If you're in Safe Mode then use this key instead:

HKEY_LOCAL_MACHINE\System\ControlSet001\Services\VLATENCY

First of all, you can control the way the VLATENCY patch starts up. There's an existing value in this registry key called "Start" and it has a default setting of 1. Set to 3 if you want to stop this driver from running at boot time. If you do so, then it'll be up to you to run it by typing "NET START VLATENCY" at a command prompt.

Don't change any of the other values in the VLATENCY key.

To customize the patch, first make a new sub-key under VLATENCY. The new key needs to be called "Parameters". In REGEDIT, click on VLATENCY to highlight it, then right-click and choose New, Key.

The actual registry hacks:

These are the items that can be entered into the Parameters key under VLATENCY. Each one is a DWORD value. To create these, highlight the Parameters key and right-click, choose New, DWORD Value. As with all registry entries, spelling counts! And, you must also have all the CAPITAL letters correct!

The large bold-named items are the names of the DWORD values that you'll create in REGEDIT.

Default items are marked in italics. These are the values that will be assumed if the registry value does not exist.

PatchMethod

This controls the overall patch. Supported values are:

0 = do not apply any patch.
1 = Apply only the registry values to the chipset.
2  = Start with the built-in patch settings, and use the registry values to override individual items. Apply the merged result to the chipset. (Default)
3 = Apply only the built-in patch settings to the chipset, ignoring the registry.

STPGNTCPUIdle

This enables or disables the "STPGNT# CPU Idle" feature of VIA's Athlon chipsets. This has no effect on non-Athlon chipsets. Supported values are:

0 = Disable idling. The CPU will heat up 5-10 degrees Celsius. This is the same amount that the CPU would heat up if the CPU was busy. This setting will greatly improve PCI performance. If PCI performance is most important, choose this value.

1 = Enable idling. The CPU will cool 5-10 degrees Celsius, but only if Windows ACPI support is installed. PCI performance will be lower. If having a cooled CPU is most important, choose this value.

2 = Do not change the STPGNT feature's settings in the chipset. (Default)

GuaranteedCPUTime

This adjusts the time that the CPU is given when it's the CPU's turn to control the PCI bus. (The rest of the time, PCI devices themselves will control the bus.)

This can be any number from zero to 255. Lower numbers are better for PCI performance. Higher numbers are better for non-busmastering PCI devices that need a lot of attention from the CPU. Most old BIOSes have a default value of twelve, and new BIOSes have a default of eight.

A value of zero can cause the motherboard to freeze, or cause RAID disk activity to use up to 100% of CPU time.

This value will be ignored if its value is greater than FF hexadecimal or 255 decimal. (Default)

PCIArbitrationTimer

This adjusts the timer that stops PCI devices when they have used the PCI bus for a long time. This timer is optional, but it is almost always enabled by the BIOS and set to its shortest possible time.

Valid entries are in the range of zero to seven on new chipsets, or zero to fifteen on old chipsets. If it is set to zero then the timer is disabled.

Normally, when the patch sets this value to a non-zero value, the patch will leave this value alone in the chipset if the chipset's timer is already set to a higher value. This behavior can be overridden.

If this registry entry is absent, or if its value is set to sixteen or higher, then the PCI arbitration timer will not be changed. (Default)

ForcePCIArbitrationTimer

This causes the value of PCIArbitrationTimer in the registry to be forced into the chipset, overriding any value that was set by the BIOS.

Set this to one in order to always force the value of PCIArbitrationTimer to be used.

If this is set to zero, the patch will not force the value into the chipset if the chipset already has a higher value and the registry value is non-zero. (Default)

IDEBoost

This is a boost that will be applied to the PCI latency of all mass-storage controllers (IDE, RAID, SCSI) in the computer. All mass-storage controllers will have their PCI latency register (0D) set to this value, unless the controller's register is already set to a higher value.

Higher values are better for performance of the mass-storage controller. If the value is set too high then other PCI devices can experience problems.

VIA's IDE controllers are not changed by this setting. All other devices having a PCI class of 1 will be set.

If this value is not specified then no boost will be done, except for any boost specified in the default patch settings when PatchMethod is set to 2. (Default)

SoundBoost

This is a boost that is applied to all sound devices in the computer. All sound devices will have their PCI latency register set to this value, unless the device's register is already set to a higher value.

Higher values are better for performance of the sound device. If the value is set too high then other PCI devices can experience problems.

VIA's AC97 audio controllers are not changed by this setting. All other devices having a PCI class of 4 will be set.

If a value is specified for CreativeBoost in the registry, then it will be used for Creative and Ensoniq devices. If not, then this value will be used.

If this value is not specified then no boost will be done, except for any boost specified in the default patch settings when PatchMethod is set to two. (Default)

CreativeBoost

This is a boost that is applied to all Creative- and Ensoniq-branded sound devices in the computer. All of these sound devices will have their PCI latency register set to this value, unless the device's register is already set to a higher value.

Higher values are better for performance of the sound device. If the value is set too high then other PCI devices can experience problems.

If this value is not specified then no boost will be done, except for any boost specified in either SoundBoost or in the default patch settings when PatchMethod is set to 2. (Default)

fl70, Rx70, fl71, Rx71, fl72, Rx72, fl73, Rx73, fl74, Rx74, fl76, Rx76

These settings allow fine-tuning of the PCI registers of the chipset. Registers 70, 71, 72, 73, 74, and 76 are supported.

Some of the other registry settings also adjust these same registers. These fl** and Rx** settings always override the other registry settings.

In order to set these values, you will need a VIA chipset datasheet (or experience with WPCREDIT) and a basic understanding of binary math.

The registers named "fl##"' contain binary flags. When a binary bit is set to one in "fl##", the corresponding bit in the 'Rx##' value will be applied to the chipset's register. If a bit in 'fl##' is set to zero then the bit in 'Rx##' will not be used. The resulting logic looks like this:

Bit in fl70 Bit in Rx70 Result in register 70
0 0 No change
0 1 No change
1 0  Bit is set to zero
1 1 Bit is set to one

To set a whole register, set the 'fl##' value to FF hexadecimal or 255 decimal. Then, set the 'Rx##' value to the byte-sized value that will be stored in the register.

If the value of 'fl##' is zero then the value of 'Rx##' will be ignored. (Default)

Example:

Here's an example of setting these registers. If you want to enable PCI Master Read Caching in the chipset, you would set register 70's bit 2 to a value of one. If you want to disable PCI Delay Transaction, you would set register 70's bit 1 to a value of zero. This example will do both. This example MUST do both, because all changes to register 70 must be contained in "fl70" and "Rx70".

First, create the 'fl70' register. Bits 1 and 2 of register 70 need to change, so we must enable those bits in 'fl70'. Binary bits are always handled in the order 7-6-5-4-3-2-1-0. We need to set:

-----++-    <-- a '+' means we want to set it, a '-' means we don't.

So, the binary value of register "fl70" will be:

-----++-   <-- The same "+" and "-" becomes...
00000110   <-- ones and zeroes

This binary value needs to be converted to hexadecimal so we can enter it in WPCREDIT. Use our handy binary-to-hexadecimal conversion chart. Convert the left four bits into the left hexadecimal digit, and the right bits into the right digit.

0000=0
0001=1
0010=2
0011=3
0100=4
0101=5
0110=6
0111=7
1000=8
1001=9
1010=A
1011=B
1100=C
1101=D
1110=E
1111=F

The left hexadecimal digit is zero, and the right is six. So,

0000 0110 binary = 06 hexadecimal (the final value of "fl70")

Now, we must create the value of "Rx70". We care about bits 1 and 2 of register 70, and we do not care about the rest. We also know the values we need to put in bits 1 and 2. We want a result that looks like this in binary:

XXXXX10X  <-- X means 'don't care'

The patch won't care about the 'don't care' values either, because 'fl70' will tell the patch to ignore them. So, we can set them to anything. If we know that our favorite motherboard sets register 70 to CC and CC contains the right values, then we can set Rx70 to CC. Otherwise, we'll need to create a hexadecimal value for Rx70. Let's create the binary value for Rx70, setting the "don't care" bits to zero.

XXXXX10X  <-- If the "don't care" bits are set to zero then we get...
00000100  <-- Bit 2 set to one, bit 1 set to zero, all "don't care" bits set to zero

Using our hexadecimal translation, we convert the value to:

0000 0100 binary = 04 hexadecimal

So, our final hexadecimal value for "fl70" is 06 hexadecimal, and the value for "Rx70" is 04 hexadecimal. We can enter these values into the Parameters key in REGEDIT.

Final notes:

None.