T-state

T-state

1. Overview

 

CPU在C0状态下有两种手段降低功耗的方法,其一是之前介绍过的P-state,另一个就是T-state。T-sate全称就是Processor Throttling(节流) States,它为OSPM提供了一种通过降低Processor Performance进而降低系统负载和温度的能力,听上去可能和P-state很像,其实是有区别的,P-state通过调整CPU VID电压进而影响CPU的工作频率的方式调整系统系能,而T-state则是通过调整单位时间内CPU Clock On /(Clock On + Clock Off)的时间(也即Clock On工作占整个CPU工作时间的占空比)的方式 ,影响系统的功耗和温度。

 

2. T-state Control

 

1)        MSR Based Control

 

BIOS可以通过IA32_CLOCK_MODULATION去Enable/Disable clock modulation,而且也可以通过该register的bit0:3 设置CPU Clock Duty Cycle。当FFH在_PTC中被使用时,OSPM就会使用MSR IA32_CLOCK_MODULATION做T-state的转换。

 

2)        I/O Based Control

 

除了基于MSR的Clock Modulation,新的CPU也支持IO emulation 的Clock Modulation如果系统没有宣告 _PTC,则OSPM将会使用SystemIO 的方式支持Clock Modulation,OSPM将会通过PROC_CNT register bit4:0做T-state的转换。

 

3)        ACPI Structure For P-state

l  _PTC

 

Processor Throttling Control,该method用于告知OSPM使SystemIo还是MSR的方式调整 Clock Modulation的方式。它的格式如下所示:

 

Name (_PTC, Package()

{

    ResourceTemplate(){Throttling_Control_Register},    //Generic Register Descriptor

    ResourceTemplate(){Throttling_Status_Register}   //Generic Register Descriptor

}) // End of _PTC

 

下述是一个sample code:

 

           //

              // T-State Control/Status interface

              //

              Method(_PTC, 0)

              {

                     //

                     // IF OSPM is capable of direct access to MSR

                     //    Report MSR interface

                     // ELSE

                     //    Report I/O interface

                     //

                     //  PDCx[2] = OSPM is capable of direct access to On

                     //            Demand throttling MSR

                     //

                     If(And(PDC0, 0x0004)) {

                            Return(Package() {

                                   ResourceTemplate(){Register(FFixedHW, 0, 0, 0)},

                                   ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}

                            })

                     }

                     Return(Package() {

                            ResourceTemplate(){Register(SystemIO, 4, 1, 0x410)},

                            ResourceTemplate(){Register(SystemIO, 4, 1, 0x410)}

                     })

              }            

      

l  _TSS

 

Throttling Supported States用于告知OSPM该平台所支持的所有的T-sates,格式如下所示:

Name (_TSS, Package()

{       // Field Name                      Field Type

 

    Package ()                              // Throttle State 0 Definition – T0

    { 

        FreqPercentageOfMaximum,          // DWordConst

        Power,                              // DWordConst

        TransitionLatency,                 // DWordConst

        Control,                           // DWordConst

        Status                              // DWordConst

},

……

}

       Example code 如下所示:

       Method(_TSS, 0)

       {     

Package(){100, 1000, 0, 0x00, 0},

                     Package(){ 88,  875, 0, 0x1E, 0},

                     Package(){ 75,  750, 0, 0x1C, 0},

                     Package(){ 63,  625, 0, 0x1A, 0},

                     Package(){ 50,  500, 0, 0x18, 0},

                     Package(){ 38,  375, 0, 0x16, 0},

                     Package(){ 25,  250, 0, 0x14, 0},

                     Package(){ 13,  125, 0, 0x12, 0}   

}

      

l  _TPC

 

Throttling Present Capabilities,用于动态的通知OSPM该平台所支持的T-states,0表示支持所有的T-state,1表示支持[1,n],2表示支持[2,n]依此类推。为支持动态通知OSPM,当某些条件满足时可以通过通知Processor Object 0x82的方式促使OSPM重新评估_TPC。

 

l  _TSD

 

T-state Dependency用于告知OSPM 该平台的logical processor之间的依赖信息,简单来讲就是当其中的一个核进入某一级的T-state,其它的核需要进行的动作等,下述是sample code:

 

Name (_TSD, Package()

        {

            Package(){5, 0, 0, 0xFD, 2}       // 5 entries, Revision 0, Domain 0, OSPM

Coordinate, 2 Procs

        }) // End of _TSD object

 

REFF:

1.  ACPI Spec 3.0

2.  Intel Processor vendor-Specific ACPI

 

 

That’s all!

 

Peter

 

2010/10/01

分享到: 

你可能感兴趣的:(T-state)