Skip to contentSkip to conversation

x86: qemu: Drop our own ACPI implementation

PATCH New Bin Meng 4 participants 10 messages Apr 13, 2016 – Apr 22, 2016 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

 arch/x86/cpu/qemu/Makefile             |   3 -
 arch/x86/cpu/qemu/acpi.c               | 176 --------------
 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl |  80 -------
 arch/x86/cpu/qemu/acpi/dbug.asl        |  25 --
 arch/x86/cpu/qemu/acpi/hpet.asl        |  31 ---
 arch/x86/cpu/qemu/acpi/isa.asl         | 102 --------
 arch/x86/cpu/qemu/acpi/pci-crs.asl     |  61 -----
 arch/x86/cpu/qemu/dsdt.asl             | 412 ---------------------------------
 8 files changed, 890 deletions(-)
 delete mode 100644 arch/x86/cpu/qemu/acpi.c
 delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl
 delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl
 delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl
 delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl
 delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl
 delete mode 100644 arch/x86/cpu/qemu/dsdt.asl
arch/x86/cpu/qemu/Makefile +0 -3
index 801413a..6eeddf1 100644
@@ -8,6 +8,3 @@ ifndef CONFIG_EFI_STUB
 obj-y += car.o dram.o
 endif
 obj-y += cpu.o fw_cfg.o qemu.o
-ifndef CONFIG_QEMU_ACPI_TABLE
-obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi.o dsdt.o
-endif
arch/x86/cpu/qemu/acpi.c deleted +0 -176

176 lines not on this page · raw message

arch/x86/cpu/qemu/acpi/cpu-hotplug.asl deleted +0 -80

80 lines not on this page · raw message

arch/x86/cpu/qemu/acpi/dbug.asl deleted +0 -25
deleted file mode 100644
index 38a6526..0000000
@@ -1,25 +0,0 @@
-/* Debugging */
-
-Scope(\) {
-    /* Debug Output */
-    OperationRegion(DBG, SystemIO, 0x0402, 0x01)
-    Field(DBG, ByteAcc, NoLock, Preserve) {
-        DBGB,   8,
-    }
-	/*
-	 * Debug method - use this method to send output to the QEMU
-	 * BIOS debug port.  This method handles strings, integers,
-	 * and buffers.  For example: DBUG("abc") DBUG(0x123)
-	 */
-    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)
-        }
-        Store(0x0a, dbgb)
-    }
-}
arch/x86/cpu/qemu/acpi/hpet.asl deleted +0 -31
deleted file mode 100644
index 983151e..0000000
@@ -1,31 +0,0 @@
-/* HPET */
-
-Scope(\_SB) {
-    Device(HPET) {
-        Name(_HID, EISAID("PNP0103"))
-        Name(_UID, 0)
-        OperationRegion(HPTM, SystemMemory, 0xfed00000, 0x400)
-        Field(HPTM, DWordAcc, Lock, Preserve) {
-            VEND, 32,
-            PRD, 32,
-        }
-        Method(_STA, 0, NotSerialized) {
-            Store(VEND, Local0)
-            Store(PRD, Local1)
-            ShiftRight(Local0, 16, Local0)
-            If (LOr(LEqual(Local0, 0), LEqual(Local0, 0xffff))) {
-                Return (0x0)
-            }
-            If (LOr(LEqual(Local1, 0), LGreater(Local1, 100000000))) {
-                Return (0x0)
-            }
-            Return (0x0f)
-        }
-        Name(_CRS, ResourceTemplate() {
-            Memory32Fixed(ReadOnly,
-                0xfed00000,         /* Address Base */
-                0x00000400,         /* Address Length */
-                )
-        })
-    }
-}
arch/x86/cpu/qemu/acpi/isa.asl deleted +0 -102

102 lines not on this page · raw message

arch/x86/cpu/qemu/acpi/pci-crs.asl deleted +0 -61

61 lines not on this page · raw message

