mb/getac/p470/acpi: Convert to ASL 2.0 syntax

Generated 'build/dsdt.dsl' are identical.

Change-Id: Ifed93f4b0c360ec74f28926fb7cc9774ae03b8a6
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45555
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Elyes HAOUAS 2020-09-20 11:57:14 +02:00 committed by Patrick Georgi
parent 50a44350ee
commit e28133a994
4 changed files with 294 additions and 294 deletions

View file

@ -87,16 +87,16 @@ Device(EC0)
Method (_Q01, 0) Method (_Q01, 0)
{ {
Notify (\_SB.CP00, 0x80) Notify (\_SB.CP00, 0x80)
If(ADP) { If (ADP) {
Store(1, \_SB.AC.ACST) \_SB.AC.ACST = 1
TRAP(0xe3) TRAP (0xe3)
Store(1, PWRS) PWRS = 1
TRAP(0x2b) TRAP (0x2b)
} Else { } Else {
Store(0, \_SB.AC.ACST) \_SB.AC.ACST = 0
Notify(\_SB.AC, 0x80) Notify (\_SB.AC, 0x80)
Notify(\_SB.BAT0, 0x80) Notify (\_SB.BAT0, 0x80)
Store(0, PWRS) PWRS = 0
TRAP(0x2b) TRAP(0x2b)
} }
@ -107,7 +107,7 @@ Device(EC0)
Method (_Q02, 0) Method (_Q02, 0)
{ {
If(BAT) { If (BAT) {
Notify(\_SB.BAT0, 0x00) Notify(\_SB.BAT0, 0x00)
Notify(\_SB.AC, 0x80) Notify(\_SB.AC, 0x80)
} Else { } Else {
@ -132,7 +132,7 @@ Device(EC0)
{ {
TRAP(0xe0) TRAP(0xe0)
If (LEqual(RTCF, 0x00)) { If (RTCF == 0x00) {
Notify(LID0, 0x80) Notify(LID0, 0x80)
} else { } else {
TRAP(0xc1) TRAP(0xc1)
@ -172,25 +172,25 @@ Device(EC0)
Method (_Q24, 0) Method (_Q24, 0)
{ {
Store(0x3f, HOTK) HOTK = 0x3f
If(IGDS) { If (IGDS) {
Notify (\_SB.PCI0.GFX0, 0x82) Notify (\_SB.PCI0.GFX0, 0x82)
} Else { } Else {
TRAP(0xE1) TRAP (0xE1)
} }
Notify (\_SB.ECO, 0x85) Notify (\_SB.ECO, 0x85)
} }
Method (_Q25, 0) Method (_Q25, 0)
{ {
Store(0x40, HOTK) HOTK = 0x40
TRAP(0xe1) TRAP(0xe1)
Notify(\_SB.ECO, 0x86) Notify(\_SB.ECO, 0x86)
} }
Method (_Q26, 0) Method (_Q26, 0)
{ {
Store(0x41, HOTK) HOTK = 0x41
TRAP(0xe1) TRAP(0xe1)
Notify(\_SB.ECO, 0x87) Notify(\_SB.ECO, 0x87)
} }
@ -212,7 +212,7 @@ Device(EC0)
Method (_Q2A, 0) Method (_Q2A, 0)
{ {
Store(0x57, HOTK) HOTK = 0x57
TRAP(0xe1) TRAP(0xe1)
Notify(\_SB.ECO, 0x8b) Notify(\_SB.ECO, 0x8b)
} }
@ -225,7 +225,7 @@ Device(EC0)
Method (_Q2C, 0) Method (_Q2C, 0)
{ {
Store(0x59, HOTK) HOTK = 0x59
TRAP(0xe1) TRAP(0xe1)
} }
@ -241,25 +241,25 @@ Device(EC0)
Method (_Q3A, 0) Method (_Q3A, 0)
{ {
Store(1, BRTL) BRTL = 1
Notify(\_SB.ECO, 0x93) Notify(\_SB.ECO, 0x93)
} }
Method (_Q3B, 0) Method (_Q3B, 0)
{ {
Store(0, BRTL) BRTL = 0
Notify(\_SB.ECO, 0x93) Notify(\_SB.ECO, 0x93)
} }
Method (_Q3C, 0) Method (_Q3C, 0)
{ {
Store(1, SUN) SUN = 1
Notify(\_SB.ECO, 0x92) Notify(\_SB.ECO, 0x92)
} }
Method (_Q3D, 0) Method (_Q3D, 0)
{ {
Store(0, SUN) SUN = 0
Notify(\_SB.ECO, 0x92) Notify(\_SB.ECO, 0x92)
} }
@ -302,14 +302,14 @@ Device(EC0)
Method (_Q48, 0) Method (_Q48, 0)
{ {
TRAP(0xd2) // Check AC Status TRAP(0xd2) // Check AC Status
Store (1, ODDS) ODDS = 1
Notify(\_SB.ECO, 0x90) Notify(\_SB.ECO, 0x90)
} }
Method (_Q49, 0) Method (_Q49, 0)
{ {
TRAP(0xd2) // Check AC Status TRAP(0xd2) // Check AC Status
Store (0, ODDS) ODDS = 0
Notify(\_SB.ECO, 0x90) Notify(\_SB.ECO, 0x90)
} }
@ -337,7 +337,7 @@ Device(EC0)
Method (_Q5C, 0) Method (_Q5C, 0)
{ {
// Store(2, IGPS) // IGPS = 2
Notify(\_SB.ECO, 0x94) Notify(\_SB.ECO, 0x94)
} }
@ -364,26 +364,26 @@ Scope(\_SB)
Method (GDPD, 0, Serialized) Method (GDPD, 0, Serialized)
{ {
// Set flag byte to zero // Set flag byte to zero
Store (0, Local0) Local0 = 0
If (And(BRTL, 0x01)) { If (BRTL & 0x01) {
Or(Local0, 0x01, Local0) Local0 |= 0x01
} }
If (And(BRTL, 0x02)) { If (BRTL & 0x02) {
Or(Local0, 0x04, Local0) Local0 |= 0x04
} }
If (And(BRTL, 0x04)) { If (BRTL & 0x04) {
Or(Local0, 0x02, Local0) Local0 |= 0x02
} }
If (And(BRTL, 0x30)) { If (BRTL & 0x30) {
Or(Local0, 0x10, Local0) Local0 |= 0x10
} }
If (And(BRTL, 0x40)) { If (BRTL & 0x40) {
Or(Local0, 0x40, Local0) Local0 |= 0x40
} }
Return (Local0) Return (Local0)
@ -391,18 +391,18 @@ Scope(\_SB)
Method (GDPC, 0, Serialized) Method (GDPC, 0, Serialized)
{ {
Store (0, Local0) Local0 = 0
If (And(BRTL, 0x10)) { If (BRTL & 0x10) {
Or(Local0, 0x04, Local0) Local0 |= 0x04
} }
If (And( BRTL, 0x20)) { If (BRTL & 0x20) {
Or(Local0, 0x01, Local0) Local0 |= 0x01
} }
If (And(BRTL, 0x40)) { If (BRTL & 0x40) {
Or(Local0, 0x02, Local0) Local0 |= 0x02
} }
Return (Local0) Return (Local0)
@ -411,7 +411,7 @@ Scope(\_SB)
/* Set Brightness Level */ /* Set Brightness Level */
Method(SBLL, 1, Serialized) Method(SBLL, 1, Serialized)
{ {
Store (Arg0, BRTL) BRTL = Arg0
TRAP(0xd5) // See mainboard's smihandler.c TRAP(0xd5) // See mainboard's smihandler.c
Return (0) Return (0)
} }
@ -426,7 +426,7 @@ Scope(\_SB)
/* Get Brightness Level Medium? */ /* Get Brightness Level Medium? */
Method(GBLM, 0, Serialized) Method(GBLM, 0, Serialized)
{ {
Store(0x3f, BRTL) BRTL = 0x3f
// XXX don't we have to set the brightness? // XXX don't we have to set the brightness?
Return(BRTL) Return(BRTL)
} }
@ -434,7 +434,7 @@ Scope(\_SB)
/* ??? */ /* ??? */
Method(SUTE, 1, Serialized) Method(SUTE, 1, Serialized)
{ {
If (And(Arg0, 0x01)) { If (Arg0 & 0x01) {
TRAP(0xf5) TRAP(0xf5)
} Else { } Else {
TRAP(0xf6) TRAP(0xf6)
@ -462,30 +462,30 @@ Scope(\_SB)
/* Let coreboot update the flags */ /* Let coreboot update the flags */
TRAP(0xe5) TRAP(0xe5)
Store (0, Local0) Local0 = 0
If(And(RFDV, 0x01)) { If (RFDV & 0x01) {
Or(Local0, 0x01, Local0) Local0 |= 0x01
} }
If(And(RFDV, 0x02)) { If (RFDV & 0x02) {
Or(Local0, 0x02, Local0) Local0 |= 0x02
} }
If(And(RFDV, 0x04)) { If (RFDV & 0x04) {
Or(Local0, 0x04, Local0) Local0 |= 0x04
} }
If(And(RFDV, 0x08)) { If (RFDV & 0x08) {
Or(Local0, 0x08, Local0) Local0 |= 0x08
} }
If(And(GP15, 0x01)) { // GDIS If (GP15 & 0x01) { // GDIS
Or(Local0, 0x10, Local0) Local0 |= 0x10
} }
If(And(GP12, 0x01)) { // WIFI Led (WLED) If (GP12 & 0x01) { // WIFI Led (WLED)
Or(Local0, 0x20, Local0) Local0 |= 0x20
} }
If(And(BTEN, 0x01)) { // BlueTooth Enable If (BTEN & 0x01) { // BlueTooth Enable
Or(Local0, 0x40, Local0) Local0 |= 0x40
} }
If(And(GP10, 0x01)) { // GPS Enable If (GP10 & 0x01) { // GPS Enable
Or(Local0, 0x80, Local0) Local0 |= 0x80
} }
Return (Local0) Return (Local0)
@ -494,30 +494,30 @@ Scope(\_SB)
/* Set RFD */ /* Set RFD */
Method(SRFD, 1, Serialized) Method(SRFD, 1, Serialized)
{ {
If (And(Arg0, 0x01)) { If (Arg0 & 0x01) {
Store (1, GP14) // GLED GP14 = 1 // GLED
Store (1, GP15) // GDIS GP15 = 1 // GDIS
} Else { } Else {
Store (0, GP14) GP14 = 0
Store (0, GP15) GP15 = 0
} }
/* WIFI */ /* WIFI */
If (And(Arg0, 0x02)) { If (Arg0 & 0x02) {
Store (1, GP12) // WLED GP12 = 1 // WLED
Store (1, GP25) // WLAN GP25 = 1 // WLAN
} Else { } Else {
Store (0, GP12) GP12 = 0
Store (0, GP25) GP25 = 0
} }
/* Bluetooth */ /* Bluetooth */
If (And(Arg0, 0x04)) { If (Arg0 & 0x04) {
Store (1, GP13) // BLED GP13 = 1 // BLED
Store (1, BTEN) BTEN = 1
} Else { } Else {
Store (0, GP13) // BLED GP13 = 0 // BLED
Store (0, BTEN) BTEN = 0
} }
Return (0) Return (0)
} }
@ -539,7 +539,7 @@ Scope(\_SB)
/* Set IGD (Graphics) */ /* Set IGD (Graphics) */
Method(SIGD, 1, Serialized) Method(SIGD, 1, Serialized)
{ {
If (And(Arg0, 0x01)) { If (Arg0 & 0x01) {
TRAP(0xf7) TRAP(0xf7)
} Else { } Else {
TRAP(0xf8) TRAP(0xf8)
@ -550,7 +550,7 @@ Scope(\_SB)
/* SMI-C? Set Mic? */ /* SMI-C? Set Mic? */
Method (SMIC, 1, Serialized) Method (SMIC, 1, Serialized)
{ {
If (And(Arg0, 0x01)) { If (Arg0 & 0x01) {
TRAP(0xeb) TRAP(0xeb)
} Else { } Else {
TRAP(0xec) TRAP(0xec)
@ -567,7 +567,7 @@ Scope(\_SB)
/* Not even decent function names anymore? */ /* Not even decent function names anymore? */
Method(S024, 1, Serialized) Method(S024, 1, Serialized)
{ {
If (And(Arg0, 0x01)) { If (Arg0 & 0x01) {
TRAP(0xf1) TRAP(0xf1)
} Else { } Else {
TRAP(0xf2) TRAP(0xf2)
@ -585,13 +585,13 @@ Scope(\_SB)
/* ??? Something with PATA */ /* ??? Something with PATA */
Method(S025, 1, Serialized) Method(S025, 1, Serialized)
{ {
If(And(Arg0, 0x01)) { If (Arg0 & 0x01) {
TRAP(0xfc) TRAP(0xfc)
Store (1, GP33) // CREN GP33 = 1 // CREN
Sleep(1500) Sleep(1500)
Store (1, GP34) // CRRS GP34 = 1 // CRRS
Sleep(500) Sleep(500)
Notify(^^PCI0.PATA, 0) Notify(^^PCI0.PATA, 0)
@ -599,7 +599,7 @@ Scope(\_SB)
} Else { } Else {
TRAP(0xfb) TRAP(0xfb)
Sleep(1500) Sleep(1500)
Store(0, GP33) // CREN GP33 = 0 // CREN
Sleep(1500) Sleep(1500)
Notify(^^PCI0.PATA, 0) Notify(^^PCI0.PATA, 0)
Notify(^^PCI0.PATA.PRID, 0) Notify(^^PCI0.PATA.PRID, 0)
@ -613,16 +613,16 @@ Scope(\_SB)
Method(G021, 0, Serialized) Method(G021, 0, Serialized)
{ {
TRAP(0xfe) TRAP(0xfe)
If (LEqual(ACIN, 0)) { If (ACIN == 0) {
TRAP(0xfa) TRAP(0xfa)
TRAP(0xfd) TRAP(0xfd)
If (LEqual(ODDS, 1)) { If (ODDS == 1) {
TRAP(0xfb) TRAP(0xfb)
Notify(^^PCI0.PATA, 0) Notify(^^PCI0.PATA, 0)
Notify(^^PCI0.PATA.PRID.DSK1, 1) Notify(^^PCI0.PATA.PRID.DSK1, 1)
Notify(^^PCI0.PATA.PRID.DSK0, 1) Notify(^^PCI0.PATA.PRID.DSK0, 1)
Sleep (1500) Sleep (1500)
Store (0, GP33) // CREN GP33 = 0 // CREN
Sleep (1500) Sleep (1500)
Notify(^^PCI0.PATA, 0) Notify(^^PCI0.PATA, 0)
Notify(^^PCI0.PATA.PRID.DSK1, 1) Notify(^^PCI0.PATA.PRID.DSK1, 1)
@ -645,7 +645,7 @@ Scope(\_SB)
/* ??? */ /* ??? */
Method(S00B, 1, Serialized) Method(S00B, 1, Serialized)
{ {
If (And(Arg0, 1)) { If (Arg0 & 1) {
TRAP(0xdc) TRAP(0xdc)
} Else { } Else {
TRAP(0xdd) TRAP(0xdd)

View file

@ -9,23 +9,23 @@ Method(_PTS,1)
TRAP(0xed) TRAP(0xed)
Sleep(1000) Sleep(1000)
Store(0, \_SB.ACFG) \_SB.ACFG = 0
// Are we going to S4? // Are we going to S4?
If (Lequal(Arg0, 4)) { If (Arg0 == 4) {
TRAP(0xe7) TRAP(0xe7)
TRAP(0xea) TRAP(0xea)
} }
// Are we going to S5? // Are we going to S5?
If (Lequal(Arg0, 5)) { If (Arg0 == 5) {
TRAP(0xde) TRAP(0xde)
} }
// The 2.6.12.5 ACPI engine seems to optimize the // The 2.6.12.5 ACPI engine seems to optimize the
// If(LEqual(Arg0, 5)) path away. This keeps it from doing so: // If(Arg0 == 5) path away. This keeps it from doing so:
TRAP(Arg0) TRAP(Arg0)
Store(Arg0, DBG0) DBG0 = Arg0
// End of ugly OS bug workaround // End of ugly OS bug workaround
} }
@ -34,12 +34,12 @@ Method(_PTS,1)
Method(_WAK,1) Method(_WAK,1)
{ {
// Enable GPS // Enable GPS
Store (1, GP11) // GPSE GP11 = 1 // GPSE
// Wake from S3 or S4? // Wake from S3 or S4?
If (LOr(LEqual(Arg0, 3), LEqual(Arg0, 4))) { If ((Arg0 == 0x03) || (Arg0 == 0x04)) {
If (And(CFGD, 0x01000000)) { If (CFGD & 0x01000000) {
If (LAnd(And(CFGD, 0xf0), LEqual(OSYS, 2001))) { If ((CFGD & 0xF0) && (OSYS == 2001)) {
TRAP(0x3d) TRAP(0x3d)
} }
} }
@ -48,26 +48,26 @@ Method(_WAK,1)
// Notify PCI Express slots in case a card // Notify PCI Express slots in case a card
// was inserted while a sleep state was active. // was inserted while a sleep state was active.
If (LEqual(RP1D, 0)) { If (RP1D == 0) {
Notify(\_SB.PCI0.RP01, 0) Notify(\_SB.PCI0.RP01, 0)
} }
If (LEqual(RP3D, 0)) { If (RP3D == 0) {
Notify(\_SB.PCI0.RP03, 0) Notify(\_SB.PCI0.RP03, 0)
} }
If (LEqual(RP4D, 0)) { If (RP4D == 0) {
Notify(\_SB.PCI0.RP04, 0) Notify(\_SB.PCI0.RP04, 0)
} }
// Are we coming from S3? // Are we coming from S3?
If (LEqual(Arg0, 3)) { If (Arg0 == 3) {
TRAP(0xeb) TRAP(0xeb)
TRAP(0x46) TRAP(0x46)
} }
// Are we coming from S4? // Are we coming from S4?
If (LEqual(Arg0, 4)) { If (Arg0 == 4) {
Notify(SLPB, 0x02) Notify(SLPB, 0x02)
If (DTSE) { If (DTSE) {
TRAP(0x47) TRAP(0x47)
@ -75,16 +75,16 @@ Method(_WAK,1)
} }
// Windows XP SP2 P-State restore // Windows XP SP2 P-State restore
If (LAnd(LEqual(OSYS, 2002), And(CFGD, 1))) { If ((OSYS == 2002) && (CFGD & 0x01)) {
If (LGreater(\_SB.CP00._PPC, 0)) { If (\_SB.CP00._PPC > 0) {
Subtract(\_SB.CP00._PPC, 1, \_SB.CP00._PPC) \_SB.CP00._PPC -= 1
PNOT() PNOT()
Add(\_SB.CP00._PPC, 1, \_SB.CP00._PPC) \_SB.CP00._PPC += 1
PNOT() PNOT()
} Else { } Else {
Add(\_SB.CP00._PPC, 1, \_SB.CP00._PPC) \_SB.CP00._PPC += 1
PNOT() PNOT()
Subtract(\_SB.CP00._PPC, 1, \_SB.CP00._PPC) \_SB.CP00._PPC -= 1
PNOT() PNOT()
} }
} }
@ -118,7 +118,7 @@ Scope(\_SB)
* running: Windows XP SP1 needs to have C-State coordination * running: Windows XP SP1 needs to have C-State coordination
* enabled in SMM. * enabled in SMM.
*/ */
If (LAnd(LEqual(OSYS, 2001), MPEN)) { If ((OSYS == 2001) && MPEN) {
TRAP(0x3d) TRAP(0x3d)
} }

View file

@ -19,13 +19,13 @@ Device (SIO1)
Method (READ, 3) Method (READ, 3)
{ {
Acquire (SIOM, 0xffff) Acquire (SIOM, 0xffff)
If (LEqual(Arg0, 0)) { If (Arg0 == 0) {
Store (0x55, INDX) INDX = 0x55
Store (Arg1, INDX) INDX = Arg1
Store (DATA, Local1) Local1 = DATA
Store (0xaa, INDX) INDX = 0xaa
} }
And (Local1, Arg2, Local1) Local1 &= Arg2
Release(SIOM) Release(SIOM)
Return(Local1) Return(Local1)
} }
@ -33,11 +33,11 @@ Device (SIO1)
Method (WRIT, 3) Method (WRIT, 3)
{ {
Acquire (SIOM, 0xffff) Acquire (SIOM, 0xffff)
If (LEqual(Arg0, 0)) { If (Arg0 == 0) {
Store (0x55, INDX) INDX = 0x55
Store (Arg1, INDX) INDX = Arg1
Store (Arg2, DATA) DATA = Arg2
Store (0xaa, INDX) INDX = 0xaa
} }
Release(SIOM) Release(SIOM)
} }
@ -55,13 +55,13 @@ Device (SIO1)
Acquire (SIOM, 0xffff) Acquire (SIOM, 0xffff)
// Is the hardware enabled? // Is the hardware enabled?
Store (READ(0, 0x24, 0xff), Local0) Local0 = READ (0, 0x24, 0xff)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0xd) Return (0xd)
} Else { } Else {
// Power Enabled? // Power Enabled?
Store (READ(0, 0x02, 0x08), Local0) Local0 = READ (0, 0x02, 0x08)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0x0d) Return (0x0d)
} Else { } Else {
Return (0x0f) Return (0x0f)
@ -74,12 +74,12 @@ Device (SIO1)
{ {
WRIT(0, 0x24, 0x00) WRIT(0, 0x24, 0x00)
Store(READ(0, 0x28, 0x0f), Local0) Local0 = READ (0, 0x28, 0x0f)
WRIT(0, 0x28, Local0) WRIT(0, 0x28, Local0)
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Not(0x08, Local1) Local1 = ~0x08
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
} }
@ -104,8 +104,8 @@ Device (SIO1)
IRQNoFlags(_IRA) { 4 } IRQNoFlags(_IRA) { 4 }
}) })
And (_STA(), 0x02, Local0) Local0 = (_STA () & 0x02)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return(NONE) Return(NONE)
} }
@ -117,15 +117,15 @@ Device (SIO1)
\_SB.PCI0.LPCB.SIO1.UAR1._CRS._IRA._INT, IRQ) \_SB.PCI0.LPCB.SIO1.UAR1._CRS._IRA._INT, IRQ)
/* I/O Base */ /* I/O Base */
Store (READ(0, 0x24, 0xfe), Local0) Local0 = READ (0, 0x24, 0xfe)
ShiftLeft(Local0, 0x02, Local0) Local0 <<= 2
Store(Local0, IOMN) IOMN = Local0
Store(Local0, IOMX) IOMX = Local0
/* Interrupt */ /* Interrupt */
Store(READ(0, 0x28, 0xf0), Local0) Local0 = READ (0, 0x28, 0xf0)
ShiftRight(Local0, 4, Local0) Local0 >>= 4
ShiftLeft(1, Local0, IRQ) IRQ = 1 << Local0
Return(RSRC) Return(RSRC)
} }
@ -138,29 +138,29 @@ Device (SIO1)
WRIT(0, 0x24, 0) WRIT(0, 0x24, 0)
FindSetRightBit(IRQL, Local0) FindSetRightBit(IRQL, Local0)
Decrement(Local0) Local0--
ShiftLeft(Local0, 4, Local0) Local0 <<= 4
Store(READ(0, 0x28, 0x0f), Local1) Local1 = READ (0, 0x28, 0x0f)
Or(Local0, Local1, Local0) Local0 |= Local1
WRIT(0, 0x28, Local0) WRIT(0, 0x28, Local0)
Store(IOLO, Local0) Local0 = IOLO
ShiftRight(Local0, 2, Local0) Local0 >>= 2
And(Local0, 0xfe, Local0) Local0 &= 0xfe
Store(IOHI, Local1) Local1 = IOHI
ShiftLeft(Local1, 6, Local1) Local1 <<= 6
Or (Local0, Local1, Local0) Local0 |= Local1
WRIT(0, 0x24, Local0) WRIT(0, 0x24, Local0)
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Or(Local0, 0x08, Local0) Local0 |= 0x08
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
Store(READ(0, 0x07, 0xff), Local0) Local0 = READ (0, 0x07, 0xff)
Not(0x40, Local1) Local1 = ~0x40
And (Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x07, Local0) WRIT(0, 0x07, Local0)
} }
@ -168,22 +168,22 @@ Device (SIO1)
/* D0 state - Line drivers are on */ /* D0 state - Line drivers are on */
Method (_PS0, 0) Method (_PS0, 0)
{ {
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Or(Local0, 0x08, Local0) Local0 |= 0x08
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
Store (READ(0, 0x07, 0xff), Local0) Local0 = READ (0, 0x07, 0xff)
Not(0x40, Local1) Local1 = ~0x40
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x07, Local0) WRIT(0, 0x07, Local0)
} }
/* D3 State - Line drivers are off */ /* D3 State - Line drivers are off */
Method(_PS3, 0) Method(_PS3, 0)
{ {
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Not(0x08, Local1) Local1 = ~0x08
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
} }
} }
@ -199,19 +199,19 @@ Device (SIO1)
Method (_STA, 0) Method (_STA, 0)
{ {
/* IRDA? */ /* IRDA? */
Store(READ(0, 0x0c, 0x38), Local0) Local0 = READ(0, 0x0c, 0x38)
If (LNotEqual(Local0, Zero)) { If (Local0 != 0) {
Return (0) Return (0)
} }
// Is the hardware enabled? // Is the hardware enabled?
Store (READ(0, 0x25, 0xff), Local0) Local0 = READ (0, 0x25, 0xff)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0xd) Return (0xd)
} Else { } Else {
// Power Enabled? // Power Enabled?
Store (READ(0, 0x02, 0x80), Local0) Local0 = READ (0, 0x02, 0x80)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0x0d) Return (0x0d)
} Else { } Else {
Return (0x0f) Return (0x0f)
@ -224,12 +224,12 @@ Device (SIO1)
{ {
WRIT(0, 0x25, 0x00) WRIT(0, 0x25, 0x00)
Store(READ(0, 0x28, 0xf0), Local0) Local0 = READ (0, 0x28, 0xf0)
WRIT(0, 0x28, Local0) WRIT(0, 0x28, Local0)
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Not(0x80, Local1) Local1 = ~0x80
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
} }
@ -254,8 +254,8 @@ Device (SIO1)
IRQNoFlags(_IRB) { 3 } IRQNoFlags(_IRB) { 3 }
}) })
And (_STA(), 0x02, Local0) Local0 = _STA () & 0x02
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return(NONE) Return(NONE)
} }
@ -267,15 +267,15 @@ Device (SIO1)
\_SB.PCI0.LPCB.SIO1.UAR2._CRS._IRB._INT, IRQ) \_SB.PCI0.LPCB.SIO1.UAR2._CRS._IRB._INT, IRQ)
/* I/O Base */ /* I/O Base */
Store (READ(0, 0x25, 0xfe), Local0) Local0 = READ (0, 0x25, 0xfe)
ShiftLeft(Local0, 0x02, Local0) Local0 <<= 2
Store(Local0, IOMN) IOMN = Local0
Store(Local0, IOMX) IOMX = Local0
/* Interrupt */ /* Interrupt */
Store(READ(0, 0x28, 0x0f), Local0) Local0 = READ (0, 0x28, 0x0f)
ShiftRight(Local0, 4, Local0) Local0 >>= 4
ShiftLeft(1, Local0, IRQ) IRQ = 1 << Local0
Return(RSRC) Return(RSRC)
} }
@ -288,55 +288,55 @@ Device (SIO1)
WRIT(0, 0x25, 0) WRIT(0, 0x25, 0)
FindSetRightBit(IRQL, Local0) FindSetRightBit(IRQL, Local0)
Decrement(Local0) Local0--
Store(READ(0, 0x28, 0xf0), Local1) Local1 = READ (0x00, 0x28, 0xf0)
Or(Local0, Local1, Local0) Local0 |= Local1
WRIT(0, 0x28, Local0) WRIT(0, 0x28, Local0)
Store(IOLO, Local0) Local0 = IOLO
ShiftRight(Local0, 2, Local0) Local0 >>= 2
And(Local0, 0xfe, Local0) Local0 &= 0xfe
Store(IOHI, Local1) Local1 = IOHI
ShiftLeft(Local1, 6, Local1) Local1 <<= 6
Or (Local0, Local1, Local0) Local0 |= Local1
WRIT(0, 0x25, Local0) WRIT(0, 0x25, Local0)
Store(READ(0, 0x0c, 0xff), Local0) Local0 = READ (0, 0x0c, 0xff)
Not(0x38, Local1) Local1 = ~0x38
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x0c, Local0) WRIT(0, 0x0c, Local0)
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Or(Local0, 0x80, Local0) Local0 |= 0x80
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
Store(READ(0, 0x07, 0xff), Local0) Local0 = READ (0, 0x07, 0xff)
Not(0x20, Local1) Local1 = ~0x20
And (Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x07, Local0) WRIT(0, 0x07, Local0)
} }
/* D0 state - Line drivers are on */ /* D0 state - Line drivers are on */
Method (_PS0, 0) Method (_PS0, 0)
{ {
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Or(Local0, 0x80, Local0) Local0 |= 0x80
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
Store (READ(0, 0x07, 0xff), Local0) Local0 = READ (0, 0x07, 0xff)
Not(0x20, Local1) Local1 = ~0x20
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x07, Local0) WRIT(0, 0x07, Local0)
} }
/* D3 State - Line drivers are off */ /* D3 State - Line drivers are off */
Method(_PS3, 0) Method(_PS3, 0)
{ {
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Not(0x80, Local1) Local1 = ~0x80
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
} }
} }
@ -354,13 +354,13 @@ Device (SIO1)
Acquire (SIOM, 0xffff) Acquire (SIOM, 0xffff)
// Is the hardware enabled? // Is the hardware enabled?
Store (READ(0, 0x1b, 0xff), Local0) Local0 = READ (0, 0x1b, 0xff)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0xd) Return (0xd)
} Else { } Else {
// Power Enabled? // Power Enabled?
Store (READ(0, 0x02, 0x02), Local0) Local0 = READ (0, 0x02, 0x02)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0x0d) Return (0x0d)
} Else { } Else {
Return (0x0f) Return (0x0f)
@ -373,12 +373,12 @@ Device (SIO1)
{ {
WRIT(0, 0x1b, 0x00) WRIT(0, 0x1b, 0x00)
Store(READ(0, 0x1d, 0x0f), Local0) Local0 = READ (0, 0x1d, 0x0f)
WRIT(0, 0x1d, Local0) WRIT(0, 0x1d, Local0)
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Not(0x02, Local1) Local1 = ~0x02
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
} }
@ -403,8 +403,8 @@ Device (SIO1)
IRQNoFlags(_IRA) { 5 } IRQNoFlags(_IRA) { 5 }
}) })
And (_STA(), 0x02, Local0) Local0 = _STA () & 0x02
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return(NONE) Return(NONE)
} }
@ -416,15 +416,15 @@ Device (SIO1)
\_SB.PCI0.LPCB.SIO1.UAR3._CRS._IRA._INT, IRQ) \_SB.PCI0.LPCB.SIO1.UAR3._CRS._IRA._INT, IRQ)
/* I/O Base */ /* I/O Base */
Store (READ(0, 0x1b, 0xfe), Local0) Local0 = READ (0x00, 0x1b, 0xfe)
ShiftLeft(Local0, 0x02, Local0) Local0 <<= 2
Store(Local0, IOMN) IOMN = Local0
Store(Local0, IOMX) IOMX = Local0
/* Interrupt */ /* Interrupt */
Store(READ(0, 0x1d, 0xf0), Local0) Local0 = READ (0, 0x1d, 0xf0)
ShiftRight(Local0, 4, Local0) Local0 >>= 4
ShiftLeft(1, Local0, IRQ) IRQ = 1 << Local0
Return(RSRC) Return(RSRC)
} }
@ -437,29 +437,29 @@ Device (SIO1)
WRIT(0, 0x1b, 0) WRIT(0, 0x1b, 0)
FindSetRightBit(IRQL, Local0) FindSetRightBit(IRQL, Local0)
Decrement(Local0) Local0--
ShiftLeft(Local0, 4, Local0) Local0 <<= 4
Store(READ(0, 0x1d, 0x0f), Local1) Local1 = READ (0, 0x1d, 0x0f)
Or(Local0, Local1, Local0) Local0 |= Local1
WRIT(0, 0x1d, Local0) WRIT(0, 0x1d, Local0)
Store(IOLO, Local0) Local0 = IOLO
ShiftRight(Local0, 2, Local0) Local0 >>= 2
And(Local0, 0xfe, Local0) Local0 &= 0xfe
Store(IOHI, Local1) Local1 = IOHI
ShiftLeft(Local1, 6, Local1) Local1 <<= 6
Or (Local0, Local1, Local0) Local0 |= Local1
WRIT(0, 0x1b, Local0) WRIT(0, 0x1b, Local0)
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Or(Local0, 0x02, Local0) Local0 |= 0x02
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
Store(READ(0, 0x07, 0xff), Local0) Local0 = READ (0, 0x07, 0xff)
Not(0x04, Local1) Local1 = ~0x04
And (Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x07, Local0) WRIT(0, 0x07, Local0)
} }
@ -467,22 +467,22 @@ Device (SIO1)
/* D0 state - Line drivers are on */ /* D0 state - Line drivers are on */
Method (_PS0, 0) Method (_PS0, 0)
{ {
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Or(Local0, 0x02, Local0) Local0 |= 0x02
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
Store (READ(0, 0x07, 0xff), Local0) Local0 = READ (0, 0x07, 0xff)
Not(0x04, Local1) Local1 = ~0x04
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x07, Local0) WRIT(0, 0x07, Local0)
} }
/* D3 State - Line drivers are off */ /* D3 State - Line drivers are off */
Method(_PS3, 0) Method(_PS3, 0)
{ {
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Not(0x02, Local1) Local1 = ~0x02
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
} }
} }
@ -501,13 +501,13 @@ Device (SIO1)
Acquire (SIOM, 0xffff) Acquire (SIOM, 0xffff)
// Is the hardware enabled? // Is the hardware enabled?
Store (READ(0, 0x1c, 0xff), Local0) Local0 = READ (0, 0x1c, 0xff)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0xd) Return (0xd)
} Else { } Else {
// Power Enabled? // Power Enabled?
Store (READ(0, 0x02, 0x04), Local0) Local0 = READ (0, 0x02, 0x04)
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0x0d) Return (0x0d)
} Else { } Else {
Return (0x0f) Return (0x0f)
@ -520,12 +520,12 @@ Device (SIO1)
{ {
WRIT(0, 0x1c, 0x00) WRIT(0, 0x1c, 0x00)
Store(READ(0, 0x1d, 0x0f), Local0) Local0 = READ (0, 0x1d, 0x0f)
WRIT(0, 0x1d, Local0) WRIT(0, 0x1d, Local0)
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Not(0x04, Local1) Local1 = ~0x04
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
} }
@ -550,8 +550,8 @@ Device (SIO1)
IRQNoFlags(_IRA) { 11 } IRQNoFlags(_IRA) { 11 }
}) })
And (_STA(), 0x02, Local0) Local0 = _STA () & 0x02
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return(NONE) Return(NONE)
} }
@ -563,15 +563,15 @@ Device (SIO1)
\_SB.PCI0.LPCB.SIO1.UAR4._CRS._IRA._INT, IRQ) \_SB.PCI0.LPCB.SIO1.UAR4._CRS._IRA._INT, IRQ)
/* I/O Base */ /* I/O Base */
Store (READ(0, 0x1c, 0xfe), Local0) Local0 = READ (0, 0x1c, 0xfe)
ShiftLeft(Local0, 0x02, Local0) Local0 <<= 2
Store(Local0, IOMN) IOMN = Local0
Store(Local0, IOMX) IOMX = Local0
/* Interrupt */ /* Interrupt */
Store(READ(0, 0x1d, 0xf0), Local0) Local0 = READ (0, 0x1d, 0xf0)
ShiftRight(Local0, 4, Local0) Local0 >>= 4
ShiftLeft(1, Local0, IRQ) IRQ = 1 << Local0
Return(RSRC) Return(RSRC)
} }
@ -584,29 +584,29 @@ Device (SIO1)
WRIT(0, 0x1c, 0) WRIT(0, 0x1c, 0)
FindSetRightBit(IRQL, Local0) FindSetRightBit(IRQL, Local0)
Decrement(Local0) Local0--
ShiftLeft(Local0, 4, Local0) Local0 <<= 4
Store(READ(0, 0x1d, 0x0f), Local1) Local1 = READ (0x00, 0x1d, 0x0f)
Or(Local0, Local1, Local0) Local0 |= Local1
WRIT(0, 0x1d, Local0) WRIT(0, 0x1d, Local0)
Store(IOLO, Local0) Local0 = IOLO
ShiftRight(Local0, 2, Local0) Local0 >>= 2
And(Local0, 0xfe, Local0) Local0 &= 0xfe
Store(IOHI, Local1) Local1 = IOHI
ShiftLeft(Local1, 6, Local1) Local1 <<= 6
Or (Local0, Local1, Local0) Local0 |= Local1
WRIT(0, 0x1c, Local0) WRIT(0, 0x1c, Local0)
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Or(Local0, 0x04, Local0) Local0 |= 0x04
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
Store(READ(0, 0x07, 0xff), Local0) Local0 = READ (0, 0x07, 0xff)
Not(0x08, Local1) Local1 = ~0x08
And (Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x07, Local0) WRIT(0, 0x07, Local0)
} }
@ -614,22 +614,22 @@ Device (SIO1)
/* D0 state - Line drivers are on */ /* D0 state - Line drivers are on */
Method (_PS0, 0) Method (_PS0, 0)
{ {
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Or(Local0, 0x04, Local0) Local0 |= 0x04
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
Store (READ(0, 0x07, 0xff), Local0) Local0 = READ (0, 0x07, 0xff)
Not(0x08, Local1) Local1 = ~0x08
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x07, Local0) WRIT(0, 0x07, Local0)
} }
/* D3 State - Line drivers are off */ /* D3 State - Line drivers are off */
Method(_PS3, 0) Method(_PS3, 0)
{ {
Store(READ(0, 0x02, 0xff), Local0) Local0 = READ (0, 0x02, 0xff)
Not(0x04, Local1) Local1 = ~0x04
And(Local0, Local1, Local0) Local0 &= Local1
WRIT(0, 0x02, Local0) WRIT(0, 0x02, Local0)
} }
} }

