mb/emulation/qemu-i440fx: Convert to ASL 2.0 syntax

Generated 'build/dsdt.dsl' files are identical.

Change-Id: I9157d9fc61339792dbbc45e82e1cb04fa51c6aae
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46077
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Elyes HAOUAS 2020-10-08 09:20:14 +02:00 committed by Patrick Georgi
parent 6245d076b9
commit a2c4cd7e08
5 changed files with 50 additions and 50 deletions

View file

@ -14,20 +14,20 @@ Scope(\_SB) {
// _MAT method - create an madt APIC buffer // _MAT method - create an madt APIC buffer
// Arg0 = Processor ID = Local APIC ID // Arg0 = Processor ID = Local APIC ID
// Local0 = CPON flag for this cpu // Local0 = CPON flag for this cpu
Store(DerefOf(Index(CPON, Arg0)), Local0) Local0 = DerefOf (CPON [Arg0])
// Local1 = Buffer (in madt APIC form) to return // Local1 = Buffer (in madt APIC form) to return
Store(Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}, Local1) Local1 = Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}
// Update the processor id, Local APIC id, and enable/disable status // Update the processor id, Local APIC id, and enable/disable status
Store(Arg0, Index(Local1, 2)) Local1 [2] = Arg0
Store(Arg0, Index(Local1, 3)) Local1 [3] = Arg0
Store(Local0, Index(Local1, 4)) Local1 [4] = Local0
Return (Local1) Return (Local1)
} }
Method(CPST, 1, NotSerialized) { Method(CPST, 1, NotSerialized) {
// _STA method - return ON status of cpu // _STA method - return ON status of cpu
// Arg0 = Processor ID = Local APIC ID // Arg0 = Processor ID = Local APIC ID
// Local0 = CPON flag for this cpu // Local0 = CPON flag for this cpu
Store(DerefOf(Index(CPON, Arg0)), Local0) Local0 = DerefOf (CPON [Arg0])
If (Local0) { If (Local0) {
Return (0xF) Return (0xF)
} Else { } Else {
@ -46,35 +46,35 @@ Scope(\_SB) {
} }
Method(PRSC, 0) { Method(PRSC, 0) {
// Local5 = active CPU bitmap // Local5 = active CPU bitmap
Store(PRS, Local5) Local5 = PRS
// Local2 = last read byte from bitmap // Local2 = last read byte from bitmap
Store(Zero, Local2) Local2 = 0
// Local0 = Processor ID / APIC ID iterator // Local0 = Processor ID / APIC ID iterator
Store(Zero, Local0) Local0 = 0
While (LLess(Local0, SizeOf(CPON))) { While (Local0 < SizeOf(CPON)) {
// Local1 = CPON flag for this cpu // Local1 = CPON flag for this cpu
Store(DerefOf(Index(CPON, Local0)), Local1) Local1 = DerefOf (CPON [Local0])
If (And(Local0, 0x07)) { If (Local0 & 0x07) {
// Shift down previously read bitmap byte // Shift down previously read bitmap byte
ShiftRight(Local2, 1, Local2) Local2 >>= 1
} Else { } Else {
// Read next byte from CPU bitmap // Read next byte from CPU bitmap
Store(DerefOf(Index(Local5, ShiftRight(Local0, 3))), Local2) Local2 = DerefOf (Local5 [Local0 >> 3])
} }
// Local3 = active state for this cpu // Local3 = active state for this cpu
Store(And(Local2, 1), Local3) Local3 = Local2 & 1
If (LNotEqual(Local1, Local3)) { If (Local1 != Local3) {
// State change - update CPON with new state // State change - update CPON with new state
Store(Local3, Index(CPON, Local0)) CPON [Local0] = Local3
// Do CPU notify // Do CPU notify
If (LEqual(Local3, 1)) { If (Local3 == 1) {
NTFY(Local0, 1) NTFY(Local0, 1)
} Else { } Else {
NTFY(Local0, 3) NTFY(Local0, 3)
} }
} }
Increment(Local0) Local0++
} }
} }
} }

View file

@ -17,12 +17,12 @@ Scope(\) {
Method(DBUG, 1) { Method(DBUG, 1) {
ToHexString(Arg0, Local0) ToHexString(Arg0, Local0)
ToBuffer(Local0, Local0) ToBuffer(Local0, Local0)
Subtract(SizeOf(Local0), 1, Local1) Local1 = SizeOf(Local0) - 1
Store(Zero, Local2) Local2 = 0
While (LLess(Local2, Local1)) { While (Local2 < Local1) {
Store(DerefOf(Index(Local0, Local2)), DBGB) DBGB = DerefOf( Local0 [Local2])
Increment(Local2) Local2++
} }
Store(0x0A, DBGB) DBGB = 0x0A
} }
} }

View file

@ -14,13 +14,13 @@ Scope(\_SB) {
PRD, 32, PRD, 32,
} }
Method(_STA, 0, NotSerialized) { Method(_STA, 0, NotSerialized) {
Store(VEND, Local0) Local0 = VEND
Store(PRD, Local1) Local1 = PRD
ShiftRight(Local0, 16, Local0) Local0 >>= 16
If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) { If ((Local0 == 0) || (Local0 == 0xffff)) {
Return (0x0) Return (0x0)
} }
If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) { If ((Local1 == 0) || (Local1 > 100000000)) {
Return (0x0) Return (0x0)
} }
Return (0x0F) Return (0x0F)