arch/x86/cpu/qemu/dsdt.asl deleted +0 -412

412 lines not on this page · raw message

Signature · 1 line
1.8.2.1
author
#1 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

Quoted 11 lines · Bin Meng

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

Quoted 17 lines
 arch/x86/cpu/qemu/Makefile             |   3 -
 arch/x86/cpu/qemu/acpi.c               | 176 --------------
 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl |  80 -------
 arch/x86/cpu/qemu/acpi/dbug.asl        |  25 --
 arch/x86/cpu/qemu/acpi/hpet.asl        |  31 ---
 arch/x86/cpu/qemu/acpi/isa.asl         | 102 --------
 arch/x86/cpu/qemu/acpi/pci-crs.asl     |  61 -----
 arch/x86/cpu/qemu/dsdt.asl             | 412 ---------------------------------
 8 files changed, 890 deletions(-)
 delete mode 100644 arch/x86/cpu/qemu/acpi.c
 delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl
 delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl
 delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl
 delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl
 delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl
 delete mode 100644 arch/x86/cpu/qemu/dsdt.asl

applied to u-boot-x86, thanks!

#2 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

In reply to Bin Meng

Hi Bin,

Quoted 19 lines · Bin Meng

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

arch/x86/cpu/qemu/Makefile | 3 - arch/x86/cpu/qemu/acpi.c | 176 -------------- arch/x86/cpu/qemu/acpi/cpu-hotplug.asl | 80 ------- arch/x86/cpu/qemu/acpi/dbug.asl | 25 -- arch/x86/cpu/qemu/acpi/hpet.asl | 31 --- arch/x86/cpu/qemu/acpi/isa.asl | 102 -------- arch/x86/cpu/qemu/acpi/pci-crs.asl | 61 ----- arch/x86/cpu/qemu/dsdt.asl | 412 ---------------------------------

Quoted 8 lines
8 files changed, 890 deletions(-)

delete mode 100644 arch/x86/cpu/qemu/acpi.c delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl delete mode 100644 arch/x86/cpu/qemu/dsdt.asl

My only concern is that this was supposed to lead to ACPI support for real hardware. If you drop this, does it make it harder?

Regards,
Simon

#3 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

Hi Simon,

Do you want me to rework this with DM PCI ?
Regards,
Saket Sinha

Quoted 38 lines · Simon Glass

Hi Bin,

Quoted 19 lines · Bin Meng

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

arch/x86/cpu/qemu/Makefile | 3 - arch/x86/cpu/qemu/acpi.c | 176 -------------- arch/x86/cpu/qemu/acpi/cpu-hotplug.asl | 80 ------- arch/x86/cpu/qemu/acpi/dbug.asl | 25 -- arch/x86/cpu/qemu/acpi/hpet.asl | 31 --- arch/x86/cpu/qemu/acpi/isa.asl | 102 -------- arch/x86/cpu/qemu/acpi/pci-crs.asl | 61 ----- arch/x86/cpu/qemu/dsdt.asl | 412 ---------------------------------

Quoted 8 lines
8 files changed, 890 deletions(-)

delete mode 100644 arch/x86/cpu/qemu/acpi.c delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl delete mode 100644 arch/x86/cpu/qemu/dsdt.asl

My only concern is that this was supposed to lead to ACPI support for real hardware. If you drop this, does it make it harder?

Regards,
Simon

author
#4 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

In reply to Simon Glass

Hi Simon,

Quoted 31 lines · Simon Glass

Hi Bin,

Quoted 19 lines · Bin Meng

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

arch/x86/cpu/qemu/Makefile | 3 - arch/x86/cpu/qemu/acpi.c | 176 -------------- arch/x86/cpu/qemu/acpi/cpu-hotplug.asl | 80 ------- arch/x86/cpu/qemu/acpi/dbug.asl | 25 -- arch/x86/cpu/qemu/acpi/hpet.asl | 31 --- arch/x86/cpu/qemu/acpi/isa.asl | 102 -------- arch/x86/cpu/qemu/acpi/pci-crs.asl | 61 ----- arch/x86/cpu/qemu/dsdt.asl | 412 ---------------------------------

