summaryrefslogtreecommitdiff
path: root/src/mainboard/emulation/qemu-i440fx/acpi
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/mainboard/emulation/qemu-i440fx/acpi
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/mainboard/emulation/qemu-i440fx/acpi')
-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
4 files changed, 38 insertions, 38 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)