Sunteți pe pagina 1din 22

Windows Platform Design Notes

Designing Hardware for the Microsoft Windows Family of Operating Systems


Windows Native Processor Performance
Control
Abstract: Microsoft Windows XP and the Windows Server 2003 family include builtin
!rocessor !erformance control to ta"e advanta#e of micro!rocessors that utili$e !erformance
states to o!erate the !rocessor more efficiently when it is not fully utili$ed% &his !a!er outlines the
new '()S im!lementations needed to e*!ose this ca!ability in Windows% &his !a!er also details
the functionality and !olicies em!loyed by Windows for !rocessor !erformance control%
&he current version of this !a!er is available on the web at
htt!+,,www%microsoft%com,hwdev,tech,onnow,ProcPerfCtrl%as!
Version 1.1a Noem!er 1"# "$$"
Contents
(ntroduction%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3
Windows Processor Performance Control%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3
&he Processor -river .rchitecture%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3
Processor Performance Control Policy%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/
-ynamic &hrottlin# Policy -etails%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%0
Performance State Chan#es )utside the Sco!e of Policy%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%0
Parameters to Pstate !olicy%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1
Processor Performance State &ransition 2atency (ssues%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3
Parameters to CState Policy%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4
CState Control 5e#istry 6ey%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%7
(m!lementin# Processor Performance Control for Windows%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%80
Su!!ort usin# .CP( 2%0 Processor )b9ects%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%80
.CP( 2%0 Processor )b9ects -esi#n :uidelines for Windows%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%80
Su!!ortin# Systems with (ntel S!eedSte! and ;nhanced S!eedSte! &echnolo#y%%%%%%%%%%%82
Su!!ortin# (ntel S!eedSte! &echnolo#y usin# .CP( 2%0 )b9ects%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%82
Su!!ortin# ;nhanced (ntel S!eedSte! &echnolo#y%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%83
Su!!ortin# the (ntel S!eedSte! 2e#acy .!!let (nterface%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%84
Su!!ortin# Systems with .M- PowerNow< &echnolo#y%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%87
(m!lementin# for the 61,2=%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 87
(m!lementin# for the 63%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 87
Su!!ortin# Systems with &ransmeta 2on#5un &echnolo#y%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%20
>-esi#ned for Windows XP> 2o#o Pro#ram 5e?uirements%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%28
Call &o .ction%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 28
5eferences%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 28
.!!endi* .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 28
Processor -river Ca!abilities Method @AP-CB -efinition%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%28
Windows Native Processor Performance Control 2
Disclaimer% Microsoft Cor!oration may have !atents or !endin# !atent a!!licationsC trademar"sC co!yri#htsC or other
intellectual !ro!erty ri#hts coverin# sub9ect matter in this document% &he furnishin# of this document does not #ive you
any license to the !atentsC trademar"sC co!yri#htsC or other intellectual !ro!erty ri#hts e*ce!t as e*!ressly !rovided in
any written license a#reement from Microsoft Cor!oration%
&his is a !reliminary document and may be chan#ed substantially !rior to final !ublic release% &his document is !rovided
for informational !ur!oses only and Microsoft ma"es no warrantiesC either e*!ress or im!liedC in this document%
(nformation in this documentC includin# D52 and other (nternet Web site referencesC is sub9ect to chan#e without notice%
&he entire ris" of the use or the results of the use of this document remains with the user% Dnless otherwise notedC the
e*am!le com!aniesC or#ani$ationsC !roductsC !eo!le and events de!icted herein are fictitious and no association with
any real com!anyC or#ani$ationC !roductC !erson or event is intended or should be inferred% Com!lyin# with all a!!licable
co!yri#ht laws is the res!onsibility of the user% Without limitin# the ri#hts under co!yri#htC no !art of this document may
be re!roducedC stored in or introduced into a retrieval systemC or transmitted in any form or by any means @electronicC
mechanicalC !hotoco!yin#C recordin#C or otherwiseBC or for any !ur!oseC without the e*!ress written !ermission of
Microsoft Cor!oration%
Portions of this document s!ecify software that is still in develo!ment% Some of the information in this documentation
may be inaccurate or may not be an accurate re!resentation of the functionality of final documentation or software%
Microsoft assumes no res!onsibility for any dama#es that mi#ht occur directly or indirectly from these inaccuracies%
Microsoft does not ma"e any re!resentation or warranty re#ardin# s!ecifications in this document or any !roduct or item
develo!ed based on these s!ecifications% &his document is !rovided to you on an .S (S basis% Microsoft disclaims all
e*!ress and im!lied warrantiesC includin# but not limited to the im!lied warranties or merchantabilityC fitness for a
!articular !ur!ose and freedom from infrin#ement% Without limitin# the #enerality of the fore#oin#C Microsoft does not
ma"e any warranty of any "ind that any item develo!ed based on these s!ecificationsC or any !ortion of a s!ecificationC
will not infrin#e any co!yri#htC !atentC trade secret or other intellectual !ro!erty ri#ht of any !erson or entity in any
country% (t is your res!onsibility to see" licenses for such intellectual !ro!erty ri#hts where a!!ro!riate% Microsoft shall not
be liable for any dama#es of any "ind arisin# out of or in connection with the use of these s!ecificationsC includin#
without limitationC any directC indirectC incidentalC conse?uential @includin# any lost !rofitsBC !unitive or s!ecial dama#esC
whether or not Microsoft has been advised of such dama#es% % Some states do not allow the e*clusion or limitation of
liability or conse?uential or incidental dama#esE the above limitation may not a!!ly to you%
&he information contained in this document re!resents the current view of Microsoft Cor!oration on the issues discussed
as of the date of !ublication% 'ecause Microsoft must res!ond to chan#in# mar"et conditionsC it should not be inter!reted
to be a commitment on the !art of MicrosoftC and Microsoft cannot #uarantee the accuracy of any information !resented%
&his document is for informational !ur!oses only% M(C5)S)F& M.6;S N) W.55.N&(;SC ;XP5;SS )5 (MP2(;-C (N
&G(S -)CDM;N&%
MicrosoftC WindowsC and Windows N& are trademar"s or re#istered trademar"s of Microsoft Cor!oration in the Dnited
States and,or other countries% )ther !roduct and com!any names mentioned herein may be the trademar"s of their
res!ective owners%
H 20082002 Microsoft Cor!oration% .ll ri#hts reserved%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 3
(ntroduction
GistoricallyC !rocessors for mobile PC systems ran at lower volta#es than !rocessors for des"to!
PCsE conse?uentlyC !rocessors for mobile PC systems also had to run at slower cloc" s!eeds%
&his was not usually an issue because mobile PCs have relatively slow dis" and memory
subsystems% Mobile PC !rocessors are usually idle when most business a!!lications are bein#
used%
&he situation is different if hi#h bandwidth (,) subsystems are im!lemented or if the user is doin#
somethin# that has hi#h CPD utili$ation and low (,) bandwidth re?uirements% &his can be the
case with many #amesC and also with -I- !laybac"% Many #ames will try to use all available
CPD% &he -I- !laybac" case is different because most soft -I- !layers will only use about
000MG$ of the !rocessor ca!ability%
Dnderstandin# these limitations in a mar"et environment where Js!eedK is an im!ortant sales
factorC CPD manufacturers have introduced !rocessors that em!loy !erformance states% &hese
CPDs !rovide hi#h volta#e,hi#h fre?uency states for use when !rocessor utili$ation is hi#hC and
low volta#e,low fre?uency states to conserve battery life% &his technolo#y #ives );Ms the ability
to desi#n a system that can com!ete both in the s!eed and battery life benchmar" tests%
Windows XP and the Windows Server 2003 family include native su!!ort for control of !rocessor
!erformance states% &his !a!er e*!lains the im!lementation details needed to use Windows
native su!!ortC and outlines the !olicies that Windows uses for !rocessor !erformance control%
&he !a!er covers im!lementation of #eneric .CP( 2%0 su!!ortC and s!ecific details for (ntel
S!eedSte!C ;nhanced (ntel S!eedSte!C .M- PowerNow<C and &ransmeta 2on#5un !rocessor
!erformance control technolo#ies%
Windows Processor Performance Control
&he Native su!!ort for !rocessor !erformance control in Windows consists of two com!onents+
the "ernel !ower !olicy mana#erC and a !rocessor driver% &he "ernel !ower mana#er is
res!onsible for mana#in# !rocessor !erformance control !olicyC which is the set of rules used to
determine the a!!ro!riate !erformance state to be used at any #iven time% &he "ernel !ower
mana#erLs !rocessor !erformance control !olicy al#orithms ma"e decisions based on several
in!utsC includin#+
Current !ower !olicy and !rocessor dynamic throttlin# al#orithm
Geuristics such as !rocessor utili$ationC current battery levelC use of !rocessor idle statesC
and inrush current events
&hermal conditions and events
Current !latform ca!abilitiesC as conveyed by system firmware
System standby and resume transitions
Processor !erformance control is im!lemented usin# a !rocessor driver architecture% &he "ernel
!ower mana#er calls into the !rocessor driver to invo"e chan#es on the "ernelLs behalf% &he
!rocessor driver does not ma"e decisions about when to chan#e !erformance statesC e*ce!t as
noted later in this !a!er%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 4
&he Processor -river .rchitecture
Windows !rovides su!!ort for different manufacturerLs !rocessors by abstractin# s!ecific
im!lementation details in a !rocessor driver that !rovides a unified interface to the "ernel !ower
mana#er% &he !rocessor driver architecture allows Windows to ta"e full advanta#e of individual
technolo#ies from different CPD vendorsC and allow for su!!ort of future advances in !rocessors
by !rovidin# an easy u!date !ath for new functionalities and technolo#ies via develo!ment of a
new !rocessor driver%
Windows su!!orts !rocessor !erformance control described by the Processor )b9ects defined in
the .dvanced Confi#uration and Power (nterface @.CP(B s!ecificationC version 2%0C and le#acy
interfaces defined by (ntelC .M-C and &ransmeta% (m!lementation details for !roducts from each
CPD vendor are !rovided later in this !a!er%
.ll !rocessor drivers are based on and statically lin"ed a#ainst a common libraryC proclib.lib,
which forms the basis of each driver and re!resents the ma9ority of the functionality% 5outines
s!ecific to each !rocessor model reside in the driver for that !rocessor familyC and may add to the
functionality common to all !rocessor drivers%
Windows !rovides a #eneric !rocessor driverC processr.sysC which is ca!able of su!!ortin#
!rocessorsC whose !rocessor !erformance control interface is described usin# the .CP( 2%0
!rocessor !erformance control ob9ectsC where the APC& ob9ect is defined usin# and (,) address
s!ace%
.dditional drivers s!ecific to !rocessor families may also be develo!ed% &hese !rocessor
s!ecific drivers may contain code to su!!ort le#acy interfacesC or have "nowled#e about
advanced features and !erformance afforded by a !articular vendorLs !rocessor !erformance
control technolo#ies% &his includes !rocessor families whose !rocessor !erformance control
interface is im!lemented usin# Functional Fi*ed GardwareC as described in the .CP( 2%0
s!ecification%
Processor Performance Control Policy
(n WindowsC the !rocessor !erformance control !olicy is lin"ed to the Power Scheme settin# in
the Windows control !anel !ower o!tions a!!let% No additional D( is re?uired to set the !olicy%
Windows defines four control !oliciesC "nown as processor dynamic throttling policiesC for
!rocessor !erformance control+
&onstant .lways runs at lowest !erformance state
'daptie Performance state chosen based on CPD demand
Degrade Starts at lowest !erformance stateC then uses linear !erformance reduction
@sto! cloc" throttlin#B as battery dischar#es
None .lways runs at the hi#hest available !erformance state
NOTE: &he term sto! cloc" throttlin# refers to linear cloc" reduction as described by the
-D&MAW(-&G and -D&MA)FFS;& values in the F.-&C and defined in the .CP( 2%0
s!ecificationC sections /%3%3%0%8 and 4%8%8%
&he followin# table shows the relationshi! between Power Policy Schemes and !rocessor
dynamic throttlin# !olicies%
Power Sceme AC Power !C Power
Gome,)ffice -es" None .da!tive
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control "
Power Sceme AC Power !C Power
Portable,2a!to! .da!tive .da!tive
Presentation .da!tive -e#rade
.lways )n None None
Minimal Power Mana#ement .da!tive .da!tive
Ma* 'attery .da!tive -e#rade
!#namic Trottlin$ Polic# !etails
&he !rocessor dynamic throttlin# !olicies used by Windows are e*!lained in more detail below%
NOTE: .ll !olicies will always res!ect the hi#hest available !erformance state currently available
as re!orted in the APPC method by system firmwareC when usin# the .CP( 2%0 interface%
None
&his !olicy always runs the !rocessor at the hi#hest !erformance state currently available% When
usin# this !olicyC the only reason that Windows will lower the !erformance of the !rocessor is in
res!onse to a thermal eventC with the e*ce!tion of the cases noted later in this !a!er in the
section titled Performance State Can$es O%tside te Sco&e of Polic#%
.da!tive
&his !olicy tries to match the !erformance of the !rocessor to current demand% .da!tive will use
all available volta#e,fre?uency @!erformanceB states% .da!tive will lower the !erformance of the
!rocessor to the lowest volta#e,fre?uency state available whenever there is not enou#h demand
on the !rocessor to 9ustify the use of a hi#her state% .da!tive will not utili$e linear sto! cloc"
throttle statesC e*ce!t in res!onse to thermal events%
Constant
&his !olicy always runs the !rocessor in the lowest available volta#e,fre?uency @!erformanceB
state% Constant will not utili$e linear sto! cloc" throttle statesC e*ce!t in res!onse to thermal
events%
-e#rade
&he -e#rade !olicy always runs the !rocessor in the lowest available volta#e,fre?uency
@!erformanceB state% .dditionallyC -e#rade will utili$e linear sto! cloc" throttlin# under the
followin# conditions+
When the battery remainin# ca!acity dro!s below a certain threshold @confi#urable in the
re#istryBC .N-
&he system is not usin# the C3 idle state effectivelyE that isC the system is too busy to
s!end a certain len#th of time @confi#urable in the re#istryB in the C3 state%
&he -e#rade !olicy will never throttle below a minimum levelC also confi#urable in the re#istry%
See the followin# section for details%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control '
Performance State Can$es O%tside te Sco&e of Polic#
&here are several instances where either the "ernel !ower !olicy mana#er or !rocessor driver will
re?uest a !erformance state transition outside the sco!e of the !rocessor dynamic throttlin#
!olicies% &hese include+
(n a thermal eventC where the tem!erature has crossed a !assive tri! !oint @APSIBC the
"ernel thermal throttlin# code will successively use any available lower volta#e,fre?uency
states to cool the system% (f the thermal condition !ersists and all available !erformance
states have been e*haustedC the "ernel will then use linear sto! cloc" throttlin# states%
When enterin# any system slee! state @.CP( S* stateBC the !rocessor driver will first save
the current !erformance stateC and then set the !rocessor to the lowest volta#e,fre?uency
state available !rior to enterin# the system shutdown handler%
When resumin# from any system slee! stateC the "ernel will tem!orarily set the !rocessor
to the hi#hest available !erformance state to ensure fast resume !erformance% )nce the
system has awa"enedC the !erformance state saved !rior to enterin# slee! is restoredC
and the current !rocessor !olicy then ta"es effect%
When the )S is startin# a device that indicates to the )S that transitionin# the device to
the wor"in# state causes a si#nificant start u! inrush current loadC the "ernel !ower
!olicy mana#er will tem!orarily transition the !rocessor to the lowest volta#e,fre?uency
state available until the device has been started% (nrush current seriali$ation
re?uirements are conveyed to the )S via the !resence of theA(5C ob9ect under the
sco!e of the device in the .CP( name s!aceC or if the -)AP)W;5A(N5DSG fla# is set in
the deviceLs driver device ob9ect%
Parameters to P(state &olic#
Several !arameters to Windows !rocessor !erformance state controls are confi#urable via
re#istry "eys% &hese "eys are !rovided with the intent that );Ms and system desi#ners may
tune the !erformance of Windows !rocessor !ower mana#ement features to best suit s!ecific
!latform desi#nsC and allow ad9ustment to hel! achieve ma*imum battery life and reali$e the best
system !erformance%
NOTE: &hese !arameters are statically ad9ustableE that isC they are read once durin# the "ernel
initiali$ation code% .d9ustments made to these values will not ta"e !lace until the ne*t system
reboot%
&he followin# re#istry "eys are found in+
KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Throttle
)e$istr# *e# Name !efa%lt +al%e !escri&tion
Perf&ime-elta Gardware
&ransition 2atency
&his value influences the fre?uency with
which the )S will reevaluate a!!ro!riate
!erformance state in the idle loo!%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control ,
)e$istr# *e# Name !efa%lt +al%e !escri&tion
PerfCritical&ime-elta 300000 @300msB .n a!!lication may use so much of the
CPDLs time that the )S will never enter the
idle loo!% (n order to ma"e sure that we will
increase the !erformance of the CPD in this
situationC the !rocessor !ower !olicy
mana#er sets a timer that will interru!t the
a!!lication% &his value influences the time
that must !ass before the timer will fire%
Perf(ncreasePercentModifier 20 @NB &his value scales the threshold at which the
)S increases the !erformance of the
!rocessor%
Perf(ncrease.bsoluteModifier 8 @NB &his value offsets the threshold at which the
)S increases the !erformance of the
!rocessor%
Perf-ecreasePercentModifier 30 @NB &his value scales the threshold at which the
)S decreases the !erformance of the
!rocessor%
Perf-ecrease.bsoluteModifier 8 @NB &his value offsets the threshold at which the
)S decreases the !erformance of the
!rocessor%
Perf(ncrease&imeIalue 80000 @80msB &his value influences the amount of time that
may !ass before the )S will increase
!erformance% &his time is also influenced by
the !rocessorLs transition latency%
Perf(ncreaseMinimum&ime 800000 @800msB &his value sets a minimum amount of time
that must !ass before any increase in
!erformance will be considered%
Perf-ecrease&imeIalue 80000 @80msB &his value influences the amount of time that
may !ass before the )S will decrease
!erformance% &his time is also influenced by
the !rocessorLs transition latency%
Perf-ecreaseMinimum&ime 000000 @000msB &his value sets a minimum amount of time
that must !ass before any decrease in
!erformance will be considered%
Perf-e#rade&hrottleMinCa!acity 00 @NB &his value sets a minimum !erformance level
that will be used for any reason other than a
thermal condition%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control -
)e$istr# *e# Name !efa%lt +al%e !escri&tion
PerfMa*C3Fre?uency 00 @NB &his value is the threshold at which the )S
will sto! usin# sto!cloc" throttlin# and 9ust
use idle statesE i%e%C if the machine is usin#
the -e#rade !olicy and the battery is lowC the
)S will throttle the CPDC unless the machine
is s!endin# at least this amount of its time in
the .CP( C3 state% (f the machine is
s!endin# at least this amount of time in C3C
then no throttlin# will be doneC unless there is
a thermal condition%
Processor Performance State &ransition 2atency (ssues
Since the launch of WindowsC there have been several !roblem si#htin#s lin"ed to !rocessor
!erformance state transition latencies% &y!icallyC !roblems can arise with DS' audio !laybac"C
video ca!ture or streamin#C and soft audio or soft modem im!lementations% &he !roblems occur
due to e*cessive latency in !erformance state transitions% Since access to main system memory
must be tem!orarily interru!ted durin# the transition to a new !erformance stateC -M. transfers
may suffer from buffer underrun conditionsC causin# bus master a#ents to be starved for data%
;*cessive overhead incurred in le#acy SMM transition routines has been identified as
contributin# to this condition% Microsoft encoura#es system desi#ners to ta"e full advanta#e of
the hi#h !erformance transition characteristics afforded by the MS5 interface available in many
mobile !rocessorsC and wor" with CPD Iendors to reduce !erformance state transition latencies
in system firmware%
Parameters to CState Policy
(n WindowsC all of the !arameters for Cstate !olicy are stored as !art of the data included in
!ower !olicy schemes% ;ach !ower scheme has values for use on both .C @utility !owerB and
-C @batteryB% When the user chooses a !ower scheme in the Power )!tions control !anel
a!!letC new Cstate !olicies are loaded alon# with the rest of the settin#s included in the !ower
scheme%
.ll Cstate !arameters are dynamically ad9ustable in Windows via the .P( e*!osed by
powrprof.dll% .ny chan#es made to these !olicy !arameters will ta"e effect immediatelyC without
re?uirin# a reboot%
&hese !arameters are stored in an array of three P5)C;SS)5AP)W;5AP)2(CMA(NF) data
structures% &his array of structures is a member of the P5)C;SS)5AP)W;5AP)2(CM
structure% &here is one structure for each of the three .CP( !rocessor slee! states defined in
.CP( 8%0b @C8C C2C and C3B%
NOTE: For details on usin# the !ower .P(C refer to the Power Mana#ement section of the
Platform S-6C available at+
htt!+,,msdn%microsoft%com,library,default%as!OurlP,library,en
us,!ower,base,!owerAmana#ement%as!
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control .
Polic# +al%e !escri&tion
&imeChec" -efines the timeC in microsecondsC that must e*!ire
before !romotion or demotion is considered%
-emote2imit -efines the minimum amount of timeC in
microsecondsC that must be s!ent in the idle loo! to
avoid demotion%
Promote2imit -efines the timeC in microsecondsC that must be
e*ceeded to cause !romotion to a dee!er idle state%
-emotePercent &his valueC e*!ressed as a !ercenta#eC scales the
threshold at which the !ower !olicy mana#er
decreases the !erformance of the !rocessor%
PromotePercent &his valueC e*!ressed as a !ercenta#eC scales the
threshold at which the !ower !olicy mana#er
increases the !erformance of the !rocessor%
.llow-emotion When setC allows the "ernel !ower !olicy mana#er to
demote from the current state%
.llowPromotion When setC allows the "ernel !ower !olicy mana#er to
!romote from the current state%
C(State Control )e$istr# *e#
(n order to better utili$e the !ower savin#s ty!ically offered by the C3 stateC Microsoft Windows
em!loys a more a##ressive C3 entry al#orithm than did Windows 2000% &his more a##ressive
use of C3 has caused stability issues with a very small subset of la!to! com!uters% .dditionallyC
there are some systems that may have "nown !latformlevel !roblems when attem!tin# to use C
states%
&o facilitate control of the use of CstatesC Windows !rovides the followin# re#istry "ey%
NOTE: &his re#istry "ey is statically ad9ustableE that isC it is read once durin# the !rocessor driver
initiali$ation code% .d9ustments made to this value will not ta"e !lace until the ne*t system
reboot%
NOTE: &his "ey does not a!!ly to Cstates described usin# the .CP( 2%0 ACS& ob9ect%
&he Cstate re#istry "ey is+
KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Processor\CStateFlags
)e$istr# *e# Name /it +al%e !escri&tion
CStateFla#s+5;:A-W)5- 'it 0 Not Dsed
'it 8 When setC C2 is disabled
'it 2 When setC C3 is disabled
'it 3 When setC enables Windows 2000 C3 behavior
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 01
Dsin# ACS& to -escribe CStates
.CP( 2%0 introduced the ACS& ob9ect as an alternative and e*!ansion to the Cstate descri!tion
methods in .CP( 8%0b% For detailsC refer to the .CP( 2%0 s!ecificationC section 4%3%2% Windows
XP and the Windows Server 2003 family both su!!ort the .CP( 2%0 ACS& ob9ect% When usin#
states mar"ed in the ACS& as havin# the same CS&.&;A&MP;C Windows will always choose the
state indicatin# the lowest !ower consum!tion%
'()S Gandoff to )!eratin# System Control
(t may be necessary or desirable to have the '()S control Cstate transitions immediately after
the system bootsC or in the absence of an o!eratin# system ca!able of controllin# Cstates% )nce
an o!eratin# system ca!able of controllin# Cstate transitions has loaded the '()S must
relin?uish control of Cstates to the )S% &o facilitate this e*chan#e of control between system
firmware and the )SC .CP( 2%0 defines the CS&ACN& field in byte offset 70 of the Fi*ed .CP(
-escri!tion &able @F.-&B%
NOTE: 'yte offset 70 was reserved in .CP( 8%0b%
-urin# the !rocessor driver initiali$ation !haseC if CS&ACN& is non$eroC the !rocessor driver will
write the value !resent in the CS&ACN& field to the SM(ACM- !ort to assume control of Cstate
transitions from the '()S%
&his is the only modification needed to the F.-& to su!!ort Cstate control%
NOTE: &he F.-& revision field should not be set e?ual 3C because it is not an .CP( 2%0 tableE it
is still an .CP( 8%0b table with a reserved field used%
(m!lementin# Processor Performance Control for
Windows
&he followin# sections outline the im!lementation details re?uired in system firmware to !ro!erly
su!!ort and utili$e native !rocessor !erformance controls in Windows and the Windows
Server 2003 family%
Su!!ort usin# .CP( 2%0 Processor )b9ects
(n addition to su!!ortin# .CP( 8%0bC Windows utili$es some of the !rocessor ob9ects defined in
section 4%3%3 of the .CP( 2%0 s!ecification% &he ob9ects were defined in .CP( 2%0 to allow
!rocessor !erformance control switchin# by the o!eratin# system without additional '()S
su!!ort% &he .CP( 2%0 !rocessor ob9ects su!!orted by Windows include+
APSS Q Performance Su!!orted States
APC& Q Performance Control
APPC Q Performance Present Ca!abilities
ACS& Q C States
&he AP&C ob9ect is not su!!orted in Windows or the Windows Server 2003 family%
NOTE: &he Windows and Windows Server 2003 o!eratin# systems do not su!!ort all of the .CP(
2%0 s!ecification%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 00
ACP2 231 Processor Ob4ects !esi$n 5%idelines for Windows
When addin# the .CP( 2%0 !rocessor ob9ects to your .CP( 8%0b '()SC !lace !rocessor ob9ects in
the !rocessor ob9ectLs ob9ect list under the RAP5 sco!e% &he ob9ect list should include+
APC&
APSS
APPC
ACS& @o!tionalB
)ther than locationC use the ob9ects e*actly as defined in the .CP( 2%0 s!ecification%
'()S Gandoff to )!eratin# System Control
(t may be necessary or desirable to have the '()S control !erformance state transitions
immediately after the system bootsC or in the absence of a !erformance state controlaware
o!eratin# system% )nce an o!eratin# system ca!able of controllin# !rocessor !erformance state
transitions has loaded the '()S must relin?uish control of !rocessor !erformance states to the
)S% &o facilitate this e*chan#e of control between system firmware and the )SC .CP( 2%0 defines
the PS&.&;ACN& field in byte offset 00 of the Fi*ed .CP( -escri!tion &able @F.-&B%
NOTE: 'yte offset 00 was reserved in .CP( 8%0b%
-urin# the !rocessor driver initiali$ation !haseC if PS&.&;ACN& is non$eroC the !rocessor driver
will write the value !resent in the PS&.&;ACN& field to the SM(ACM- !ort to assume control of
!rocessor !erformance state transitions from the '()S%
&his is the only modification needed to the F.-& to su!!ort !rocessor !erformance state control%
NOTE: &he F.-& revision field should not be set e?ual 3C because it is not an .CP( 2%0 tableE it
is still an .CP( 8%0b table with a reserved field used%
Codin# the APC&
&he APC& is defined in the .CP( 2%0 s!ecification to use the :eneric 5e#ister -escri!tor% &he
.S2 macro for the :eneric 5e#ister -escri!tor is not im!lemented in any of the current Microsoft
.S2 assemblersC dictatin# that the .S2 code for APC& #enerate the data%
&he followin# sam!le illustrates a APC& that returns the data in the :eneric 5e#ister -escri!tor
format%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 02
Nae !_PCT" Pac#age !$% && Per'orance Control O()ect
*
&& +esourceTe,late !% *+egister!S-steIO" ." /" /01$%2 && Control
1u''er !% *
/0.$" && 1/34eneric +egister 5escri,tor !section 678797:%
/0C"/" && 1;<$3length !'ro _ASI thru _A5+ 'iel=s%
;" && 193A==ress s,ace I5" _ASI" S-steIO
." && 183+egister 1it >i=th" _+1>
/" && 1?3+egister 1it O''set" _+1O
/" && 163+eser@e=
/01$"/"/"/"/"/"/"/" && 1:<;83register a==ress" _A5+ !68(its%
/0:A"/2" && 1;?<;63En= Tag !section 6787$7.%
&& +esourceTe,late !% *+egister!S-steIO" ." /" /019%2 && Status
1u''er !% *
/0.$" && 1/34eneric +egister 5escri,tor !section 678797:%
/0C"/" && 1;<$3length !$ (-tes%
;" && 193A==ress s,ace I5" _ASI" S-steIO
." && 183+egister 1it >i=th" _+1>
/" && 1?3+egister 1it O''set" _+1O
/" && 163+eser@e=
/019"/"/"/"/"/"/"/" && 1:<;83register a==ress" _A5+ !68(its%
/0:A"/2" && 1;?<;63En= Tag !section 6787$7.%
2% && En= o' _PCT o()ect
Codin# the APPC
When codin# APPCC !lease note that Windows im!lements an ada!tive !erformance control
!olicy to ta"e advanta#e of the hi#her!erformance states when CPD utili$ation is hi#h%
2m&ortant: 2f a s#stem can s%&&ort te i$er &erformance states wen on batter#6 do not
re&ort in 7PPC tat onl# te lower &ower states are s%&&orted3 Windows will always use the
evaluated value of APPC to determine the number of !erformance states currently available%
Su!!ortin# Systems with (ntel S!eedSte! and ;nhanced
S!eedSte! &echnolo#y
Windows can su!!ort (ntel S!eedSte! usin# the le#acy S!eedSte! a!!let interface or the .CP(
2%0 !rocessor !erformance ob9ects% System desi#ners should observe the followin# #uidelines+
Systems based on the //0'X chi!set should use the le#acy a!!let interface
.ll other !latforms should describe !rocessor !erformance states usin# the .CP( 2%0
ob9ects
S%&&ortin$ 2ntel S&eedSte& Tecnolo$# %sin$ ACP2 231 Ob4ects
(CGbased based systems should use the .CP( 2%0 !rocessor !erformance control ob9ects to
describe the !erformance states and control data% For !erformance state switchin# on current
(CGbased systemsC Windows uses a SM( interface similar to the (ntel S!eedSte! a!!let SM(
interface% GoweverC the !orts and data values will now be defined usin# the !rocessor
!erformance control ob9ects as defined in .CP( 2%0%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 03
NOTE: (t is hi#hly recommended to follow the (ntel '()S writers #uide for the chi!set in the
system when im!lementin# the SM( interface%
;*am!le .S2 for (CGbased Systems
Sco,e!\_P+%
*
Processor!CPB/" && A uniCue nae gi@en to each ,rocessor
/0//" && A uniCue I5 gi@en to each ,rocessor
/0;/;/" && ACPI P_1LK a==ress D ACPI1ASE E ;/
/0/6% && ICH has a P_1LK length o' 6 (-tes7
*
Nae!_PCT" Pac#age!%
*
&& return a _PCT containing I&O a,,e=
&& STATBS&CONT+OL registers
%2
Nae !_PSS" Pac#age!%
*
&& State /
Pac#age!%*:?/" $$///" $?/" $//" /0.9" /0//2"
&& State ;
Pac#age!%*6//" ;////" $?/" $//" /0.8" /0/;2
2%
Metho= !_PPC" /%
*
&& This routine shoul= re'lect
&& the ca,a(ilities
&& o' the ,lat'or7 I' all states can (e
&& utiliFe=" alGa-s re,ort /
I' !ACON%
*
+eturn!/% && All states a@aila(le
2
Else
*
+eturn!;% && Onl- state one a@aila(le
2
2
2
2 && En= _P+
F.-& PS&.&;ACN& Ialue
&o allow the o!eratin# system to assume control of !erformance state transitions from the '()SC
!rovide the !ro!er control value in the PS&.&;ACN& field of the Fi*ed .CP( -escri!tion &able
@F.-&B at byte offset 00% .s described in the (ntel '()S WriterLs :uideC this value should be set
to 40h to disable the S!eedSte! .!!let interface%
&he F.-& revision field should not be set to 3%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 04
S%&&ortin$ Enanced 2ntel S&eedSte& Tecnolo$#
(ntel has recently announced the latest version of ;nhanced (ntel S!eedSte! &echnolo#yC which
will first be su!!orted on (ntelSs ne*t#eneration mobile architectureC codenamed anias%
;nhanced (ntel S!eedSte! &echnolo#y will be su!!orted on Windows XP as follows+
Windows XP build 5&M @build 2100B will su!!ort ;nhanced (ntel S!eedSte! &echnolo#y
usin# the #eneric !rocessor driverC processr.sys usin# a APC& with an (,) s!ace address%
-ue to an erattaC the gv!.sys driver can not be !ro!erly detected and installed on
Windows XP 5&M%
Windows XP SP8 will su!!ort ;nhanced (ntel S!eedSte! &echnolo#y via the !rocessor
driver gv!.sys usin# a APC& with an FFG address% NOTE: gv!.sys is not included in
Windows XP SP8C but will be made available to );Ms via a TF;C and !laced on
Windows D!date% SP8 systems that do not have the #v3%sys driver will be su!!orted byC
!rocessr%sysC usin# a APC& with an (,) s!ace address%
);Ms wishin# to include gv!.sys in their factory !reload ima#e on systems which use ;nhanced
(ntel S!eedSte! &echnolo#y should contact their Microsoft &echnical .ccount Mana#er%
28PO)TANT: &he gv!.sys driver will only su!!ort a APC& of ty!e 0*3F @Functionally Fi*ed
GardwareB% &his allows the driver to invo"e !erformance state transitions usin# the ;nhanced
(ntel S!eedSte! &echnolo#y MS5 interface directlyC ne#atin# the need for a '()S SMM handler
and avoidin# the !erformance !enalty associated with this a!!roach @see the !recedin# section
titled JProcessor Performance State &ransition 2atency (ssuesKB% No su!!ort for (,) ma!!ed
control re#isters is !rovided%
;nhanced (ntel S!eedSte! &echnolo#y '()S 5e?uirements
&o fully and seamlessly su!!ort ;nhanced (ntel S!eedSte! &echnolo#y on !latforms that may run
several versions of the Windows o!eratin# system and still ta"e advanta#e of the fast transition
!erformance offered by ;nhanced (ntel S!eedSte! &echnolo#yC it is necessary for the system
firmware to switch between !resentin# le#acy (,) ma!!ed control,status re#isters and MS5
interfaces described usin# FFGC based on the !resence of a system driver that can ta"e
advanta#e of the MS5 interface%
&o facilitate this interface switchC Microsoft has !ro!osed a new .CP( control method for inclusion
in the ne*t iteration of the .CP( s!ecification% &his methodC AP-C or Processor -river
Ca!abilitiesC allows !latform firmware to accurately determine the !resence of a !rocessor driver
that su!!orts a s!ecific !rocessor feature set%
Dsin# the AP-C Method
NOTE: For a com!lete definition of AP-CC refer to .!!endi* . at the end of this white !a!er%
AP-C is #uaranteed to be evaluated by the !rocessor driver !rior to its evaluatin# any other
!rocessor ob9ects% AP-C ta"es an ar#ument containin# one or more ca!abilities -W)5-S%
;ach bit in the ca!abilities -W)5- is a fla# that is intended to re!resent a feature su!!orted by
the !rocessor driver% &hese bits are defined by the CPD manufacturer% &he !rocessor driver will
set the ca!abilities -W)5- to reflect the features it su!!orts% Dsin# AP-CC the system firmware
can modify the APSS and APC& based on the !resence of a !rocessor driver that can correctly
su!!ort each interface%
AP-C is intended to be used as follows% 'y defaultC the '()S describes the APC& and APSS
usin# (,) ma!!ed control and status re#isters% (f no !rocessor driver evaluates AP-CC or the
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 0"
'()S does not reco#ni$e the ca!abilities fla#@sB !assed in when AP-C is evaluatedC the '()S
ta"es no additional actionC and !rocessor !erformance states are controlled usin# (,) ma!!ed
re#isters% (f the !rocessor driver !asses the correct fla#@sB into AP-CC the '()S reconfi#ures the
APC& and APSS to use Functional Fi*ed Gardware @FFGBC and the driver invo"es transitions
usin# FFG%
'y im!lementin# AP-CC system desi#ners can be assured end users will always benefit from
havin# !rocessor !erformance controls function correctly on all su!!orted versions of Windows
o!eratin# systems across all u!#rade and clean install scenariosC while still ta"in# full advanta#e
of the #reatly enhanced transition !erformance afforded by ;nhanced (ntel S!eedSte!
&echnolo#y%
;*am!le .S2 for ;nhanced (ntel S!eedSte! &echnolo#y and AP-C
&&
&& TYPE stores the t-,e o' inter'ace ,resent !I&O or FFH%7
&&
Nae!TYPE" /% && =e'ault to using I&O i' _P5C is ne@er e@aluate=
&&
&& P5C+ hol=s the e0,ecte= re@ision o' the ,rocessor =ri@er ca,a(ilit-
&& structure7
&&
Nae!P5C+" ;%
&&
&& P5CM hol=s a as# that is a,,lie= to the contents o' the ,rocessor
&& =ri@er ca,a(ilit- structure Ghen =eterining Ghether FFH is su,,orte=7
&&
Nae!P5CM" /0/;% && (it / D ; 'or 4H9
Metho=!_P5C" ;%
*
&&
&& Co,ute the siFe o' the in,ut (u''er !in (-tes% an= store it
&& in Local/7
&&
Store!SiFeO'!Arg/%" Local/%
&&
&& 5eclare a local co,- o' the ,rocessor =ri@er ca,a(ilit- (u''er
&& an= co,- Arg/ into it7
&&
Nae!P5C1" 1u''er!Local/% *2%
Store!Arg/" P5C1%
&&
&& Point +EH an= SIIE to the 'irst an= secon= 5>O+5s in the (u''er7
&& These 5>O+5s =e'ine the re@ision o' the structure an= the nu(er
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 0'
&& o' ca,a(ilities 5>O+5s" res,ecti@el-7
&&
Create5>or=Fiel=!P5C1" /" +EH%
Create5>or=Fiel=!P5C1" 8" SIIE%
&&
&& E0it i' this is an unsu,,orte= re@ision o' the ca,a(ilities
&& structure7
&&
I'!LNotECual!+EH" P5C+%%
*
+eturn
2
&&
&& E0it i' the 'irst ca,a(ilities 5>O+5 isnJt ,resent7
&&
I'!LLess!SIIE" ;%%
*
+eturn
2
&&
&& Point 5AT/ at the 'irst ca,a(ilities 5>O+5 in the structure7
&&
Create5>or=Fiel=!P5C1" ." 5AT/%
&&
&& I' (it / in P5CM is set in the ca,a(ilities 5>O+5"
&& then transition to FFH (ase= ,er'orance control7
&&
I'!An=!5AT/" P5CM%%
*
Store!;" TYPE%
2
2
Metho=!_PTC%
*
I'!LECual!TYPE" /%%
*
&&
&& +eturn I&O a,,e= _PTC7
&&
+eturn!
Pac#age!%
*
2%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 0,
2
Else
*
&&
&& +eturn FFH a,,e= _PTC7
&&
+eturn!
Pac#age!%
*
2%
2
2
Metho=!_PSS%
*
I'!LECual!TYPE" /%%
*
&&
&& +eturn I&O a,,e= _PSS7
&&
+eturn!
Pac#age!%
*
2%
2
Else
*
&&
&& +eturn FFH a,,e= _PSS7
&&
+eturn!
Pac#age!%
*
2%
2
2
F.-& ;ntries
Provide the control value in the PS&.&;ACN& field of the Fi*ed .CP( -escri!tion &able @F.-&B at
byte offset 00% &his non$ero value will be written for Windows XP to assume control of
!erformance states% &his value should be 40h to disable the S!eedSte! .!!let interface as
described in the (ntel '()S WriterLs :uide%
&he F.-& revision field should not be set to 3%
2e#acy Su!!ort and D!#rade Scenarios
&o ensure the best end user e*!erience on all su!!orted Windows o!eratin# systemsC );Ms and
system desi#ners must carefully !lan and im!lement firmware su!!ort for systems su!!ortin# the
latest ;nhanced (ntel S!eedSte! &echnolo#y% (t is im!ortant to understand the !ossible
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 0-
ramifications and limitations involved with various desi#n a!!roaches% &o circumvent unforeseen
issues and !rovide the best end user e*!erienceC desi#ners should be aware of the followin#
facts+
.!!lets that control !rocessor !erformance states on Windows 2000 will be removed or
disabled u!on u!#rade to Windows XP%
Windows XP 5&M @build 2100B will not be able to install and run gv!.sys%
Windows XP SP8 or later is ca!able of installin# and runnin# the gv!.sys driverC if
ac?uired by the end user from Windows D!dateC or when su!!lied by the );M in their
)S software !reload ima#e%
Windows XP 5&M @build 2100B can su!!ort ;nhanced (ntel S!eedSte! &echnolo#y usin#
the #eneric processr.sys driver if system firmware im!lements an (,) based APC& and
APSS% )n systems that im!lement the APC& and APSS usin# only the FFG interfaceC
!rocessor !erformance state control will not function%
&he gv!.sys driver only su!!orts the FFG interface re!orted in the APC& and APSS% )n
systems the re!ort only the (,) ma!!ed interface with gv!.sys installedC !rocessor
!erformance state control will not function%
. system runnin# Windows XP 5&M with processr.sys that is later u!#raded to Windows
XP SP8 or subse?uent versions is ca!able of runnin# the gv!.sys driver if installedC andC
if the system firmware re!orts only the (,) ma!!ed interfaceC !rocessor !erformance
control will not function%
:ettin# Gel! with ;nhanced (ntel S!eedSte! &echnolo#y (m!lementations
For assistance with ?uestions or issues re#ardin# details on su!!ortin# ;nhanced (ntel
S!eedSte! &echnolo#y on Windows !latformsC you may contact Microsoft at+
aslhel!Umicrosoft%com
S%&&ortin$ te 2ntel S&eedSte& 9e$ac# A&&let 2nterface
For systems that were develo!ed and shi!!ed before the Windows XP releaseC and for all
//0'Xbased systemsC !erformance switchin# will be done throu#h the le#acy a!!let interface%
Windows uses the (N&80G,.XP;740h interface defined in the JMobile Pentium ((( Processor
Featurin# (ntel S!eedSte! &echnolo#y '()S Writers :uideK to obtain the Command -ata Ialue
and the Command Port .ddress%
2m&ortant: Windows uses the same !erformance state switchin# mechanisms throu#h the SM(
!ort as the (ntel S!eedSte! a!!let to do !erformance switchin#% For systems that im!lement the
recommendations set forth in the JMobile Pentium ((( Processor Featurin# (ntel S!eedSte!
&echnolo#y '()S Writers :uideCK the Command -ata Ialue should e?ual 42h @the .!!let CM-
valueB% &he Command Port .ddress should e?ual '2h% Native Windows !rocessor !erformance
control will not automatically be enabled on systems that use the le#acy a!!let interface unless
the re#istry modifications e*!lained in the ne*t section are im!lemented% &he re#istry entries will
be re?uired for all systems usin# the le#acy a!!let interface that carry the J-esi#ned for Windows
XPK lo#o% Dnder the lo#o re?uirementsC systems must use only the native Windows !rocessor
!erformance control% &he (ntel S!eedSte! .!!let cannot be used on systems shi!!in# Windows%
;nablin# Native Performance Control
For systems that use the le#acy a!!let interfaceC !erformance control must be enabled throu#h a
re#istry "ey% &he re#istry "ey used enable the le#acy (ntel S!eedSte! a!!let interface is+
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 0.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\Hac#Flags
Hac#Flags =e'initions< 1it / < Bse S,ee=Ste, A,,let inter'ace
1it ; < +eser@e=
1it $ < S-ste can su,,ort all o=es Ghen
running on (atter-
1it 939; < +eser@e=
NOTE: .ll re#istry "ey values listed are -W)5- values%
)verridin# Command Ialues via the 5e#istry
For systems shi!!ed with wron# values in the (N&80,;740 or without the (N&80,;740C the
command values can be entered throu#h re#istry "eys% &he re#istry "eys used to override
(N&80,;740 values or re!ort none*istent values are+
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\Hac#Flags
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\SiC=PortDDSMI C=
5ata Port
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\SiC=5ataDDSMI C=
5ata Halue
For systems followin# the JMobile Pentium ((( Processor Featurin# (ntel S!eedSte! &echnolo#y
'()S WriterLs :uideCK the entries will be+
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\Hac#FlagsDD/0;
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\SiC=PortDD/0($
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\SiC=5ataDD/0.$
5e#istry entry for a system that can only run the hi#hest !erformance state on .C would be+
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\Hac#FlagsDD/0;
5e#istry entry for a system that can su!!ort all !erformance states on battery would be+
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Ser@ices\P9\Paraeters\Hac#FlagsDD/0?
.fter this re#istry "ey entry is madeC Windows will assume !rocessor !erformance control u!on
ne*t boot%
Su!!ortin# Systems with .M- PowerNow< &echnolo#y
Windows and the Windows Server 2003 family su!!ort !rocessor !erformance control on both
.M- 61,2= and 63 PowerNow<ca!able !rocessors% &he 61,2= im!lementation uses the SM(
interface and '()S descri!tion table to read ca!abilities% &he 63 is only su!!orted via the .CP(
2%0 ob9ects% )nce !rocessor ca!abilities are determinedC Windows will !erform all !erformance
state control directlyC with no additional su!!ort needed from the system '()S%
2m&lementin$ for te *':2;
&he 61,2= !rocessor driver in Windows uses the SM( interface and the :emini '()S -escri!tor
&able @:'-&B as defined in the J:emini SM( .P( S!ecification version 0%40KC available from .M-%
&he SM( interface is used to ?uery the !rocessors ca!abilities% (f the !rocessor is 61 PowerNow<
enabledC the driver will then locate the :'-& and read the !erformance states su!!orted and
control values associated with each state in the system%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 21
2m&lementin$ for te *,
Windows re?uires the .CP( 2%0 ob9ects for systems with 63 PowerNow< !rocessors% &he
im!lementation is strai#htforward and documented in detail by .M- in the J'()S Su!!ort for
Windows Processor -river .!!lication Note 5evision 8%0/%K &he mechanism for control and
status of the 63 PowerNow< !rocessors are defined in Model S!ecific 5e#isters @MS5sB% &his
dictates that when definin# the APC& in the names!ace use the Functional Fi*ed Gardware
@FFi*edGWB address ty!e%
Codin# the APC&
&his is a sam!le APC& for FFi*edGW as described in the .CP( 2%0 s!ecificationC which returns
the data in the :eneric 5e#ister -escri!tor format%
Nae !_PCT" Pac#age !$% && Per'orance Control O()ect
*
&& +esourceTe,late !% *+egister!FFi0e=H>" /" /" /%2 && Control
1u''er !% *
/0.$" && 1/34eneric +egister 5escri,tor!section678797:%
/0C"/" && 1;<$3length !'ro _ASI thru _A5+ 'iel=s%
/0:F" && 193A==ress s,ace I5" _FFi0e=H>
." && 183+egister 1it >i=th" _+1>
/" && 1?3+egister 1it O''set" _+1O
/" && 163+eser@e=
/0/"/"/"/"/"/"/"/" && 1:<;83register a==ress" _A5+ !68(its%
/0:A"/2" && 1;?<;63En= Tag !section 6787$7.%
&& +esourceTe,late !% *+egister!FFi0e=H>" /" /" /%2 && Status
1u''er !% *
/0.$" && 1/34eneric +egister 5escri,tor!section678797:%
/0C"/" && 1;<$3length !$ (-tes%
/0:F" && 193A==ress s,ace I5" _FFi0e=H>
." && 183+egister 1it >i=th" _+1>
/" && 1?3+egister 1it O''set" _+1O
/" && 163+eser@e=
/0/"/"/"/"/"/"/"/" && 1:<;83register a==ress" _A5+ !68(its%
/0:A"/2" && 1;?<;63En= Tag !section 6787$7.%
2% && En= o' _PCT o()ect
Su!!ortin# Systems with &ransmeta 2on#5un &echnolo#y
Windows su!!orts !rocessor !erformance control on &ransmeta Crusoe !rocessors with
&ransmeta 2on#5un Power Mana#ement technolo#y% &he Crusoe is su!!orted throu#h the .CP(
2%0 !rocessor ob9ects% .fter Windows determines !rocessor ca!abilitiesC it will !erform all Pstate
control directly with no su!!ort needed from the system '()S%
For details about im!lementin# the APSS method for Crusoe !rocessorsC contact your &ransmeta
technical sales re!resentative for the a!!ro!riate &ransmeta documents and collateral material%
Codin# the APC&
&he followin# code shows a sam!le APC& method for FFi*edGW as described in the .CP( 2%0
s!ecification% &his method returns the data in the :eneric 5e#ister -escri!tor format%
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 20
Nae !_PCT" Pac#age !$% && Per'orance Control O()ect
*
&& +esourceTe,late !% *+egister!FFi0e=H>" /" /" /%2 && Control
1u''er !% *
/0.$" && 1/34eneric +egister 5escri,tor!section678797:%
/0C"/" && 1;<$3length !'ro _ASI thru _A5+ 'iel=s%
/0:F" && 193A==ress s,ace I5" _FFi0e=H>
." && 183+egister 1it >i=th" _+1>
/" && 1?3+egister 1it O''set" _+1O
/" && 163+eser@e=
/0/"/"/"/"/"/"/"/" && 1:<;83register a==ress" _A5+ !68(its%
/0:A"/2" && 1;?<;63En= Tag !section 6787$7.%
&& +esourceTe,late !% *+egister!FFi0e=H>" /" /" /%2 && Status
1u''er !% *
/0.$" && 1/34eneric +egister 5escri,tor !section 678797:%
/0C"/" && 1;<$3length !$ (-tes%
/0:F" && 193A==ress s,ace I5" _FFi0e=H>
." && 183+egister 1it >i=th" _+1>
/" && 1?3+egister 1it O''set" _+1O
/" && 163+eser@e=
/0/"/"/"/"/"/"/"/" && 1:<;83register a==ress" _A5+ !68 (its%
/0:A"/2" && 1;?<;63En= Tag !section 6787$7.%
2% && En= o' _PCT o()ect
>-esi#ned for Windows XP> 2o#o Pro#ram
5e?uirements
5e?uirements for the Windows 2o#o Pro#ram for hardware that a!!ly s!ecifically for systems or
!eri!herals that will receive the >-esi#ned for Windows Whistler> are defined in Microsoft
"indows #ogo $rogram %ystem and &evice 'e()irements, *ersion 2.0C
available on the web site at htt!+,,www%microsoft%com,winlo#o,hardware
From Microsoft "indows #ogo $rogram %ystem and &evice 'e()irements, *ersion 2.0+
Windows <P: Systems im!lementin# !rocessor !erformance states must use native
Windows su!!ort% &his means that all !erformance !olicy and switchin# must be done by the
o!eratin# system%
Call &o .ction
-esi#n mobile systems to ta"e advanta#e of advanced !rocessor !ower mana#ement
technolo#ies such as !rocessor !erformance state controls%
Wor" to reduce !erformance state transition latencies%
5eferences
For information about im!lementin# .CP( !rocessor !erformance ob9ects as described in this
!a!erC see the .dvanced Confi#uration and Power (nterface S!ecification version 2%0C available
at+
htt!+,,www%ac!i%info,inde*%html
2001- 2002 Microsoft Corporation. All rights reserved.
Windows Native Processor Performance Control 22
Contact the !rocessor manufacturer to obtain co!ies of the '()S writerLs #uides mentioned in this
!a!er+
Mobile Pentium ((( Processor Featurin# (ntel S!eedSte! &echnolo#y '()S Writers :uideC
available from (ntel
:eyserville ((( '()S Portin# :uideC available from (ntel
:emini SM( .P( S!ecification version 0%40C available from .M-
'()S Su!!ort for Windows XP Processor -river .!!lication NoteC Publication (dentification
Number+ 2/323.C 5ev 8%0/C available from .M-
.!!endi* .
Processor -river Ca!abilities Method @AP-CB -efinition
&he !ro!osed AP-C method is to be defined as follows%
This optional object is a method that is used by OSPM to communicate to the platform the level of
support currently provided by OSPM for processor power management. This object is a child object
of the processor device it is describing. This method will be evaluated by OSPM prior to evaluating
any other processor power management objects containing configuration information.
The intent of this method is to provide OSPM a mechanism in which to convey to the platform the
capabilities supported by OSPM for processor power management. This allows the platform to
modify the AP! namespace objects containing configuration information for processor power
management based on the level of support currently provided by OSPM. "sing this method
provides a mechanism for O#Ms to provide support for new technologies on legacy OSs$ while also
allowing OSPM to leverage new technologies on platforms capable of supporting them.
Arguments%
Arg& 'buffer(%
)*O+) &% +evision !d
)*O+) ,% -umber of capabilities )*O+)s in buffer
)*O+) ./n% apabilities )*O+)s$ where each bit defines capabilities and features
supported by the OSPM for processor power management.
The definitions and meaning of each capabilities bit is vendor specific$ and shared with OSPM by
the vendor.
+esult ode%
-one
2001- 2002 Microsoft Corporation. All rights reserved.

S-ar putea să vă placă și