Quoted 8 lines
8 files changed, 890 deletions(-)

delete mode 100644 arch/x86/cpu/qemu/acpi.c delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl delete mode 100644 arch/x86/cpu/qemu/dsdt.asl

Quoted 4 lines

My only concern is that this was supposed to lead to ACPI support for real hardware. If you drop this, does it make it harder?

No, the infrastructure is still there. Only the QEMU ASL (manual) part was removed. I am going to add ACPI support to BayTrail soon (hopefully).

Regards,
Bin

#5 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

Hi Bin,

Quoted 35 lines · Bin Meng

Hi Simon,

Quoted 31 lines · Simon Glass

Hi Bin,

Quoted 27 lines · Bin Meng

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

arch/x86/cpu/qemu/Makefile | 3 - arch/x86/cpu/qemu/acpi.c | 176 -------------- arch/x86/cpu/qemu/acpi/cpu-hotplug.asl | 80 ------- arch/x86/cpu/qemu/acpi/dbug.asl | 25 -- arch/x86/cpu/qemu/acpi/hpet.asl | 31 --- arch/x86/cpu/qemu/acpi/isa.asl | 102 -------- arch/x86/cpu/qemu/acpi/pci-crs.asl | 61 ----- arch/x86/cpu/qemu/dsdt.asl | 412 ---------------------------------

8 files changed, 890 deletions(-)

delete mode 100644 arch/x86/cpu/qemu/acpi.c delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl delete mode 100644 arch/x86/cpu/qemu/dsdt.asl

Quoted 8 lines
Quoted 4 lines

My only concern is that this was supposed to lead to ACPI support for real hardware. If you drop this, does it make it harder?

No, the infrastructure is still there. Only the QEMU ASL (manual) part was removed. I am going to add ACPI support to BayTrail soon (hopefully).

OK, that's fine.

Regards,
Simon

#6 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

In reply to Bin Meng

Hi Bin,

Quoted 32 lines · Bin Meng
Quoted 31 lines · Simon Glass

Hi Bin,

Quoted 27 lines · Bin Meng

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

arch/x86/cpu/qemu/Makefile | 3 - arch/x86/cpu/qemu/acpi.c | 176 -------------- arch/x86/cpu/qemu/acpi/cpu-hotplug.asl | 80 ------- arch/x86/cpu/qemu/acpi/dbug.asl | 25 -- arch/x86/cpu/qemu/acpi/hpet.asl | 31 --- arch/x86/cpu/qemu/acpi/isa.asl | 102 -------- arch/x86/cpu/qemu/acpi/pci-crs.asl | 61 ----- arch/x86/cpu/qemu/dsdt.asl | 412 ---------------------------------

8 files changed, 890 deletions(-)

delete mode 100644 arch/x86/cpu/qemu/acpi.c delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl delete mode 100644 arch/x86/cpu/qemu/dsdt.asl

Quoted 8 lines
Quoted 4 lines

My only concern is that this was supposed to lead to ACPI support for real hardware. If you drop this, does it make it harder?

No, the infrastructure is still there. Only the QEMU ASL (manual) part was removed. I am going to add ACPI support to BayTrail soon (hopefully).

Interesting. This is also on my to-do list. We should definitely coordinate our efforts here. So please keep me updated once you really start here. I'll do the same. :)

Thanks,
Stefan

Signature · 7 lines
Viele Gr??e,
Stefan

--
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
author
#7 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

Hi Stefan,

Quoted 47 lines · Stefan Roese

Hi Bin,

Quoted 43 lines · Bin Meng
Quoted 39 lines · Simon Glass

Hi Bin,

Quoted 20 lines · Bin Meng

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

