Signed-off-by: Igor Mammedov <imamm...@redhat.com> --- hw/i386/acpi-build.c | 27 ++++++++++++++++++------ hw/i386/acpi-dsdt-isa.dsl | 52 ----------------------------------------------- hw/i386/acpi-dsdt.dsl | 3 --- hw/i386/q35-acpi-dsdt.dsl | 3 --- 4 files changed, 21 insertions(+), 64 deletions(-) delete mode 100644 hw/i386/acpi-dsdt-isa.dsl
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index bd03491..9bb10d6 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1172,7 +1172,7 @@ static void build_hpet_aml(Aml *table) } static Aml * -build_eisa_device_aml(const char *name, const char *hid, Aml *crs, +build_eisa_device_aml(const char *name, const char *hid, Aml *uid, Aml *crs, bool have_sta, const char *present_field) { Aml *dev; @@ -1180,6 +1180,9 @@ build_eisa_device_aml(const char *name, const char *hid, Aml *crs, dev = aml_device("%s", name); aml_append(dev, aml_name_decl("_HID", aml_eisaid(hid))); + if (uid) { + aml_append(dev, aml_name_decl("_UID", uid)); + } if (have_sta) { Aml *if_ctx; Aml *else_ctx; @@ -1218,19 +1221,19 @@ static void build_isa_devices_aml(Aml *table) aml_append(crs, aml_irq_no_flags(8)); aml_append(crs, aml_io(AML_DECODE16, 0x0072, 0x0072, 0x02, 0x06)); aml_append(scope, build_eisa_device_aml( - "RTC", "PNP0B00", crs, false, NULL)); + "RTC", "PNP0B00", NULL, crs, false, NULL)); crs = aml_resource_template(); aml_append(crs, aml_io(AML_DECODE16, 0x0060, 0x0060, 0x01, 0x01)); aml_append(crs, aml_io(AML_DECODE16, 0x0064, 0x0064, 0x01, 0x01)); aml_append(crs, aml_irq_no_flags(1)); aml_append(scope, build_eisa_device_aml( - "KBD", "PNP0303", crs, true, NULL)); + "KBD", "PNP0303", NULL, crs, true, NULL)); crs = aml_resource_template(); aml_append(crs, aml_irq_no_flags(12)); aml_append(scope, build_eisa_device_aml( - "MOU", "PNP0F13", crs, true, NULL)); + "MOU", "PNP0F13", NULL, crs, true, NULL)); crs = aml_resource_template(); aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04)); @@ -1239,13 +1242,25 @@ static void build_isa_devices_aml(Aml *table) aml_append(crs, aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2)); aml_append(scope, build_eisa_device_aml( - "FDC0", "PNP0700", crs, true, "FDEN")); + "FDC0", "PNP0700", NULL, crs, true, "FDEN")); crs = aml_resource_template(); aml_append(crs, aml_io(AML_DECODE16, 0x0378, 0x0378, 0x08, 0x08)); aml_append(crs, aml_irq_no_flags(7)); aml_append(scope, build_eisa_device_aml( - "LPT", "PNP0400", crs, true, "LPEN")); + "LPT", "PNP0400", NULL, crs, true, "LPEN")); + + crs = aml_resource_template(); + aml_append(crs, aml_io(AML_DECODE16, 0x03F8, 0x03F8, 0x00, 0x08)); + aml_append(crs, aml_irq_no_flags(4)); + aml_append(scope, build_eisa_device_aml( + "COM1", "PNP0501", aml_int(1), crs, true, "CAEN")); + + crs = aml_resource_template(); + aml_append(crs, aml_io(AML_DECODE16, 0x02F8, 0x02F8, 0x00, 0x08)); + aml_append(crs, aml_irq_no_flags(3)); + aml_append(scope, build_eisa_device_aml( + "COM2", "PNP0501", aml_int(2), crs, true, "CBEN")); aml_append(table, scope); } diff --git a/hw/i386/acpi-dsdt-isa.dsl b/hw/i386/acpi-dsdt-isa.dsl deleted file mode 100644 index cc5e8f9..0000000 --- a/hw/i386/acpi-dsdt-isa.dsl +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License along - * with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -/* Common legacy ISA style devices. */ -Scope(\_SB.PCI0.ISA) { - - Device(COM1) { - Name(_HID, EisaId("PNP0501")) - Name(_UID, 0x01) - Method(_STA, 0, NotSerialized) { - Store(CAEN, Local0) - If (LEqual(Local0, 0)) { - Return (0x00) - } Else { - Return (0x0F) - } - } - Name(_CRS, ResourceTemplate() { - IO(Decode16, 0x03F8, 0x03F8, 0x00, 0x08) - IRQNoFlags() { 4 } - }) - } - - Device(COM2) { - Name(_HID, EisaId("PNP0501")) - Name(_UID, 0x02) - Method(_STA, 0, NotSerialized) { - Store(CBEN, Local0) - If (LEqual(Local0, 0)) { - Return (0x00) - } Else { - Return (0x0F) - } - } - Name(_CRS, ResourceTemplate() { - IO(Decode16, 0x02F8, 0x02F8, 0x00, 0x08) - IRQNoFlags() { 3 } - }) - } -} diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl index 55c2220..6048cc7 100644 --- a/hw/i386/acpi-dsdt.dsl +++ b/hw/i386/acpi-dsdt.dsl @@ -80,9 +80,6 @@ DefinitionBlock ( } } -#include "acpi-dsdt-isa.dsl" - - /**************************************************************** * PCI hotplug ****************************************************************/ diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl index bf3f974..4862ded 100644 --- a/hw/i386/q35-acpi-dsdt.dsl +++ b/hw/i386/q35-acpi-dsdt.dsl @@ -146,9 +146,6 @@ DefinitionBlock ( } } -#include "acpi-dsdt-isa.dsl" - - /**************************************************************** * PCI IRQs ****************************************************************/ -- 1.8.3.1