Vous êtes sur la page 1sur 5

Windows 7 - Win7: Enabling HPET, bcdedit

/set useplatformclock true (command)



http://www.sevenforums.com/general-discussion/184992-win7-enabling-hpet-bcdedit-set-
useplatformclock-true-command.html


Win7: Enabling HPET

1.Hello,

I would like some help to understand a few things about Windows 7+ HPET and
Bios+ HPET. To start it was my understanding that if you enabled HTEP in the
bios Windows 7 would automatically be using HTEP. However, I'm reading that it
does not and will still use the Time Stamp Counter (TSC). So I'm not sure what
point it would be enabling it from the bios.

2ndly, using the command bcdedit /set useplatformclock true (then reboot) is said
to enable HPET using Win 7. While bcdedit /deletevalue
useplatformclock (then reboot) is said to remove it. To
test to see if it's working or not you have to use
either:
A. Timer Function Performance (run the program before and after the tweak to
see if the QueryPerformanceFrequency() freq value increased or not)
B. WinTimerTester_1.1 (from UncleWebb to see if you have a 1.0000 ratio at or
near 100 seconds)
To see if it improves anything or not. From Unclewebbs post he addresses the use
of SetFSB. From another point of view it helps improve slow connections when
using this application from here.

Should we be using Windows 7's HPET or stick to TSC for everyday use and
gaming?

2.Welcome back to Seven forums. I suspect your mean HPET, not HTEP?
If so here is a Wiki on it. High Precision Event Timer - Wikipedia, the free encyclopedia

3. HPET Mode
Common Options : 64-Bit Mode, 32-Bit Mode
Quick Review
This BIOS option is linked to the HPET Support BIOS option. HPET Support
must be enabled for this BIOS option to be active.
The HPET, short for High Precision Event Timer, is a new system timer
developed by Intel and Microsoft to replace the four system timers currently in use.
Some HPETs have 64-bits wide registers which can also run in the 32-bit mode.
This is where the HPET Mode BIOS option comes in.
Setting it to the 64-Bit Mode allows the 64-bit operating systems and applications
to make full use of the HPET's 64-bit registers.
Setting it to the 32-Bit Mode forces the HPET's 64-bit registers to run in the 32-bit
mode. This allows proper operation when used with a 32-bit operating system.
If you are using a 64-bit operating system, you should select the 64-Bit Mode so
that the operating system and 64-bit applications can make full use of the HPET's
64-bit registers. There is no harm in selecting the 32-Bit Mode although it will
mean a potential reduction in counter resolution and/or functionality.
If you are using a 32-bit operating system, you should select the 32-Bit Mode.
If you are dual-booting between a 64-bit operating system and a 32-bit operating
system and both support the HPET, select the 32-Bit Mode. If the 64-bit operating
system supports HPET while the 32-bit operating system does not (e.g. Windows
XP), then you can select the 64-Bit Mode.

If you like to know more about this and other BIOS settings, why not subscribe to
the full BIOS Optimization Guide?
Click here to find out how you can do that now!


Links: Discuss BIOS options here in our forums | Back to the list of BIOS
options
4. By default Windows 7 uses different timers in the CPU to calculate stuff. HPET
is the newest and best of these timers, but because of default combination of timers
it takes longer time for CPU to keep up all the timers and sync between them.
Forcing Windows to use HPET only improves performance and leads to greater
FPS.

Steps to enable this tweak:

4.1. Enable HPET in BIOS. If you have HPET option in BIOS then your
hardware can support HPET.

4.2. Enable HPET in Windows by giving this command in admin credential CMD:
bcdedit /set useplatformclock true

4.3. Reboot


High Precision Event Timer
From Wikipedia, the free encyclopedia
Jump to: navigation, search
The High Precision Event Timer is a hardware timer used in personal computers. It was
developed jointly by Intel and Microsoft and has been incorporated in PC chipsets since circa
2005. Formerly referred to by Intel as a Multimedia Timer,
[1]
the term HPET was selected to
avoid confusion with the multimedia timers software feature introduced in the MultiMedia
Extensions to Windows 3.0.
[2]