View file

@ -37,8 +37,8 @@ Scope(\_SB.PCI0.ISA) {
Device(FDC0) { Device(FDC0) {
Name(_HID, EisaId("PNP0700")) Name(_HID, EisaId("PNP0700"))
Method(_STA, 0, NotSerialized) { Method(_STA, 0, NotSerialized) {
Store(FDEN, Local0) Local0 = FDEN
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0x00) Return (0x00)
} Else { } Else {
Return (0x0F) Return (0x0F)
@ -55,8 +55,8 @@ Scope(\_SB.PCI0.ISA) {
Device(LPT) { Device(LPT) {
Name(_HID, EisaId("PNP0400")) Name(_HID, EisaId("PNP0400"))
Method(_STA, 0, NotSerialized) { Method(_STA, 0, NotSerialized) {
Store(LPEN, Local0) Local0 = LPEN
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0x00) Return (0x00)
} Else { } Else {
Return (0x0F) Return (0x0F)
@ -72,8 +72,8 @@ Scope(\_SB.PCI0.ISA) {
Name(_HID, EisaId("PNP0501")) Name(_HID, EisaId("PNP0501"))
Name(_UID, 0x01) Name(_UID, 0x01)
Method(_STA, 0, NotSerialized) { Method(_STA, 0, NotSerialized) {
Store(CAEN, Local0) Local0 = CAEN
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0x00) Return (0x00)
} Else { } Else {
Return (0x0F) Return (0x0F)
@ -89,8 +89,8 @@ Scope(\_SB.PCI0.ISA) {
Name(_HID, EisaId("PNP0501")) Name(_HID, EisaId("PNP0501"))
Name(_UID, 0x02) Name(_UID, 0x02)
Method(_STA, 0, NotSerialized) { Method(_STA, 0, NotSerialized) {
Store(CBEN, Local0) Local0 = CBEN
If (LEqual(Local0, 0)) { If (Local0 == 0) {
Return (0x00) Return (0x00)
} Else { } Else {
Return (0x0F) Return (0x0F)

View file

@ -49,7 +49,7 @@ DefinitionBlock (
Return (0x00) Return (0x00)
} }
Method(_S3D, 0, NotSerialized) { Method(_S3D, 0, NotSerialized) {
If (LEqual(VEND, 0x1001b36)) { If (VEND == 0x1001b36) {
Return (0x03) // QXL Return (0x03) // QXL
} Else { } Else {
Return (0x00) Return (0x00)
@ -121,7 +121,7 @@ DefinitionBlock (
/* Methods called by hotplug devices */ /* Methods called by hotplug devices */
Method(PCEJ, 1, NotSerialized) { Method(PCEJ, 1, NotSerialized) {
// _EJ0 method - eject callback // _EJ0 method - eject callback
Store(ShiftLeft(1, Arg0), B0EJ) B0EJ = 1 << Arg0
Return (0x0) Return (0x0)
} }
@ -131,13 +131,13 @@ DefinitionBlock (
/* PCI hotplug notify method */ /* PCI hotplug notify method */
Method(PCNF, 0) { Method(PCNF, 0) {
// Local0 = iterator // Local0 = iterator
Store(Zero, Local0) Local0 = 0
While (LLess(Local0, 31)) { While (Local0 < 31) {
Increment(Local0) Local0++
If (And(PCIU, ShiftLeft(1, Local0))) { If (PCIU & (1 << Local0)) {
PCNT(Local0, 1) PCNT(Local0, 1)
} }
If (And(PCID, ShiftLeft(1, Local0))) { If (PCID & (1 << Local0)) {
PCNT(Local0, 3) PCNT(Local0, 3)
} }
} }
@ -213,7 +213,7 @@ DefinitionBlock (
Method(IQST, 1, NotSerialized) { Method(IQST, 1, NotSerialized) {
// _STA method - get status // _STA method - get status
If (And(0x80, Arg0)) { If (0x80 & Arg0) {
Return (0x09) Return (0x09)
} }
Return (0x0B) Return (0x0B)
@ -224,8 +224,8 @@ DefinitionBlock (
Interrupt(, Level, ActiveHigh, Shared) { 0 } Interrupt(, Level, ActiveHigh, Shared) { 0 }
}) })
CreateDWordField(PRR0, 0x05, PRRI) CreateDWordField(PRR0, 0x05, PRRI)
If (LLess(Arg0, 0x80)) { If (Arg0 < 0x80) {
Store(Arg0, PRRI) PRRI = Arg0
} }
Return (PRR0) Return (PRR0)
} }
@ -243,14 +243,14 @@ DefinitionBlock (
Return (IQST(reg)) \ Return (IQST(reg)) \
} \ } \
Method(_DIS, 0, NotSerialized) { \ Method(_DIS, 0, NotSerialized) { \
Or(reg, 0x80, reg) \ reg |= 0x80 \
} \ } \
Method(_CRS, 0, NotSerialized) { \ Method(_CRS, 0, NotSerialized) { \
Return (IQCR(reg)) \ Return (IQCR(reg)) \
} \ } \
Method(_SRS, 1, NotSerialized) { \ Method(_SRS, 1, NotSerialized) { \
CreateDWordField(Arg0, 0x05, PRRI) \ CreateDWordField(Arg0, 0x05, PRRI) \
Store(PRRI, reg) \ reg = PRRI \
} \ } \
} }