summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-10-08 09:20:14 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-01-28 09:16:58 +0000
commita2c4cd7e086ec890f567ce74adb1c9ee880fff59 (patch)
treeb1d506c531479ed6a613a6c6f8600250bf481cd3 /src
parent6245d076b96cfdddbea6bcc21ed9f0fba222b928 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/emulation/qemu-i440fx/acpi/cpu-hotplug.asl38
-rw-r--r--src/mainboard/emulation/qemu-i440fx/acpi/dbug.asl12
-rw-r--r--src/mainboard/emulation/qemu-i440fx/acpi/hpet.asl10
-rw-r--r--src/mainboard/emulation/qemu-i440fx/acpi/isa.asl16
-rw-r--r--src/mainboard/emulation/qemu-i440fx/dsdt.asl24
5 files changed, 50 insertions, 50 deletions
diff --git a/src/mainboard/emulation/qemu-i440fx/acpi/cpu-hotplug.asl b/src/mainboard/emulation/qemu-i440fx/acpi/cpu-hotplug.asl
index 3969f25f6a..1805f7983f 100644
--- a/src/mainboard/emulation/qemu-i440fx/acpi/cpu-hotplug.asl
+++ b/src/mainboard/emulation/qemu-i440fx/acpi/cpu-hotplug.asl
@@ -14,20 +14,20 @@ Scope(\_SB) {
// _MAT method - create an madt APIC buffer
// Arg0 = Processor ID = Local APIC ID
// Local0 = CPON flag for this cpu
- Store(DerefOf(Index(CPON, Arg0)), Local0)
+ Local0 = DerefOf (CPON [Arg0])
// 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
- Store(Arg0, Index(Local1, 2))
- Store(Arg0, Index(Local1, 3))
- Store(Local0, Index(Local1, 4))
+ Local1 [2] = Arg0
+ Local1 [3] = Arg0
+ Local1 [4] = Local0
Return (Local1)
}
Method(CPST, 1, NotSerialized) {
// _STA method - return ON status of cpu
// Arg0 = Processor ID = Local APIC ID
// Local0 = CPON flag for this cpu
- Store(DerefOf(Index(CPON, Arg0)), Local0)
+ Local0 = DerefOf (CPON [Arg0])
If (Local0) {
Return (0xF)
} Else {
@@ -46,35 +46,35 @@ Scope(\_SB) {
}
Method(PRSC, 0) {
// Local5 = active CPU bitmap
- Store(PRS, Local5)
+ Local5 = PRS
// Local2 = last read byte from bitmap
- Store(Zero, Local2)
+ Local2 = 0
// Local0 = Processor ID / APIC ID iterator
- Store(Zero, Local0)
- While (LLess(Local0, SizeOf(CPON))) {
+ Local0 = 0
+ While (Local0 < SizeOf(CPON)) {
// Local1 = CPON flag for this cpu
- Store(DerefOf(Index(CPON, Local0)), Local1)
- If (And(Local0, 0x07)) {
+ Local1 = DerefOf (CPON [Local0])
+ If (Local0 & 0x07) {
// Shift down previously read bitmap byte
- ShiftRight(Local2, 1, Local2)
+ Local2 >>= 1
} Else {
// 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
- Store(And(Local2, 1), Local3)
+ Local3 = Local2 & 1
- If (LNotEqual(Local1, Local3)) {
+ If (Local1 != Local3) {
// State change - update CPON with new state
- Store(Local3, Index(CPON, Local0))
+ CPON [Local0] = Local3
// Do CPU notify
- If (LEqual(Local3, 1)) {
+ If (Local3 == 1) {
NTFY(Local0, 1)
} Else {
NTFY(Local0, 3)
}
}
- Increment(Local0)
+ Local0++
}
}
}
diff --git a/src/mainboard/emulation/qemu-i440fx/acpi/dbug.asl b/src/mainboard/emulation/qemu-i440fx/acpi/dbug.asl
index 5fe06b43d1..ff09db4b6e 100644
--- a/src/mainboard/emulation/qemu-i440fx/acpi/dbug.asl
+++ b/src/mainboard/emulation/qemu-i440fx/acpi/dbug.asl
@@ -17,12 +17,12 @@ Scope(\) {
Method(DBUG, 1) {
ToHexString(Arg0, Local0)
ToBuffer(Local0, Local0)
- Subtract(SizeOf(Local0), 1, Local1)
- Store(Zero, Local2)
- While (LLess(Local2, Local1)) {
- Store(DerefOf(Index(Local0, Local2)), DBGB)
- Increment(Local2)
+ Local1 = SizeOf(Local0) - 1
+ Local2 = 0
+ While (Local2 < Local1) {
+ DBGB = DerefOf( Local0 [Local2])
+ Local2++
}
- Store(0x0A, DBGB)
+ DBGB = 0x0A
}
}
diff --git a/src/mainboard/emulation/qemu-i440fx/acpi/hpet.asl b/src/mainboard/emulation/qemu-i440fx/acpi/hpet.asl
index 51e4f74267..da670cf889 100644
--- a/src/mainboard/emulation/qemu-i440fx/acpi/hpet.asl
+++ b/src/mainboard/emulation/qemu-i440fx/acpi/hpet.asl
@@ -14,13 +14,13 @@ Scope(\_SB) {
PRD, 32,
}
Method(_STA, 0, NotSerialized) {
- Store(VEND, Local0)
- Store(PRD, Local1)
- ShiftRight(Local0, 16, Local0)
- If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
+ Local0 = VEND
+ Local1 = PRD
+ Local0 >>= 16
+ If ((Local0 == 0) || (Local0 == 0xffff)) {
Return (0x0)
}
- If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) {
+ If ((Local1 == 0) || (Local1 > 100000000)) {
Return (0x0)
}
Return (0x0F)
diff --git a/src/mainboard/emulation/qemu-i440fx/acpi/isa.asl b/src/mainboard/emulation/qemu-i440fx/acpi/isa.asl
index 38374a1ca3..a547c93cd4 100644
--- a/src/mainboard/emulation/qemu-i440fx/acpi/isa.asl
+++ b/src/mainboard/emulation/qemu-i440fx/acpi/isa.asl
@@ -37,8 +37,8 @@ Scope(\_SB.PCI0.ISA) {
Device(FDC0) {
Name(_HID, EisaId("PNP0700"))
Method(_STA, 0, NotSerialized) {
- Store(FDEN, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = FDEN
+ If (Local0 == 0) {
Return (0x00)
} Else {
Return (0x0F)
@@ -55,8 +55,8 @@ Scope(\_SB.PCI0.ISA) {
Device(LPT) {
Name(_HID, EisaId("PNP0400"))
Method(_STA, 0, NotSerialized) {
- Store(LPEN, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = LPEN
+ If (Local0 == 0) {
Return (0x00)
} Else {
Return (0x0F)
@@ -72,8 +72,8 @@ Scope(\_SB.PCI0.ISA) {
Name(_HID, EisaId("PNP0501"))
Name(_UID, 0x01)
Method(_STA, 0, NotSerialized) {
- Store(CAEN, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = CAEN
+ If (Local0 == 0) {
Return (0x00)
} Else {
Return (0x0F)
@@ -89,8 +89,8 @@ Scope(\_SB.PCI0.ISA) {
Name(_HID, EisaId("PNP0501"))
Name(_UID, 0x02)
Method(_STA, 0, NotSerialized) {
- Store(CBEN, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = CBEN
+ If (Local0 == 0) {
Return (0x00)
} Else {
Return (0x0F)
diff --git a/src/mainboard/emulation/qemu-i440fx/dsdt.asl b/src/mainboard/emulation/qemu-i440fx/dsdt.asl
index 6c298cf672..94772f2ca6 100644
--- a/src/mainboard/emulation/qemu-i440fx/dsdt.asl
+++ b/src/mainboard/emulation/qemu-i440fx/dsdt.asl
@@ -49,7 +49,7 @@ DefinitionBlock (
Return (0x00)
}
Method(_S3D, 0, NotSerialized) {
- If (LEqual(VEND, 0x1001b36)) {
+ If (VEND == 0x1001b36) {
Return (0x03) // QXL
} Else {
Return (0x00)
@@ -121,7 +121,7 @@ DefinitionBlock (
/* Methods called by hotplug devices */
Method(PCEJ, 1, NotSerialized) {
// _EJ0 method - eject callback
- Store(ShiftLeft(1, Arg0), B0EJ)
+ B0EJ = 1 << Arg0
Return (0x0)
}
@@ -131,13 +131,13 @@ DefinitionBlock (
/* PCI hotplug notify method */
Method(PCNF, 0) {
// Local0 = iterator
- Store(Zero, Local0)
- While (LLess(Local0, 31)) {
- Increment(Local0)
- If (And(PCIU, ShiftLeft(1, Local0))) {
+ Local0 = 0
+ While (Local0 < 31) {
+ Local0++
+ If (PCIU & (1 << Local0)) {
PCNT(Local0, 1)
}
- If (And(PCID, ShiftLeft(1, Local0))) {
+ If (PCID & (1 << Local0)) {
PCNT(Local0, 3)
}
}
@@ -213,7 +213,7 @@ DefinitionBlock (
Method(IQST, 1, NotSerialized) {
// _STA method - get status
- If (And(0x80, Arg0)) {
+ If (0x80 & Arg0) {
Return (0x09)
}
Return (0x0B)
@@ -224,8 +224,8 @@ DefinitionBlock (
Interrupt(, Level, ActiveHigh, Shared) { 0 }
})
CreateDWordField(PRR0, 0x05, PRRI)
- If (LLess(Arg0, 0x80)) {
- Store(Arg0, PRRI)
+ If (Arg0 < 0x80) {
+ PRRI = Arg0
}
Return (PRR0)
}
@@ -243,14 +243,14 @@ DefinitionBlock (
Return (IQST(reg)) \
} \
Method(_DIS, 0, NotSerialized) { \
- Or(reg, 0x80, reg) \
+ reg |= 0x80 \
} \
Method(_CRS, 0, NotSerialized) { \
Return (IQCR(reg)) \
} \
Method(_SRS, 1, NotSerialized) { \
CreateDWordField(Arg0, 0x05, PRRI) \
- Store(PRRI, reg) \
+ reg = PRRI \
} \
}