HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46047 )
Change subject: mb/*/*/acpi: Convert 'thermal.asl' to ASL 2.0 syntax ......................................................................
mb/*/*/acpi: Convert 'thermal.asl' to ASL 2.0 syntax
Change-Id: Ic46d6d99f02e14edb9a3d83e91f894c826fa01a8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/getac/p470/acpi/thermal.asl M src/mainboard/gigabyte/ga-b75m-d3h/acpi/thermal.asl M src/mainboard/gigabyte/ga-h61m-series/acpi/thermal.asl M src/mainboard/google/auron/acpi/thermal.asl M src/mainboard/google/beltino/acpi/thermal.asl M src/mainboard/google/butterfly/acpi/thermal.asl M src/mainboard/google/cyan/variants/terra/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl M src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl M src/mainboard/google/link/acpi/thermal.asl M src/mainboard/google/parrot/acpi/thermal.asl M src/mainboard/google/slippy/acpi/thermal.asl M src/mainboard/google/stout/acpi/thermal.asl M src/mainboard/google/zork/variants/baseboard/include/baseboard/acpi/thermal.asl M src/mainboard/intel/baskingridge/acpi/thermal.asl M src/mainboard/intel/emeraldlake2/acpi/thermal.asl M src/mainboard/intel/wtm2/acpi/thermal.asl M src/mainboard/kontron/ktqm77/acpi/thermal.asl M src/mainboard/packardbell/ms2290/acpi/thermal.asl M src/mainboard/roda/rk9/acpi/thermal.asl M src/mainboard/roda/rv11/acpi/thermal.asl M src/mainboard/samsung/lumpy/acpi/thermal.asl M src/mainboard/samsung/stumpy/acpi/thermal.asl 26 files changed, 629 insertions(+), 679 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/46047/1
diff --git a/src/mainboard/getac/p470/acpi/thermal.asl b/src/mainboard/getac/p470/acpi/thermal.asl index 6e3dc22..4e31ef3 100644 --- a/src/mainboard/getac/p470/acpi/thermal.asl +++ b/src/mainboard/getac/p470/acpi/thermal.asl @@ -17,11 +17,11 @@ // Convert from °C to 1/10 Kelvin Method(DEGR, 1, NotSerialized) { - Store(Arg0, Local0) + Local0 = Arg0 // 10ths of degrees - Multiply(Local0, 10, Local0) + Local0 *= 10 // 0°C is 273.15 K, we need to round it. - Add(Local0, 2732, Local0) + Local0 += 2732 Return(Local0) }
@@ -35,24 +35,24 @@ // Critical shutdown temperature Method (_CRT, 0, Serialized) { - Store(_SB.PCI0.LPCB.EC0.CRTT, Local0) - Store(DEGR(Local0), Local0) + Local0 = _SB.PCI0.LPCB.EC0.CRTT + Local0 = DEGR (Local0) Return(Local0) }
// CPU throttling start temperature Method (_PSV, 0, Serialized) { - Store(_SB.PCI0.LPCB.EC0.CTRO, Local0) - Store(DEGR(Local0), Local0) + Local0 = _SB.PCI0.LPCB.EC0.CTRO + Local0 = DEGR (Local0) Return(Local0) }
// Get DTS Temperature Method (_TMP, 0, Serialized) { - Store(_SB.PCI0.LPCB.EC0.CTMP, Local0) - Store(DEGR(Local0), Local0) + Local0 = _SB.PCI0.LPCB.EC0.CTMP + Local0 = DEGR (Local0) Return(Local0) }
diff --git a/src/mainboard/gigabyte/ga-b75m-d3h/acpi/thermal.asl b/src/mainboard/gigabyte/ga-b75m-d3h/acpi/thermal.asl index 2544617..ae4ef30 100644 --- a/src/mainboard/gigabyte/ga-b75m-d3h/acpi/thermal.asl +++ b/src/mainboard/gigabyte/ga-b75m-d3h/acpi/thermal.asl @@ -21,10 +21,10 @@ Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } diff --git a/src/mainboard/gigabyte/ga-h61m-series/acpi/thermal.asl b/src/mainboard/gigabyte/ga-h61m-series/acpi/thermal.asl index 2544617..ae4ef30 100644 --- a/src/mainboard/gigabyte/ga-h61m-series/acpi/thermal.asl +++ b/src/mainboard/gigabyte/ga-h61m-series/acpi/thermal.asl @@ -21,10 +21,10 @@ Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } diff --git a/src/mainboard/google/auron/acpi/thermal.asl b/src/mainboard/google/auron/acpi/thermal.asl index 4be4fe5..fd05e73 100644 --- a/src/mainboard/google/auron/acpi/thermal.asl +++ b/src/mainboard/google/auron/acpi/thermal.asl @@ -24,10 +24,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -53,56 +53,56 @@ Method (TCHK, 0, Serialized) { // Get Temperature from TIN# set in NVS - Store (_SB.PCI0.LPCB.EC0.TINS (TMPS), Local0) + Local0 = _SB.PCI0.LPCB.EC0.TINS (TMPS)
// Check for sensor not calibrated - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNCA)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNCA) { Return (CTOK(0)) }
// Check for sensor not present - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNPR)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNPR) { Return (CTOK(0)) }
// Check for sensor not powered - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNOP)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNOP) { Return (CTOK(0)) }
// Check for sensor bad reading - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TBAD)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TBAD) { Return (CTOK(0)) }
// Adjust by offset to get Kelvin - Add (_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0) + Local0 += _SB.PCI0.LPCB.EC0.TOFS
// Convert to 1/10 Kelvin - Multiply (Local0, 10, Local0) + Local0 *= 10 Return (Local0) }
Method (_TMP, 0, Serialized) { // Get temperature from EC in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TCRT), Local1) + Local1 = CTOK (\TCRT)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for EC to re-poll Sleep (1000)
// Re-read temperature from EC - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) @@ -110,7 +110,7 @@
/* CTDP Down */ Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (CTL_TDP_THRESHOLD_OFF)) } Else { Return (CTOK (CTL_TDP_THRESHOLD_ON)) @@ -119,7 +119,7 @@
/* CTDP Nominal */ Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (CTL_TDP_THRESHILD_NORMAL)) } Else { Return (CTOK (CTL_TDP_THRESHILD_NORMAL)) @@ -132,14 +132,14 @@ PowerResource (TNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (0, \FLVL) + \FLVL = 0
/* Enable Power Limit */ _SB.PCI0.MCHC.CTLE (CTL_TDP_POWER_LIMIT) @@ -147,7 +147,7 @@ Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (1, \FLVL) + \FLVL = 1
/* Disable Power Limit */ _SB.PCI0.MCHC.CTLD () @@ -159,18 +159,18 @@ PowerResource (TNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (1, \FLVL) + \FLVL = 1 Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (1, \FLVL) + \FLVL = 1 Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/beltino/acpi/thermal.asl b/src/mainboard/google/beltino/acpi/thermal.asl index 1292af4..96acaeb 100644 --- a/src/mainboard/google/beltino/acpi/thermal.asl +++ b/src/mainboard/google/beltino/acpi/thermal.asl @@ -23,10 +23,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -52,66 +52,66 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) }
Method (TCHK, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available" - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (FAN0_THRESHOLD_OFF)) } Else { Return (CTOK (FAN0_THRESHOLD_ON)) @@ -119,7 +119,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (FAN1_THRESHOLD_OFF)) } Else { Return (CTOK (FAN1_THRESHOLD_ON)) @@ -127,7 +127,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (FAN2_THRESHOLD_OFF)) } Else { Return (CTOK (FAN2_THRESHOLD_ON)) @@ -135,7 +135,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (FAN3_THRESHOLD_OFF)) } Else { Return (CTOK (FAN3_THRESHOLD_ON)) @@ -143,7 +143,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (FAN4_THRESHOLD_OFF)) } Else { Return (CTOK (FAN4_THRESHOLD_ON)) @@ -159,25 +159,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (FAN0_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN0_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } @@ -186,25 +184,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } @@ -213,25 +209,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } @@ -240,25 +234,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } @@ -267,25 +259,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/butterfly/acpi/thermal.asl b/src/mainboard/google/butterfly/acpi/thermal.asl index 4c6f6d9..ed381cd 100644 --- a/src/mainboard/google/butterfly/acpi/thermal.asl +++ b/src/mainboard/google/butterfly/acpi/thermal.asl @@ -21,10 +21,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -50,13 +50,13 @@ Method (_TMP, 0, Serialized) { // Get CPU Temperature from EC - Store (_SB.PCI0.LPCB.EC0.CTMP, Local0) + Local0 = _SB.PCI0.LPCB.EC0.CTMP
// Convert to 1/10 Kelvin - Multiply (Local0, 10, Local0) + Local0 *= 10
// Adjust by offset to get Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } diff --git a/src/mainboard/google/cyan/variants/terra/include/variant/acpi/thermal.asl b/src/mainboard/google/cyan/variants/terra/include/variant/acpi/thermal.asl index 1e2d286..94c80da 100644 --- a/src/mainboard/google/cyan/variants/terra/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/cyan/variants/terra/include/variant/acpi/thermal.asl @@ -6,20 +6,20 @@ #if CONFIG(EC_SUPPORTS_DPTF_TEVT) Method (TEVT, 1, NotSerialized) { - Store (ToInteger (Arg0), Local0) + Local0 = ToInteger (Arg0)
#ifdef DPTF_TSR0_SENSOR_ID - If (LEqual (Local0, DPTF_TSR0_SENSOR_ID)) { + If (Local0 == DPTF_TSR0_SENSOR_ID) { Notify (^TSR0, 0x90) } #endif #ifdef DPTF_TSR1_SENSOR_ID - If (LEqual (Local0, DPTF_TSR1_SENSOR_ID)) { + If (Local0 == DPTF_TSR1_SENSOR_ID) { Notify (^TSR1, 0x90) } #endif #ifdef DPTF_TSR2_SENSOR_ID - If (LEqual (Local0, DPTF_TSR2_SENSOR_ID)) { + If (Local0 == DPTF_TSR2_SENSOR_ID) { Notify (^TSR2, 0x90) } #endif @@ -52,7 +52,7 @@
Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -67,7 +67,7 @@ /* Return passive thermal point defined by Terra2 or Terra3 mainboard */ Method (_PSV) { - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (CTOK (DPTF_TERRA2_TSR0_PASSIVE)) } Else { @@ -78,7 +78,7 @@ /* Return critical thermal point defined by Terra2 or Terra3 mainboard */ Method (_CRT) { - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (CTOK (DPTF_TERRA2_TSR0_CRITICAL)) } Else { @@ -120,7 +120,7 @@
Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -135,7 +135,7 @@ /* Return passive thermal point defined by Terra2 or Terra3 mainboard */ Method (_PSV) { - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (CTOK (DPTF_TERRA2_TSR1_PASSIVE)) } Else { @@ -146,7 +146,7 @@ /* Return critical thermal point defined by Terra2 or Terra3 mainboard */ Method (_CRT) { - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (CTOK (DPTF_TERRA2_TSR1_CRITICAL)) } Else { @@ -188,7 +188,7 @@
Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -203,7 +203,7 @@ /* Return passive thermal point defined by Terra2 or Terra3 mainboard */ Method (_PSV) { - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (CTOK (DPTF_TERRA2_TSR2_PASSIVE)) } Else { @@ -214,7 +214,7 @@ /* Return critical thermal point defined by Terra2 or Terra3 mainboard */ Method (_CRT) { - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (CTOK (DPTF_TERRA2_TSR2_CRITICAL)) } Else { diff --git a/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl index 2a16352..1ea32a6 100644 --- a/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl @@ -24,10 +24,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -53,66 +53,66 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) }
Method (TCHK, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (FAN0_THRESHOLD_OFF)) } Else { Return (CTOK (FAN0_THRESHOLD_ON)) @@ -120,7 +120,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (FAN1_THRESHOLD_OFF)) } Else { Return (CTOK (FAN1_THRESHOLD_ON)) @@ -128,7 +128,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (FAN2_THRESHOLD_OFF)) } Else { Return (CTOK (FAN2_THRESHOLD_ON)) @@ -136,7 +136,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (FAN3_THRESHOLD_OFF)) } Else { Return (CTOK (FAN3_THRESHOLD_ON)) @@ -144,7 +144,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (0)) } Else { Return (CTOK (0)) @@ -160,25 +160,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (FAN0_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN0_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } @@ -187,25 +185,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } @@ -214,25 +210,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } @@ -241,25 +235,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } @@ -268,25 +260,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl index 2a16352..1ea32a6 100644 --- a/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl @@ -24,10 +24,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -53,66 +53,66 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) }
Method (TCHK, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (FAN0_THRESHOLD_OFF)) } Else { Return (CTOK (FAN0_THRESHOLD_ON)) @@ -120,7 +120,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (FAN1_THRESHOLD_OFF)) } Else { Return (CTOK (FAN1_THRESHOLD_ON)) @@ -128,7 +128,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (FAN2_THRESHOLD_OFF)) } Else { Return (CTOK (FAN2_THRESHOLD_ON)) @@ -136,7 +136,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (FAN3_THRESHOLD_OFF)) } Else { Return (CTOK (FAN3_THRESHOLD_ON)) @@ -144,7 +144,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (0)) } Else { Return (CTOK (0)) @@ -160,25 +160,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (FAN0_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN0_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } @@ -187,25 +185,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } @@ -214,25 +210,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } @@ -241,25 +235,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } @@ -268,25 +260,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl index 2a16352..1ea32a6 100644 --- a/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl @@ -24,10 +24,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -53,66 +53,66 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) }
Method (TCHK, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (FAN0_THRESHOLD_OFF)) } Else { Return (CTOK (FAN0_THRESHOLD_ON)) @@ -120,7 +120,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (FAN1_THRESHOLD_OFF)) } Else { Return (CTOK (FAN1_THRESHOLD_ON)) @@ -128,7 +128,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (FAN2_THRESHOLD_OFF)) } Else { Return (CTOK (FAN2_THRESHOLD_ON)) @@ -136,7 +136,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (FAN3_THRESHOLD_OFF)) } Else { Return (CTOK (FAN3_THRESHOLD_ON)) @@ -144,7 +144,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (0)) } Else { Return (CTOK (0)) @@ -160,25 +160,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (FAN0_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN0_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } @@ -187,25 +185,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } @@ -214,25 +210,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } @@ -241,25 +235,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } @@ -268,25 +260,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl index e2f2675..f3b341e 100644 --- a/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl @@ -39,99 +39,99 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) }
// Thermal Table 0 Method (TTB0, 0) { - Store (FAN0_0_THRESHOLD_ON, F0ON) - Store (FAN0_0_THRESHOLD_OFF, F0OF) - Store (FAN0_0_PWM, F0PW) - Store (FAN1_0_THRESHOLD_ON, F1ON) - Store (FAN1_0_THRESHOLD_OFF, F1OF) - Store (FAN1_0_PWM, F1PW) - Store (FAN2_0_THRESHOLD_ON, F2ON) - Store (FAN2_0_THRESHOLD_OFF, F2OF) - Store (FAN2_0_PWM, F2PW) - Store (FAN3_0_THRESHOLD_ON, F3ON) - Store (FAN3_0_THRESHOLD_OFF, F3OF) - Store (FAN3_0_PWM, F3PW) - Store (FAN4_0_PWM, F4PW) - Store (0, THTB) + F0ON = AN0_0_THRESHOLD_ON + F0OF = FAN0_0_THRESHOLD_OFF + F0PW = FAN0_0_PWM + F1ON = FAN1_0_THRESHOLD_ON + F1OF = FAN1_0_THRESHOLD_OFF + F1PW = FAN1_0_PWM + F2ON = FAN2_0_THRESHOLD_ON + F2OF = FAN2_0_THRESHOLD_OFF + F2PW = FAN2_0_PWM + F3ON = FAN3_0_THRESHOLD_ON + F3OF = FAN3_0_THRESHOLD_OFF + F3PW = FAN3_0_PWM + F4PW = FAN4_0_PWM + THTB = 0 }
// Thermal Table 1 Method (TTB1, 0) { - Store (FAN0_1_THRESHOLD_ON, F0ON) - Store (FAN0_1_THRESHOLD_OFF, F0OF) - Store (FAN0_1_PWM, F0PW) - Store (FAN1_1_THRESHOLD_ON, F1ON) - Store (FAN1_1_THRESHOLD_OFF, F1OF) - Store (FAN1_1_PWM, F1PW) - Store (FAN2_1_THRESHOLD_ON, F2ON) - Store (FAN2_1_THRESHOLD_OFF, F2OF) - Store (FAN2_1_PWM, F2PW) - Store (FAN3_1_THRESHOLD_ON, F3ON) - Store (FAN3_1_THRESHOLD_OFF, F3OF) - Store (FAN3_1_PWM, F3PW) - Store (FAN4_1_PWM, F4PW) - Store (1, THTB) + F0ON = FAN0_1_THRESHOLD_ON + F0OF = FAN0_1_THRESHOLD_OFF + F0PW = FAN0_1_PWM + F1ON = FAN1_1_THRESHOLD_ON + F1OF = FAN1_1_THRESHOLD_OFF + F1PW = FAN1_1_PWM + F2ON = FAN2_1_THRESHOLD_ON + F2OF = FAN2_1_THRESHOLD_OFF + F2PW = FAN2_1_PWM + F3ON = FAN3_1_THRESHOLD_ON + F3OF = FAN3_1_THRESHOLD_OFF + F3PW = FAN3_1_PWM + F4PW = FAN4_1_PWM + THTB = 1 }
// Thermal Table 2 Method (TTB2, 0) { - Store (FAN0_2_THRESHOLD_ON, F0ON) - Store (FAN0_2_THRESHOLD_OFF, F0OF) - Store (FAN0_2_PWM, F0PW) - Store (FAN1_2_THRESHOLD_ON, F1ON) - Store (FAN1_2_THRESHOLD_OFF, F1OF) - Store (FAN1_2_PWM, F1PW) - Store (FAN2_2_THRESHOLD_ON, F2ON) - Store (FAN2_2_THRESHOLD_OFF, F2OF) - Store (FAN2_2_PWM, F2PW) - Store (FAN3_2_THRESHOLD_ON, F3ON) - Store (FAN3_2_THRESHOLD_OFF, F3OF) - Store (FAN3_2_PWM, F3PW) - Store (FAN4_2_PWM, F4PW) - Store (2, THTB) + F0ON = FAN0_2_THRESHOLD_ON + F0OF = FAN0_2_THRESHOLD_OFF + F0PW = FAN0_2_PWM + F1ON = FAN1_2_THRESHOLD_ON + F1OF = FAN1_2_THRESHOLD_OFF + F1PW = FAN1_2_PWM + F2ON = FAN2_2_THRESHOLD_ON + F2OF = FAN2_2_THRESHOLD_OFF + F2PW = FAN2_2_PWM + F3ON = FAN3_2_THRESHOLD_ON + F3OF = FAN3_2_THRESHOLD_OFF + F3PW = FAN3_2_PWM + F4PW = FAN4_2_PWM + THTB = 2 }
// Update Thermal Table Method (UPTB, 0) { // Get System Temperature via SuperIO TMPIN2 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN2, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN2
// Check for "no reading available - If (LEqual (Local0, 0x80)) { - Store (THERMAL_POLICY_0_THRESHOLD_ON, Local0) + If (Local0 == 0x80) { + Local0 = THERMAL_POLICY_0_THRESHOLD_ON }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { - Store (THERMAL_POLICY_0_THRESHOLD_ON, Local0) + If ((Local0 == 255) || (Local0 == 0)) { + Local0 = THERMAL_POLICY_0_THRESHOLD_ON }
- If (LEqual (THTB, 2)) { - If (LGreaterEqual (Local0, THERMAL_POLICY_0_THRESHOLD_ON)) { + If (THTB == 2) { + If (Local0 >= THERMAL_POLICY_0_THRESHOLD_ON) { TTB0 () - } ElseIf (LGreaterEqual (Local0, THERMAL_POLICY_1_THRESHOLD_ON)) { + } ElseIf (Local0 >= THERMAL_POLICY_1_THRESHOLD_ON) { TTB1 () } - } ElseIf (LEqual (THTB, 1)) { - If (LGreaterEqual (Local0, THERMAL_POLICY_0_THRESHOLD_ON)) { + } ElseIf (THTB == 1) { + If (Local0 >= THERMAL_POLICY_0_THRESHOLD_ON) { TTB0 () - } ElseIf (LLessEqual (Local0, THERMAL_POLICY_1_THRESHOLD_OFF)) { + } ElseIf (Local0 <= THERMAL_POLICY_1_THRESHOLD_OFF) { TTB2 () } } Else { - If (LLess (Local0, THERMAL_POLICY_1_THRESHOLD_OFF)) { + If (Local0 < THERMAL_POLICY_1_THRESHOLD_OFF) { TTB2 () - } ElseIf (LLessEqual (Local0, THERMAL_POLICY_0_THRESHOLD_OFF)) { + } ElseIf (Local0 <= THERMAL_POLICY_0_THRESHOLD_OFF) { TTB1 () } } @@ -158,8 +158,8 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_2_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_2_PWM Notify (_TZ.THRM, 0x81) }
@@ -169,58 +169,58 @@ UPTB ()
// Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (F0OF)) } Else { Return (CTOK (F0ON)) @@ -228,7 +228,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (F1OF)) } Else { Return (CTOK (F1ON)) @@ -236,7 +236,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (F2OF)) } Else { Return (CTOK (F2ON)) @@ -244,7 +244,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (F3OF)) } Else { Return (CTOK (F3ON)) @@ -252,7 +252,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (0)) } Else { Return (CTOK (0)) @@ -268,25 +268,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (F0PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F0PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (F1PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F1PW Notify (_TZ.THRM, 0x81) } } @@ -295,25 +293,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (F1PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F1PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (F2PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F2PW Notify (_TZ.THRM, 0x81) } } @@ -322,25 +318,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (F2PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F2PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (F3PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F3PW Notify (_TZ.THRM, 0x81) } } @@ -349,25 +343,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (F3PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F3PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (F4PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F4PW Notify (_TZ.THRM, 0x81) } } @@ -376,25 +368,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (F4PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F4PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (F4PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F4PW Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl index 32a6549..73499b0 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl +++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl @@ -21,10 +21,10 @@ /* Convert from Degrees C to 1/10 Kelvin for ACPI */ Method (CTOK, 1) { /* 10th of Degrees C */ - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
/* Convert to Kelvin */ - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -50,23 +50,23 @@ Method (_TMP, 0, Serialized) { /* Get temperature from EC in deci-kelvin */ - Store (_SB.PCI0.LPCB.EC0.TSRD (TMPS), Local0) + Local0 =_SB.PCI0.LPCB.EC0.TSRD (TMPS)
/* Critical temperature in deci-kelvin */ - Store (CTOK (\TCRT), Local1) + Local1 = CTOK (\TCRT)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
/* Wait 1 second for EC to re-poll */ Sleep (1000)
/* Re-read temperature from EC */ - Store (_SB.PCI0.LPCB.EC0.TSRD (TMPS), Local0) + Local0 =_SB.PCI0.LPCB.EC0.TSRD (TMPS)
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) diff --git a/src/mainboard/google/link/acpi/thermal.asl b/src/mainboard/google/link/acpi/thermal.asl index 28fa490..7ea38ae 100644 --- a/src/mainboard/google/link/acpi/thermal.asl +++ b/src/mainboard/google/link/acpi/thermal.asl @@ -15,10 +15,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -32,33 +32,33 @@ Method (_TMP, 0, Serialized) { // Get CPU Temperature from TIN9/PECI via EC - Store (_SB.PCI0.LPCB.EC0.TIN9, Local0) + Local0 = _SB.PCI0.LPCB.EC0.TIN9
// Check for sensor not calibrated - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNCA)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNCA) { Return (CTOK(0)) }
// Check for sensor not present - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNPR)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNPR) { Return (CTOK(0)) }
// Check for sensor not powered - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNOP)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNOP) { Return (CTOK(0)) }
// Check for sensor bad reading - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TBAD)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TBAD) { Return (CTOK(0)) }
// Adjust by offset to get Kelvin - Add (_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0) + Local0 += _SB.PCI0.LPCB.EC0.TOFS
// Convert to 1/10 Kelvin - Multiply (Local0, 10, Local0) + Local0 *= 10 Return (Local0) } } @@ -77,10 +77,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -106,34 +106,34 @@ Method (_TMP, 0, Serialized) { // Get Temperature from TIN# set in NVS - Store (_SB.PCI0.LPCB.EC0.TINS (TMPS), Local0) + Local0 = _SB.PCI0.LPCB.EC0.TINS (TMPS)
// Check for sensor not present - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNPR)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNPR) { Return (CTOK(0)) }
// Check for sensor not powered - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNOP)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNOP) { Return (CTOK(0)) }
// Check for sensor bad reading - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TBAD)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TBAD) { Return (CTOK(0)) }
// Adjust by offset to get Kelvin - Add (_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0) + Local0 += _SB.PCI0.LPCB.EC0.TOFS
// Convert to 1/10 Kelvin - Multiply (Local0, 10, Local0) + Local0 *= 10 Return (Local0) }
/* CTDP Down */ Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (\F0OF)) } Else { Return (CTOK (\F0ON)) @@ -142,7 +142,7 @@
/* CTDP Nominal */ Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (\F1OF)) } Else { Return (CTOK (\F1ON)) @@ -155,19 +155,19 @@ PowerResource (TNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (0, \FLVL) + \FLVL = 0 _SB.PCI0.MCHC.STND () Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (1, \FLVL) + \FLVL = 1 _SB.PCI0.MCHC.STDN () Notify (_TZ.THRM, 0x81) } @@ -176,18 +176,18 @@ PowerResource (TNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (1, \FLVL) + \FLVL = 1 Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (1, \FLVL) + \FLVL = 1 Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/parrot/acpi/thermal.asl b/src/mainboard/google/parrot/acpi/thermal.asl index 852f58f..2d32d47 100644 --- a/src/mainboard/google/parrot/acpi/thermal.asl +++ b/src/mainboard/google/parrot/acpi/thermal.asl @@ -26,10 +26,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -55,23 +55,23 @@ Method (_TMP, 0, Serialized) { // Get CPU Temperature from the Embedded Controller - Store (_SB.PCI0.LPCB.EC0.CTMP, Local0) + Local0 = _SB.PCI0.LPCB.EC0.CTMP
// Re-read from EC if the temperature is very high to // avoid OS shutdown if we got a bad reading. - If (LGreaterEqual (Local0, \TCRT)) { - Store (_SB.PCI0.LPCB.EC0.CTMP, Local0) - If (LGreaterEqual (Local0, \TCRT)) { + If (Local0 >= \TCRT) { + Local0 = _SB.PCI0.LPCB.EC0.CTMP + If (Local0 >= \TCRT) { // Check if this is an early read - If (LLess (CRDC, IRDC)) { - Store (0, Local0) + If (CRDC < IRDC) { + Local0 = 0 } } }
// Keep track of first few reads by the OS - If (LLess (CRDC, IRDC)) { - Increment (CRDC) + If (CRDC < IRDC) { + CRDC++ }
Return (CTOK (Local0)) diff --git a/src/mainboard/google/slippy/acpi/thermal.asl b/src/mainboard/google/slippy/acpi/thermal.asl index 74e73a2..838565b 100644 --- a/src/mainboard/google/slippy/acpi/thermal.asl +++ b/src/mainboard/google/slippy/acpi/thermal.asl @@ -12,7 +12,7 @@ // 1 = Start throttling Method (THRT, 1, Serialized) { - If (LEqual (Arg0, 0)) { + If (Arg0 == 0) { /* Disable Power Limit */ _SB.PCI0.MCHC.CTLD () } Else { @@ -35,10 +35,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -64,56 +64,56 @@ Method (TCHK, 0, Serialized) { // Get Temperature from TIN# set in NVS - Store (_SB.PCI0.LPCB.EC0.TINS (TMPS), Local0) + Local0 = _SB.PCI0.LPCB.EC0.TINS (TMPS)
// Check for sensor not calibrated - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNCA)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNCA) { Return (CTOK(0)) }
// Check for sensor not present - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNPR)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNPR) { Return (CTOK(0)) }
// Check for sensor not powered - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TNOP)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TNOP) { Return (CTOK(0)) }
// Check for sensor bad reading - If (LEqual (Local0, _SB.PCI0.LPCB.EC0.TBAD)) { + If (Local0 == _SB.PCI0.LPCB.EC0.TBAD) { Return (CTOK(0)) }
// Adjust by offset to get Kelvin - Add (_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0) + Local0 += _SB.PCI0.LPCB.EC0.TOFS
// Convert to 1/10 Kelvin - Multiply (Local0, 10, Local0) + Local0 *= 10 Return (Local0) }
Method (_TMP, 0, Serialized) { // Get temperature from EC in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TCRT), Local1) + Local1 = CTOK (\TCRT)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for EC to re-poll Sleep (1000)
// Re-read temperature from EC - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) diff --git a/src/mainboard/google/stout/acpi/thermal.asl b/src/mainboard/google/stout/acpi/thermal.asl index 2484332..72324d7 100644 --- a/src/mainboard/google/stout/acpi/thermal.asl +++ b/src/mainboard/google/stout/acpi/thermal.asl @@ -22,10 +22,10 @@ Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -51,21 +51,21 @@ Method (_TMP, 0, Serialized) { // Returns Higher of the two readings for CPU & VGA Temperature - If (LGreater (_SB.PCI0.LPCB.EC0.TMP2, _SB.PCI0.LPCB.EC0.TMP1)) + If (_SB.PCI0.LPCB.EC0.TMP2 > _SB.PCI0.LPCB.EC0.TMP1) { // CPU high temperature - Store (_SB.PCI0.LPCB.EC0.TMP2, Local0) + Local0 = _SB.PCI0.LPCB.EC0.TMP2 } Else { // VGA high temperature - Store (_SB.PCI0.LPCB.EC0.TMP1, Local0) + Local0 = _SB.PCI0.LPCB.EC0.TMP1 }
// If temp less 35 or great then 115, set default 35 - If (Or (LLess (Local0, 35), LGreater (Local0, 115))) + If ((Local0 < 35) || (Local0 > 115)) { - Store (35, Local0) + Local0 = 35 }
Return (CTOK (Local0)) diff --git a/src/mainboard/google/zork/variants/baseboard/include/baseboard/acpi/thermal.asl b/src/mainboard/google/zork/variants/baseboard/include/baseboard/acpi/thermal.asl index 8f5aa6a..8576d12 100644 --- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/acpi/thermal.asl +++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/acpi/thermal.asl @@ -21,10 +21,10 @@ /* Convert from Degrees C to 1/10 Kelvin for ACPI */ Method (CTOK, 1) { /* 10th of Degrees C */ - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
/* Convert to Kelvin */ - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -50,23 +50,23 @@ Method (_TMP, 0, Serialized) { /* Get temperature from EC in deci-kelvin */ - Store (_SB.PCI0.LPCB.EC0.TSRD (TMPS), Local0) + Local0 =_SB.PCI0.LPCB.EC0.TSRD (TMPS)
/* Critical temperature in deci-kelvin */ - Store (CTOK (\TCRT), Local1) + Local1 = CTOK (\TCRT)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
/* Wait 1 second for EC to re-poll */ Sleep (1000)
/* Re-read temperature from EC */ - Store (_SB.PCI0.LPCB.EC0.TSRD (TMPS), Local0) + Local0 =_SB.PCI0.LPCB.EC0.TSRD (TMPS)
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) diff --git a/src/mainboard/intel/baskingridge/acpi/thermal.asl b/src/mainboard/intel/baskingridge/acpi/thermal.asl index 487b741..c1bb116 100644 --- a/src/mainboard/intel/baskingridge/acpi/thermal.asl +++ b/src/mainboard/intel/baskingridge/acpi/thermal.asl @@ -20,10 +20,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -52,7 +52,7 @@ }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (\F0OF)) } Else { Return (CTOK (\F0ON)) @@ -60,7 +60,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (\F1OF)) } Else { Return (CTOK (\F1ON)) @@ -68,7 +68,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (\F2OF)) } Else { Return (CTOK (\F2ON)) @@ -76,7 +76,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (\F3OF)) } Else { Return (CTOK (\F3ON)) @@ -84,7 +84,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (\F4OF)) } Else { Return (CTOK (\F4ON)) @@ -100,20 +100,20 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (0, \FLVL) - Store (\F0PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F0PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (1, \FLVL) - Store (\F1PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F1PW Notify (_TZ.THRM, 0x81) } } @@ -121,20 +121,20 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (1, \FLVL) - Store (\F1PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F1PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (2, \FLVL) - Store (\F2PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F2PW Notify (_TZ.THRM, 0x81) } } @@ -142,20 +142,20 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (2, \FLVL) - Store (\F2PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F2PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (3, \FLVL) - Store (\F3PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F3PW Notify (_TZ.THRM, 0x81) } } @@ -163,20 +163,20 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (3, \FLVL) - Store (\F3PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F3PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } } @@ -184,20 +184,20 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/intel/emeraldlake2/acpi/thermal.asl b/src/mainboard/intel/emeraldlake2/acpi/thermal.asl index 39d61b2..0a3bb49 100644 --- a/src/mainboard/intel/emeraldlake2/acpi/thermal.asl +++ b/src/mainboard/intel/emeraldlake2/acpi/thermal.asl @@ -21,10 +21,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -50,28 +50,28 @@ Method (_TMP, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (\F2ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (\F0OF)) } Else { Return (CTOK (\F0ON)) @@ -79,7 +79,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (\F1OF)) } Else { Return (CTOK (\F1ON)) @@ -87,7 +87,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (\F2OF)) } Else { Return (CTOK (\F2ON)) @@ -95,7 +95,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (\F3OF)) } Else { Return (CTOK (\F3ON)) @@ -103,7 +103,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (\F4OF)) } Else { Return (CTOK (\F4ON)) @@ -119,20 +119,20 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (0, \FLVL) - Store (\F0PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F0PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (1, \FLVL) - Store (\F1PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F1PW Notify (_TZ.THRM, 0x81) } } @@ -140,20 +140,20 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (1, \FLVL) - Store (\F1PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F1PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (2, \FLVL) - Store (\F2PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F2PW Notify (_TZ.THRM, 0x81) } } @@ -161,20 +161,20 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (2, \FLVL) - Store (\F2PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F2PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (3, \FLVL) - Store (\F3PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F3PW Notify (_TZ.THRM, 0x81) } } @@ -182,20 +182,20 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (3, \FLVL) - Store (\F3PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F3PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } } @@ -203,20 +203,20 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/intel/wtm2/acpi/thermal.asl b/src/mainboard/intel/wtm2/acpi/thermal.asl index cb56e97..fe3961e 100644 --- a/src/mainboard/intel/wtm2/acpi/thermal.asl +++ b/src/mainboard/intel/wtm2/acpi/thermal.asl @@ -22,10 +22,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -54,7 +54,7 @@ }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (FAN0_THRESHOLD_OFF)) } Else { Return (CTOK (FAN0_THRESHOLD_ON)) @@ -62,7 +62,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (FAN1_THRESHOLD_OFF)) } Else { Return (CTOK (FAN1_THRESHOLD_ON)) @@ -70,7 +70,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (FAN2_THRESHOLD_OFF)) } Else { Return (CTOK (FAN2_THRESHOLD_ON)) @@ -78,7 +78,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (FAN3_THRESHOLD_OFF)) } Else { Return (CTOK (FAN3_THRESHOLD_ON)) @@ -86,7 +86,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (FAN4_THRESHOLD_OFF)) } Else { Return (CTOK (FAN4_THRESHOLD_ON)) @@ -102,18 +102,18 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (0, \FLVL) + \FLVL = 0 Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (1, \FLVL) + \FLVL = 1 Notify (_TZ.THRM, 0x81) } } @@ -121,18 +121,18 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (1, \FLVL) + \FLVL = 1 Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (2, \FLVL) + \FLVL = 2 Notify (_TZ.THRM, 0x81) } } @@ -140,18 +140,18 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (2, \FLVL) + \FLVL = 2 Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (3, \FLVL) + \FLVL = 3 Notify (_TZ.THRM, 0x81) } } @@ -159,18 +159,18 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (3, \FLVL) + \FLVL = 3 Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (4, \FLVL) + \FLVL = 4 Notify (_TZ.THRM, 0x81) } } @@ -178,18 +178,18 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (4, \FLVL) + \FLVL = 4 Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (4, \FLVL) + \FLVL = 4 Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/kontron/ktqm77/acpi/thermal.asl b/src/mainboard/kontron/ktqm77/acpi/thermal.asl index 2400493..3465b75 100644 --- a/src/mainboard/kontron/ktqm77/acpi/thermal.asl +++ b/src/mainboard/kontron/ktqm77/acpi/thermal.asl @@ -21,10 +21,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } diff --git a/src/mainboard/packardbell/ms2290/acpi/thermal.asl b/src/mainboard/packardbell/ms2290/acpi/thermal.asl index 8d24127..a41ddb4 100644 --- a/src/mainboard/packardbell/ms2290/acpi/thermal.asl +++ b/src/mainboard/packardbell/ms2290/acpi/thermal.asl @@ -6,13 +6,13 @@
Method(C2K, 1, NotSerialized) { - Multiply(Arg0, 10, Local0) - Add (Local0, 2732, Local0) - if (LLessEqual(Local0, 2732)) { + Local0 = Arg0 * 10 + Local0 += 2732 + if (Local0 <= 2732) { Return (3000) }
- if (LGreater(Local0, 4012)) { + if (Local0 > 4012) { Return (3000) } Return (Local0) @@ -25,7 +25,7 @@ } Method(_TMP) { /* Avoid tripping alarm if ME isn't booted at all yet */ - If (LAnd (LNot (MEBT), LEqual (_SB.PCI0.LPCB.EC.TMP0, 128))) { + If ((!MEBT) && (_SB.PCI0.LPCB.EC.TMP0 == 128)) { Return (C2K(40)) } Store (1, MEBT) diff --git a/src/mainboard/roda/rk9/acpi/thermal.asl b/src/mainboard/roda/rk9/acpi/thermal.asl index c9bc4d5..907edc1 100644 --- a/src/mainboard/roda/rk9/acpi/thermal.asl +++ b/src/mainboard/roda/rk9/acpi/thermal.asl @@ -43,18 +43,18 @@ Method (_TMP, 0, Serialized) { If (_SB.PCI0.LPCB.EC0.ALRC) { - Store(0, _SB.PCI0.LPCB.EC0.ALRC) + _SB.PCI0.LPCB.EC0.ALRC = 0 Return(_AC0()) }
If (_SB.PCI0.LPCB.EC0.ALRL) { - Store(0, THRO) - Store(0, _SB.PCI0.LPCB.EC0.ALRL) + THRO = 0 + _SB.PCI0.LPCB.EC0.ALRL = 0 }
If (_SB.PCI0.LPCB.EC0.ALRH) { - Store(1, THRO) - Store(0, _SB.PCI0.LPCB.EC0.ALRH) + THRO = 1 + _SB.PCI0.LPCB.EC0.ALRH = 0 }
/* vendor BIOS reports 0K if TCPU >= 128 deg C ?!? */ diff --git a/src/mainboard/roda/rv11/acpi/thermal.asl b/src/mainboard/roda/rv11/acpi/thermal.asl index 7f356e3..1d18781 100644 --- a/src/mainboard/roda/rv11/acpi/thermal.asl +++ b/src/mainboard/roda/rv11/acpi/thermal.asl @@ -10,10 +10,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -49,17 +49,17 @@
Method (_TMP, 0, NotSerialized) // _TMP: Temperature { - Store (_SB.PCI0.LPCB.EC0.CPUT, Local0) + Local0 = _SB.PCI0.LPCB.EC0.CPUT
If (Local0 >= 0x80) { - Store ("-----> CPU Temperature (INVALID): ", Debug) - Store (Local0, Debug) + Debug = "-----> CPU Temperature (INVALID): " + Debug = Local0 Return (CTOK (0)) }
- Store ("-----> CPU Temperature: ", Debug) - Store (Local0, Debug) + Debug = "-----> CPU Temperature: " + Debug = Local0
Return (CTOK (Local0)) } @@ -82,17 +82,17 @@
Method (_TMP, 0, NotSerialized) // _TMP: Temperature { - Store (_SB.PCI0.LPCB.EC0.LOCT, Local0) + Local0 = _SB.PCI0.LPCB.EC0.LOCT
If (Local0 >= 0x80) { - Store ("-----> LOC Temperature (INVALID): ", Debug) - Store (Local0, Debug) + Debug = "-----> LOC Temperature (INVALID): " + Debug = Local0 Return (CTOK (0)) }
- Store ("-----> LOC Temperature: ", Debug) - Store (Local0, Debug) + Debug = "-----> LOC Temperature: " + Debug = Local0
Return (CTOK (Local0)) } @@ -114,17 +114,17 @@
Method (_TMP, 0, NotSerialized) // _TMP: Temperature { - Store (_SB.PCI0.LPCB.EC0.OEMT, Local0) + Local0 = _SB.PCI0.LPCB.EC0.OEMT
If (Local0 >= 0x80) { - Store ("-----> OEM Temperature (INVALID): ", Debug) - Store (Local0, Debug) + Debug = "-----> OEM Temperature (INVALID): " + Debug = Local0 Return (CTOK (0)) }
- Store ("-----> OEM Temperature: ", Debug) - Store (Local0, Debug) + Debug = "-----> OEM Temperature: " + Debug = Local0
Return (CTOK (Local0)) } diff --git a/src/mainboard/samsung/lumpy/acpi/thermal.asl b/src/mainboard/samsung/lumpy/acpi/thermal.asl index dd85181..55923bd 100644 --- a/src/mainboard/samsung/lumpy/acpi/thermal.asl +++ b/src/mainboard/samsung/lumpy/acpi/thermal.asl @@ -26,10 +26,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -55,27 +55,27 @@ Method (_TMP, 0, Serialized) { // Get CPU Temperature from the Embedded Controller - Store (_SB.PCI0.LPCB.EC0.CPUT, Local0) + Local0 = _SB.PCI0.LPCB.EC0.CPUT
// Re-read from EC if the temperature is very high to // avoid OS shutdown if we got a bad reading. - If (LGreaterEqual (Local0, \TCRT)) { - Store (_SB.PCI0.LPCB.EC0.CPUT, Local0) - If (LGreaterEqual (Local0, \TCRT)) { + If (Local0 >= \TCRT) { + Local0 = _SB.PCI0.LPCB.EC0.CPUT + If (Local0 >= \TCRT) { // Check if this is an early read - If (LLess (CRDC, IRDC)) { - Store (0, Local0) + If (CRDC < IRDC) { + Local0 = 0 } } }
// Keep track of first few reads by the OS - If (LLess (CRDC, IRDC)) { - Increment (CRDC) + If (CRDC < IRDC) { + CRDC++ }
// Invalid reading, ensure fan is spinning - If (LGreaterEqual (Local0, 0x80)) { + If (Local0 >= 0x80) { Return (CTOK (\F4ON)) }
@@ -83,7 +83,7 @@ }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (\F0OF)) } Else { Return (CTOK (\F0ON)) @@ -91,7 +91,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (\F1OF)) } Else { Return (CTOK (\F1ON)) @@ -99,7 +99,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (\F2OF)) } Else { Return (CTOK (\F2ON)) @@ -107,7 +107,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (\F3OF)) } Else { Return (CTOK (\F3ON)) @@ -115,7 +115,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (\F4OF)) } Else { Return (CTOK (\F4ON)) diff --git a/src/mainboard/samsung/stumpy/acpi/thermal.asl b/src/mainboard/samsung/stumpy/acpi/thermal.asl index 39df88a..cf44aba 100644 --- a/src/mainboard/samsung/stumpy/acpi/thermal.asl +++ b/src/mainboard/samsung/stumpy/acpi/thermal.asl @@ -20,10 +20,10 @@ // Convert from Degrees C to 1/10 Kelvin for ACPI Method (CTOK, 1) { // 10th of Degrees C - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10
// Convert to Kelvin - Add (Local0, 2732, Local0) + Local0 += 2732
Return (Local0) } @@ -49,28 +49,28 @@ Method (_TMP, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (\F2ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (\F0OF)) } Else { Return (CTOK (\F0ON)) @@ -78,7 +78,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (\F1OF)) } Else { Return (CTOK (\F1ON)) @@ -86,7 +86,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (\F2OF)) } Else { Return (CTOK (\F2ON)) @@ -94,7 +94,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (\F3OF)) } Else { Return (CTOK (\F3ON)) @@ -102,7 +102,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (\F4OF)) } Else { Return (CTOK (\F4ON)) @@ -118,20 +118,20 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (0, \FLVL) - Store (\F0PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F0PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (1, \FLVL) - Store (\F1PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F1PW Notify (_TZ.THRM, 0x81) } } @@ -139,20 +139,20 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (1, \FLVL) - Store (\F1PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F1PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (2, \FLVL) - Store (\F2PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F2PW Notify (_TZ.THRM, 0x81) } } @@ -160,20 +160,20 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (2, \FLVL) - Store (\F2PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F2PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (3, \FLVL) - Store (\F3PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F3PW Notify (_TZ.THRM, 0x81) } } @@ -181,20 +181,20 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (3, \FLVL) - Store (\F3PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F3PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } } @@ -202,20 +202,20 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } Method (_OFF) { - Store (4, \FLVL) - Store (\F4PW, _SB.PCI0.LPCB.SIO.ENVC.F3PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F3PS = \F4PW Notify (_TZ.THRM, 0x81) } }
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46047
to look at the new patch set (#2).
Change subject: mb/*/*/acpi: Convert 'thermal.asl' to ASL 2.0 syntax ......................................................................
mb/*/*/acpi: Convert 'thermal.asl' to ASL 2.0 syntax
Change-Id: Ic46d6d99f02e14edb9a3d83e91f894c826fa01a8 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/getac/p470/acpi/thermal.asl M src/mainboard/gigabyte/ga-b75m-d3h/acpi/thermal.asl M src/mainboard/gigabyte/ga-h61m-series/acpi/thermal.asl M src/mainboard/google/auron/acpi/thermal.asl M src/mainboard/google/beltino/acpi/thermal.asl M src/mainboard/google/butterfly/acpi/thermal.asl M src/mainboard/google/cyan/variants/terra/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl M src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/thermal.asl M src/mainboard/google/link/acpi/thermal.asl M src/mainboard/google/parrot/acpi/thermal.asl M src/mainboard/google/slippy/acpi/thermal.asl M src/mainboard/google/stout/acpi/thermal.asl M src/mainboard/google/zork/variants/baseboard/include/baseboard/acpi/thermal.asl M src/mainboard/intel/baskingridge/acpi/thermal.asl M src/mainboard/intel/emeraldlake2/acpi/thermal.asl M src/mainboard/intel/wtm2/acpi/thermal.asl M src/mainboard/kontron/ktqm77/acpi/thermal.asl M src/mainboard/packardbell/ms2290/acpi/thermal.asl M src/mainboard/roda/rk9/acpi/thermal.asl M src/mainboard/roda/rv11/acpi/thermal.asl M src/mainboard/samsung/lumpy/acpi/thermal.asl M src/mainboard/samsung/stumpy/acpi/thermal.asl 26 files changed, 629 insertions(+), 679 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/46047/2
HAOUAS Elyes has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/46047 )
Change subject: mb/*/*/acpi: Convert 'thermal.asl' to ASL 2.0 syntax ......................................................................
Abandoned
squashed