View file

@ -17,11 +17,11 @@ Scope (\_TZ)
// Convert from °C to 1/10 Kelvin // Convert from °C to 1/10 Kelvin
Method(DEGR, 1, NotSerialized) Method(DEGR, 1, NotSerialized)
{ {
Store(Arg0, Local0) Local0 = Arg0
// 10ths of degrees // 10ths of degrees
Multiply(Local0, 10, Local0) Local0 *= 10
// 0°C is 273.15 K, we need to round it. // 0°C is 273.15 K, we need to round it.
Add(Local0, 2732, Local0) Local0 += 2732
Return(Local0) Return(Local0)
} }
@ -35,24 +35,24 @@ Scope (\_TZ)
// Critical shutdown temperature // Critical shutdown temperature
Method (_CRT, 0, Serialized) Method (_CRT, 0, Serialized)
{ {
Store(\_SB.PCI0.LPCB.EC0.CRTT, Local0) Local0 = \_SB.PCI0.LPCB.EC0.CRTT
Store(DEGR(Local0), Local0) Local0 = DEGR (Local0)
Return(Local0) Return(Local0)
} }
// CPU throttling start temperature // CPU throttling start temperature
Method (_PSV, 0, Serialized) Method (_PSV, 0, Serialized)
{ {
Store(\_SB.PCI0.LPCB.EC0.CTRO, Local0) Local0 = \_SB.PCI0.LPCB.EC0.CTRO
Store(DEGR(Local0), Local0) Local0 = DEGR (Local0)
Return(Local0) Return(Local0)
} }
// Get DTS Temperature // Get DTS Temperature
Method (_TMP, 0, Serialized) Method (_TMP, 0, Serialized)
{ {
Store(\_SB.PCI0.LPCB.EC0.CTMP, Local0) Local0 = \_SB.PCI0.LPCB.EC0.CTMP
Store(DEGR(Local0), Local0) Local0 = DEGR (Local0)
Return(Local0) Return(Local0)
} }