tz.asl

来自「award bios 源代码,喜欢汇编程序及想研究主板BIOS程序的人可以参考哦」· ASL 代码 · 共 88 行

ASL
88
字号

OperationRegion(TEMM, SystemMemory, 0x000ff810, 0x0A)
Field(TEMM, WordAcc, NoLock, Preserve) {
TP1H, 16,
TP1L, 16,
TP2H, 16,
TP2L, 16,
TRPC, 16,
}

Name(TVAR, buffer(){
                00,			// Default policy to active
                00,
                00,
                00,
                00,
        }) 	   		// Thermal variables and flag
CreateByteField(TVAR, 0, PLCY)          // Default policy to active
CreateWordField(TVAR, 1, CTOS)          // Current Tos = 41.0c
CreateWordField(TVAR, 3, CTHY)          // Current Thyst = 38.0c
Store (TP1H , CTOS)
Store (TP1L , CTHY)

Name(TBUF, buffer() {0, 0, 0, 0})
CreateByteField(TBUF, 0x00, DB00)
CreateByteField(TBUF, 0x01, DB01)
CreateWordField(TBUF, 0x00, DW00)
CreateWordField(TBUF, 0x02, DW01)
CreateDWordField(TBUF, 0x00, DATD)

Include("sensor.asl")

Include("smbhost.asl")

Scope(\_TZ) {



        ThermalZone(THRM) {
                Method(_AC0) {  
                        If(Or(PLCY, PLCY, Local7)) { 	// Passive policy
                                Return(TP2H)}
                        Else {                  	// Active policy
                                Return(TP1H)}
                } 					// Method(_AC0)   

                Name(_PSL, Package(){\_PR.CPU0})
                Name(_TSP, 60)          	// Sampling period 6 seconds
                Name(_TC1, 4)
                Name(_TC2, 3)
                Method(_PSV) {
                        If(Or(PLCY, PLCY, Local7)) { // Passive policy
                                Return(TP1H)}
                        Else {                  // Active policy
                                Return(TP2H)}
                }				// Method(_PSV)

                Method(_CRT) {
                        Return(TRPC)
                }

                Method(_TMP) {
                               Return(RTMP())
                }				// Method(_TMP)

                Method(_SCP, 1) {
                        If(Arg0) {              // Passive policy
                                Store(One, PLCY)}
                        Else {                  // Active policy
                                Store(Zero, PLCY)}

                        Notify(\_TZ.THRM, 0x81)      // Notify trip point change
                } // Method(_SCP)

                Method(STMP, 2) {

                        Store(Arg1, DW00)
                        If(Arg0) {      // Set trip point low
                                STHY(DB00, DB01, DW00)}	//R01
                        Else {          // Set trip point high
                                STOS(DB00, DB01, DW00)}	//R01

                } // Method(STMP)
        } // ThermalZone(THRM)
} // Scope(\_TZ)


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?