Contributed by mbalmer on from the we-dont-need-ndas dept.
Intel's Enhanced Speed Stepping Technology, or EST for short, allows a CPU to adjust it's running speed - and thus power consumption - at runtime; this happens quickly and invisible to the user, multiple times per second, if needed. This technology is built into the Pentium M CPUs which are often found in Laptops and more and more in embedded devices. Functionally equivalent technologies are also built into some other vendor's CPU's, e.g. the VIA C7-M line.
The EST technology, while beneficial, also plagued us and other free operating systems for quite some time. This is because for early Pentium M models, Intel freely published the so called operating points of the CPU, voltage/frequency pairs that set the CPU to a certain speed-step. Obviously you need to know the exact CPU model you are running on and you need to have a table of the valid operating points to step up/down the CPU speed.
Now guess what: For newer CPUs Intel does no longer publish the operating points! And this is where Dimitry's code comes into play:
Since most CPUs that support EST report at least their highest and lowest operating points in a more or less undocumented register, we can use those to have EST work, at least in a rudimentary way, on CPUs for which we have no complete power state information.
So if your CPU advertises SpeedStep, but it didn't work before, whith this change in our EST code, chances are that you laptop might now work with a recent OpenBSD snapshot.
And here is the list of the changes:
- If an unknown EST CPU is encountered, use the known highest and lowest (and if different, the current) power state to generate a fake power state table on the fly (thanks to canacar@ for the idea.)
- Calculate the system bus clock speed before calling est_init(); it is needed to display proper MHz values from MSR values.
- Also use the bus clock to identify EST CPUs, which is needed to differentiate e.g. Pentium M 715 and 760, which unfortunately have exactly the same MSR values.
- Store power states directly as MSR values.
Dimitry Andric lives in Utrecht, the Netherlands. He's been using OpenBSD since 2.6 or thereabouts, and he got committ access to OpenBSD a few months ago, when he worked on improving support for several AGP chipsets, such as the Intel 915 and 945 integrated graphics adapters. This work allowed X.org to run with hardware acceleration on these chips.
(Comments are closed)