Older operating systems that do not support a hardware HPET device can only use older timing
facilities, such as the programmable interval timer (PIT) or the real-time clock (RTC). Windows
XP, when fitted with the latest HAL (hardware abstraction layer), can also use the processor's
Time Stamp Counter (TSC) or Power Management Timer (PMTIMER), together with the RTC
to provide operating system features that would, in later Windows versions, be provided by the
HPET hardware. Confusingly, such XP systems quote "HPET" connectivity in the device driver
manager even though the Intel HPET device is not being used.
Features
An HPET chip consists of a 64-bit up-counter (main counter) counting at a frequency of at least
10 MHz, and a set of (at least 3, up to 256) comparators. These comparators are 32- or 64-bit
wide. The HPET is programmed via a memory mapped I/O window that is discoverable via
ACPI. The HPET circuit in modern PCs is integrated into the southbridge chip.
[note 1]

Each comparator can generate an interrupt when the least significant bits are equal to the
corresponding bits of the 64-bit main counter value. The comparators can be put into one-shot
mode or periodic mode, with at least one comparator supporting periodic mode and all of them
supporting one-shot mode. In one-shot mode the comparator fires an interrupt once when the
main counter reaches the value stored in the comparator's register, while in the periodic mode the
interrupts are generated at specified intervals.
Comparators can be driven by the operating system, e.g. to provide one timer per CPU for
scheduling, or by applications.
Applications
The HPET can produce periodic interrupts at a much higher resolution than the RTC and is often
used to synchronize multimedia streams, providing smooth playback and reducing the need to
use other timestamp calculations such as an X86-based CPU's RDTSC instruction.
Comparison to predecessors
HPET is meant to supplement and replace the 8254 programmable interval timer and the RTC's
periodic interrupt function. Compared to these older timer circuits, the HPET has higher
frequency (at least 10 MHz) and wider 64-bit counters (although they can be driven in 32-bit
mode).
[1]

While 8254 and RTC can, similarly to HPET, be put in one-shot mode, the set-up process is so
slow that their one-shot mode is not used in practice for tasks requiring precise scheduling.
[3]

Instead, 8254 and RTC are typically used in periodic mode with very small time interval. For
example, if an application needs to perform several short (some milliseconds, perhaps) waits, it
is better to have a periodic timer running constantly with 1 ms period because of the high setup
cost of an 8254 or RTC one-shot timer. This causes an interrupt on every millisecond even if the
application needs to do actual work less frequently. With HPET, the extra interrupts can be
avoided, because the set-up cost of a HPET one-shot timer is considerably smaller.
Compatibility
Operating systems designed before HPET existed cannot use HPET, so work only on hardware
that has other timer facilities. Newer operating systems tend to be able to use either. Some
hardware has both. Indeed most current southbridge chips have legacy-supporting instances of
PIT, PIC, APIC and RTC devices incorporated into their silicon whether or not they are used by
the motherboard or the operating system, which is why even a very modern PC can still run older
operating systems.
The following operating systems are known not to be able to use HPET: Windows XP,
[note 2]

Windows Server 2003, and earlier Windows versions, Linux kernels prior to 2.6.
[note 3]

The following operating systems are known to be able to use HPET: Windows XP,
[note 4]

Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows 7, x86 based
versions of Mac OS X, Linux operating systems using the 2.6 kernel, FreeBSD and OpenSolaris.
Problems
HPET is a continuously running timer that counts upward, not a one-shot device that counts
down to zero, causes one interrupt and then stops. Since HPET compares the actual timer value
and the programmed target value on equality rather than "greater or equal", interrupts can be
missed if the target time has already passed when the comparator value is written into the chip's
register. In the presence of non-maskable interrupts (such as System Management Interrupts) that
do not have a hard upper bound on their execution time, this race condition requires time-
consuming re-checks of the timer after setup and is hard to avoid completely. The difficulties are
exacerbated if the comparator value is not synchronized with the timer immediately, but delayed
by one or two ticks, as some chipsets do.
[4]

Vous aimerez peut-être aussi