arch/x86/cpu/qemu/Makefile | 3 - arch/x86/cpu/qemu/acpi.c | 176 -------------- arch/x86/cpu/qemu/acpi/cpu-hotplug.asl | 80 ------- arch/x86/cpu/qemu/acpi/dbug.asl | 25 -- arch/x86/cpu/qemu/acpi/hpet.asl | 31 --- arch/x86/cpu/qemu/acpi/isa.asl | 102 -------- arch/x86/cpu/qemu/acpi/pci-crs.asl | 61 ----- arch/x86/cpu/qemu/dsdt.asl | 412 ---------------------------------

Quoted 8 lines
8 files changed, 890 deletions(-)

delete mode 100644 arch/x86/cpu/qemu/acpi.c delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl delete mode 100644 arch/x86/cpu/qemu/dsdt.asl

My only concern is that this was supposed to lead to ACPI support for real
hardware. If you drop this, does it make it harder?

Quoted 9 lines
Quoted 3 lines

No, the infrastructure is still there. Only the QEMU ASL (manual) part was removed. I am going to add ACPI support to BayTrail soon (hopefully).

Interesting. This is also on my to-do list. We should definitely coordinate our efforts here. So please keep me updated once you really start here. I'll do the same. :)

Definitely. I plan to ping you before I really start to write anything as I remember you did mention ACPI before. I don't want to see any duplicated effort :-)

Regards,
Bin

#8 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

Hi Stefan/Bin,

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

No, the infrastructure is still there. Only the QEMU ASL (manual) part was removed. I am going to add ACPI support to BayTrail soon (hopefully).

Quoted 9 lines
Quoted 4 lines

Interesting. This is also on my to-do list. We should definitely coordinate our efforts here. So please keep me updated once you really start here. I'll do the same. :)

Definitely. I plan to ping you before I really start to write anything as I remember you did mention ACPI before. I don't want to see any duplicated effort :-)

I am planning to resume my ACPI work for Minnowmax and have shared
the Minnowmax ACPI patches (with some issues and which would now be broken due to DM PCI).

I would need some guidance for this so let me know how we can co-ordinate on the same.

Regards,
Saket Sinha

author
#9 lore raw

PATCH 1/1 x86: qemu: Drop our own ACPI implementation

In reply to Simon Glass
Quoted 31 lines · Simon Glass

Hi Bin,

Quoted 19 lines · Bin Meng

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set) does not build anymore after x86 has been fully converted to DM PCI. Instead of trying to fix the build errors, given we now have the ACPI support via QEMU's fw_cfg interface, which is a more reliable way to generate correct ACPI tables then by ourselves, hence drop our own ACPI implementation.

---

arch/x86/cpu/qemu/Makefile | 3 - arch/x86/cpu/qemu/acpi.c | 176 -------------- arch/x86/cpu/qemu/acpi/cpu-hotplug.asl | 80 ------- arch/x86/cpu/qemu/acpi/dbug.asl | 25 -- arch/x86/cpu/qemu/acpi/hpet.asl | 31 --- arch/x86/cpu/qemu/acpi/isa.asl | 102 -------- arch/x86/cpu/qemu/acpi/pci-crs.asl | 61 ----- arch/x86/cpu/qemu/dsdt.asl | 412 ---------------------------------

Quoted 8 lines
8 files changed, 890 deletions(-)

delete mode 100644 arch/x86/cpu/qemu/acpi.c delete mode 100644 arch/x86/cpu/qemu/acpi/cpu-hotplug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/dbug.asl delete mode 100644 arch/x86/cpu/qemu/acpi/hpet.asl delete mode 100644 arch/x86/cpu/qemu/acpi/isa.asl delete mode 100644 arch/x86/cpu/qemu/acpi/pci-crs.asl delete mode 100644 arch/x86/cpu/qemu/dsdt.asl

Quoted 2 lines

Added the review tag, and applied to u-boot-x86, thanks!