📄 tz.asl
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -