From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591860688; cv=none; d=zohomail.com; s=zohoarc; b=Z5ymkKy6yQz8iRc3c6JNHMVZ/9P+4oiWdpVKt1/rR2Gp3Y3ijD26wOWM1ouvxxb+rf47bko+Zav/qGSa0K3B1TTcIZO/GjhUVK0zGZDgon5Zm1ihz6vNC2kVftK0pMGRDKxzqASBohA0b7BDcyIRmBGddluO+l/dsFhcjVLHrEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591860688; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=gBG7LrfwAL4cryPqRpV45mOpYU3w0HF0GbF0spNmgnM=; b=X4Uom0OihaNwvoCwCxIIDIntxc34aEoRKFvvg1H5cRscLhXeyR0+49x0zGwjDZ0+r6oeeTmkQbReCPGz4FKmZfSxK3KTpeWSjXl7C8YZPjWW0rqJOcSevRU6rugk20kBu6tg+Bk3kbOsRW//m/2kT5FaeWw++2mYtwiKCwcgXT8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591860688740720.5392551311672; Thu, 11 Jun 2020 00:31:28 -0700 (PDT) Received: from localhost ([::1]:37242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHgM-0001YQ-8v for importer@patchew.org; Thu, 11 Jun 2020 03:31:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHea-0008AM-Uc for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:36 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:25330 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHea-0004gp-6U for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:36 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-508-rbx0IOU2OIGQ73_U67JcXA-1; Thu, 11 Jun 2020 03:29:31 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 235C3EC1A3; Thu, 11 Jun 2020 07:29:30 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC4FB100238E; Thu, 11 Jun 2020 07:29:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A53471750A; Thu, 11 Jun 2020 09:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=gBG7LrfwAL4cryPqRpV45mOpYU3w0HF0GbF0spNmgnM=; b=fB1t3uJCi6A5cUDX52u8iaGGu6pKj46eeNA9lcf59+J99CqLjQEI4amarbnWxYOrKCQUYP 05tB5G1QnXlxs0u+ru9gOQAY2xH4uovDIYuSeHTO1YTz9QdRXur2/FvFSlhc+ywD4RIno5 f6pLZ2BSBFEv6cK2nLdPjw+achlE5KI= X-MC-Unique: rbx0IOU2OIGQ73_U67JcXA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 01/10] qtest: allow DSDT acpi table changes Date: Thu, 11 Jun 2020 09:29:10 +0200 Message-Id: <20200611072919.16638-2-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8bf4..6a052c50447a 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,18 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/pc/DSDT", +"tests/data/acpi/pc/DSDT.acpihmat", +"tests/data/acpi/pc/DSDT.bridge", +"tests/data/acpi/pc/DSDT.cphp", +"tests/data/acpi/pc/DSDT.dimmpxm", +"tests/data/acpi/pc/DSDT.ipmikcs", +"tests/data/acpi/pc/DSDT.memhp", +"tests/data/acpi/pc/DSDT.numamem", +"tests/data/acpi/q35/DSDT", +"tests/data/acpi/q35/DSDT.acpihmat", +"tests/data/acpi/q35/DSDT.bridge", +"tests/data/acpi/q35/DSDT.cphp", +"tests/data/acpi/q35/DSDT.dimmpxm", +"tests/data/acpi/q35/DSDT.ipmibt", +"tests/data/acpi/q35/DSDT.memhp", +"tests/data/acpi/q35/DSDT.mmio64", +"tests/data/acpi/q35/DSDT.numamem", --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591861135; cv=none; d=zohomail.com; s=zohoarc; b=BbxvydywsvSZCYpJMcE3gWkOV8wCGsWjI/LVczCqxRY1uwwCHrcuRaH68oEhnpAuWlAtXbu064bdmgXWNXl/BYr9KfirQhKiv3dIClrv8mEc1QNREQszxwEEPSkQHeZybNUgd0QYxAeTZXmcewFHc81iGl0ZZUBLQa7CH48ZkeM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591861135; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=ATI7m16SCuNy+Jab1DsewPMACsTqqtSHU8CUglFAJ5M=; b=bpvq7wVycMXfcKjN2A22hU/7kj62OtaK3bRh0oLfaRk93mVFO4iZMP0bmkQdHfBJolUlhwgNT7aw+XOVA+letg4vSC/6qw219eN/vpI2GWCS4qH6xvWqJyLKl/MabrBMfo6N5mgAPZ1rYITddbAobtzDMWi4MBsC6+U+/yPzApI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591861135879337.0156536444607; Thu, 11 Jun 2020 00:38:55 -0700 (PDT) Received: from localhost ([::1]:35282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHna-0004mf-IP for importer@patchew.org; Thu, 11 Jun 2020 03:38:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHjS-0007YF-I5 for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:34:38 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:33192 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHjR-0005iF-FW for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:34:38 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-125-3d7KLYllP--Tz8hHmsk-jg-1; Thu, 11 Jun 2020 03:29:31 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 891D9872FE0; Thu, 11 Jun 2020 07:29:30 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1FB75D9D3; Thu, 11 Jun 2020 07:29:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B320717510; Thu, 11 Jun 2020 09:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=ATI7m16SCuNy+Jab1DsewPMACsTqqtSHU8CUglFAJ5M=; b=HM9QPKBbSNweem+jbYzHsHt25YMpPivGFedIbRVF+rWeg18vlHXVnNGq9wAQHZsHLCaNSu C3NFkmjgXrQKQoWyAkq0t5vWRFFwWMELMeJseXlh2rT2dyUijzti1VIEkiGS65x8mztyrb TXEoC6mryoHX77iTdaqe5wvPDlxHiMc= X-MC-Unique: 3d7KLYllP--Tz8hHmsk-jg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 02/10] acpi: move aml builder code for floppy device Date: Thu, 11 Jun 2020 09:29:11 +0200 Message-Id: <20200611072919.16638-3-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/block/fdc.c | 83 ++++++++++++++++++++++++++++++++++++++++++++ hw/i386/acpi-build.c | 83 -------------------------------------------- stubs/cmos.c | 7 ++++ stubs/Makefile.objs | 1 + 4 files changed, 91 insertions(+), 83 deletions(-) create mode 100644 stubs/cmos.c diff --git a/hw/block/fdc.c b/hw/block/fdc.c index c5fb9d6ece77..b4d2eaf66dcd 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -32,6 +32,8 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/timer.h" +#include "hw/i386/pc.h" +#include "hw/acpi/aml-build.h" #include "hw/irq.h" #include "hw/isa/isa.h" #include "hw/qdev-properties.h" @@ -2765,6 +2767,85 @@ void isa_fdc_get_drive_max_chs(FloppyDriveType type, (*maxc)--; } =20 +static Aml *build_fdinfo_aml(int idx, FloppyDriveType type) +{ + Aml *dev, *fdi; + uint8_t maxc, maxh, maxs; + + isa_fdc_get_drive_max_chs(type, &maxc, &maxh, &maxs); + + dev =3D aml_device("FLP%c", 'A' + idx); + + aml_append(dev, aml_name_decl("_ADR", aml_int(idx))); + + fdi =3D aml_package(16); + aml_append(fdi, aml_int(idx)); /* Drive Number */ + aml_append(fdi, + aml_int(cmos_get_fd_drive_type(type))); /* Device Type */ + /* + * the values below are the limits of the drive, and are thus independ= ent + * of the inserted media + */ + aml_append(fdi, aml_int(maxc)); /* Maximum Cylinder Number */ + aml_append(fdi, aml_int(maxs)); /* Maximum Sector Number */ + aml_append(fdi, aml_int(maxh)); /* Maximum Head Number */ + /* + * SeaBIOS returns the below values for int 0x13 func 0x08 regardless = of + * the drive type, so shall we + */ + aml_append(fdi, aml_int(0xAF)); /* disk_specify_1 */ + aml_append(fdi, aml_int(0x02)); /* disk_specify_2 */ + aml_append(fdi, aml_int(0x25)); /* disk_motor_wait */ + aml_append(fdi, aml_int(0x02)); /* disk_sector_siz */ + aml_append(fdi, aml_int(0x12)); /* disk_eot */ + aml_append(fdi, aml_int(0x1B)); /* disk_rw_gap */ + aml_append(fdi, aml_int(0xFF)); /* disk_dtl */ + aml_append(fdi, aml_int(0x6C)); /* disk_formt_gap */ + aml_append(fdi, aml_int(0xF6)); /* disk_fill */ + aml_append(fdi, aml_int(0x0F)); /* disk_head_sttl */ + aml_append(fdi, aml_int(0x08)); /* disk_motor_strt */ + + aml_append(dev, aml_name_decl("_FDI", fdi)); + return dev; +} + +static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope) +{ + Aml *dev; + Aml *crs; + int i; + +#define ACPI_FDE_MAX_FD 4 + uint32_t fde_buf[5] =3D { + 0, 0, 0, 0, /* presence of floppy drives #0 - #3 */ + cpu_to_le32(2) /* tape presence (2 =3D=3D never present) */ + }; + + crs =3D aml_resource_template(); + aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04)); + aml_append(crs, aml_io(AML_DECODE16, 0x03F7, 0x03F7, 0x00, 0x01)); + aml_append(crs, aml_irq_no_flags(6)); + aml_append(crs, + aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2)); + + dev =3D aml_device("FDC0"); + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0700"))); + aml_append(dev, aml_name_decl("_CRS", crs)); + + for (i =3D 0; i < MIN(MAX_FD, ACPI_FDE_MAX_FD); i++) { + FloppyDriveType type =3D isa_fdc_get_drive_type(isadev, i); + + if (type < FLOPPY_DRIVE_TYPE_NONE) { + fde_buf[i] =3D cpu_to_le32(1); /* drive present */ + aml_append(dev, build_fdinfo_aml(i, type)); + } + } + aml_append(dev, aml_name_decl("_FDE", + aml_buffer(sizeof(fde_buf), (uint8_t *)fde_buf))); + + aml_append(scope, dev); +} + static const VMStateDescription vmstate_isa_fdc =3D{ .name =3D "fdc", .version_id =3D 2, @@ -2798,11 +2879,13 @@ static Property isa_fdc_properties[] =3D { static void isabus_fdc_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ISADeviceClass *isa =3D ISA_DEVICE_CLASS(klass); =20 dc->realize =3D isabus_fdc_realize; dc->fw_name =3D "fdc"; dc->reset =3D fdctrl_external_reset_isa; dc->vmsd =3D &vmstate_isa_fdc; + isa->build_aml =3D fdc_isa_build_aml; device_class_set_props(dc, isa_fdc_properties); set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); } diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 473cbdfffd05..7726d5c0f7cb 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -937,85 +937,6 @@ static void build_hpet_aml(Aml *table) aml_append(table, scope); } =20 -static Aml *build_fdinfo_aml(int idx, FloppyDriveType type) -{ - Aml *dev, *fdi; - uint8_t maxc, maxh, maxs; - - isa_fdc_get_drive_max_chs(type, &maxc, &maxh, &maxs); - - dev =3D aml_device("FLP%c", 'A' + idx); - - aml_append(dev, aml_name_decl("_ADR", aml_int(idx))); - - fdi =3D aml_package(16); - aml_append(fdi, aml_int(idx)); /* Drive Number */ - aml_append(fdi, - aml_int(cmos_get_fd_drive_type(type))); /* Device Type */ - /* - * the values below are the limits of the drive, and are thus independ= ent - * of the inserted media - */ - aml_append(fdi, aml_int(maxc)); /* Maximum Cylinder Number */ - aml_append(fdi, aml_int(maxs)); /* Maximum Sector Number */ - aml_append(fdi, aml_int(maxh)); /* Maximum Head Number */ - /* - * SeaBIOS returns the below values for int 0x13 func 0x08 regardless = of - * the drive type, so shall we - */ - aml_append(fdi, aml_int(0xAF)); /* disk_specify_1 */ - aml_append(fdi, aml_int(0x02)); /* disk_specify_2 */ - aml_append(fdi, aml_int(0x25)); /* disk_motor_wait */ - aml_append(fdi, aml_int(0x02)); /* disk_sector_siz */ - aml_append(fdi, aml_int(0x12)); /* disk_eot */ - aml_append(fdi, aml_int(0x1B)); /* disk_rw_gap */ - aml_append(fdi, aml_int(0xFF)); /* disk_dtl */ - aml_append(fdi, aml_int(0x6C)); /* disk_formt_gap */ - aml_append(fdi, aml_int(0xF6)); /* disk_fill */ - aml_append(fdi, aml_int(0x0F)); /* disk_head_sttl */ - aml_append(fdi, aml_int(0x08)); /* disk_motor_strt */ - - aml_append(dev, aml_name_decl("_FDI", fdi)); - return dev; -} - -static Aml *build_fdc_device_aml(ISADevice *fdc) -{ - int i; - Aml *dev; - Aml *crs; - -#define ACPI_FDE_MAX_FD 4 - uint32_t fde_buf[5] =3D { - 0, 0, 0, 0, /* presence of floppy drives #0 - #3 */ - cpu_to_le32(2) /* tape presence (2 =3D=3D never present) */ - }; - - dev =3D aml_device("FDC0"); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0700"))); - - crs =3D aml_resource_template(); - aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04)); - aml_append(crs, aml_io(AML_DECODE16, 0x03F7, 0x03F7, 0x00, 0x01)); - aml_append(crs, aml_irq_no_flags(6)); - aml_append(crs, - aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2)); - aml_append(dev, aml_name_decl("_CRS", crs)); - - for (i =3D 0; i < MIN(MAX_FD, ACPI_FDE_MAX_FD); i++) { - FloppyDriveType type =3D isa_fdc_get_drive_type(fdc, i); - - if (type < FLOPPY_DRIVE_TYPE_NONE) { - fde_buf[i] =3D cpu_to_le32(1); /* drive present */ - aml_append(dev, build_fdinfo_aml(i, type)); - } - } - aml_append(dev, aml_name_decl("_FDE", - aml_buffer(sizeof(fde_buf), (uint8_t *)fde_buf))); - - return dev; -} - static Aml *build_kbd_device_aml(void) { Aml *dev; @@ -1054,7 +975,6 @@ static Aml *build_mouse_device_aml(void) =20 static void build_isa_devices_aml(Aml *table) { - ISADevice *fdc =3D pc_find_fdc0(); bool ambiguous; =20 Aml *scope =3D aml_scope("_SB.PCI0.ISA"); @@ -1062,9 +982,6 @@ static void build_isa_devices_aml(Aml *table) =20 aml_append(scope, build_kbd_device_aml()); aml_append(scope, build_mouse_device_aml()); - if (fdc) { - aml_append(scope, build_fdc_device_aml(fdc)); - } =20 if (ambiguous) { error_report("Multiple ISA busses, unable to define IPMI ACPI data= "); diff --git a/stubs/cmos.c b/stubs/cmos.c new file mode 100644 index 000000000000..416cbe4055ff --- /dev/null +++ b/stubs/cmos.c @@ -0,0 +1,7 @@ +#include "qemu/osdep.h" +#include "hw/i386/pc.h" + +int cmos_get_fd_drive_type(FloppyDriveType fd0) +{ + return 0; +} diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index c1e43ac68f87..df2cbfe68ca0 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -1,4 +1,5 @@ stub-obj-y +=3D blk-commit-all.o +stub-obj-y +=3D cmos.o stub-obj-y +=3D cpu-get-clock.o stub-obj-y +=3D cpu-get-icount.o stub-obj-y +=3D dump.o --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591860846; cv=none; d=zohomail.com; s=zohoarc; b=hqPZrC40Kw8x6SO0XoVDsNKFpDPGOi+aDffx+EGEiKZ8Mew+SRaHl1JqzrUirHl/WIrtv9B8atgF8eKIMl0JNL1SNvaUNfIdLIODqQUrFJPCPeFcYjCktT0vA82JV4uC/HCaVHtzA+FaDvZN6U9iabF7qeDc/QE9WXgzuGwBopI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591860846; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IFlya5bn1MZgKV5cDgqIH5p13gjmZo586pTVIFP1Ois=; b=dTQSqCyEEbqpc7byHMcXHfv6PXPmLeXMTV5fpsnlvmltyfrlcEhH/Jt31VX7H8Q6TJG+YKC1ff3cFuLWmrkTjhBcnoEGvTMr0nn8JU0W3UtFN7wupMrQu61u/zyJw0uZBIntOBHAK2cGIhanH2h1NkJFcxuqGypf/i8cEdUdtF8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591860846143254.08722819534194; Thu, 11 Jun 2020 00:34:06 -0700 (PDT) Received: from localhost ([::1]:46460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHiu-0005l5-Q1 for importer@patchew.org; Thu, 11 Jun 2020 03:34:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHea-00089s-Fr for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:36 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:50275 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHeZ-0004gG-71 for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:36 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-127-L8YpTpdrMUyULBDl8vti6Q-1; Thu, 11 Jun 2020 03:29:31 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 638478018AB; Thu, 11 Jun 2020 07:29:29 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD4A38FF61; Thu, 11 Jun 2020 07:29:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BD87317511; Thu, 11 Jun 2020 09:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IFlya5bn1MZgKV5cDgqIH5p13gjmZo586pTVIFP1Ois=; b=gmR1qNdXym5domN/SSvFBZn1znoYroybiP+HAGO8lu8smNREVvOgdCnanjennOTZzPVTZ3 lVM5SVvn+Q79HfMsMmHX37SoDR9ZU/DgoWnFtNlPkOO0NfEYMg1zkK5HZjDyZkKsnWMPfq Z/o28BkQJ8hkjya4EnuSt3vJCBcLlCs= X-MC-Unique: L8YpTpdrMUyULBDl8vti6Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 03/10] floppy: make isa_fdc_get_drive_max_chs static Date: Thu, 11 Jun 2020 09:29:12 +0200 Message-Id: <20200611072919.16638-4-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) acpi aml generator needs this, but it is in floppy code now so we can make the function static. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: John Snow --- include/hw/block/fdc.h | 2 -- hw/block/fdc.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h index c15ff4c62315..5d71cf972268 100644 --- a/include/hw/block/fdc.h +++ b/include/hw/block/fdc.h @@ -16,7 +16,5 @@ void sun4m_fdctrl_init(qemu_irq irq, hwaddr io_base, DriveInfo **fds, qemu_irq *fdc_tc); =20 FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc, int i); -void isa_fdc_get_drive_max_chs(FloppyDriveType type, - uint8_t *maxc, uint8_t *maxh, uint8_t *maxs= ); =20 #endif diff --git a/hw/block/fdc.c b/hw/block/fdc.c index b4d2eaf66dcd..8024c822cea3 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -2744,8 +2744,8 @@ FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc= , int i) return isa->state.drives[i].drive; } =20 -void isa_fdc_get_drive_max_chs(FloppyDriveType type, - uint8_t *maxc, uint8_t *maxh, uint8_t *maxs) +static void isa_fdc_get_drive_max_chs(FloppyDriveType type, uint8_t *maxc, + uint8_t *maxh, uint8_t *maxs) { const FDFormat *fdf; =20 --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591860701; cv=none; d=zohomail.com; s=zohoarc; b=QcJ2KXq8A1wDUFw0enAnK/6SU/Jb08CLtM5tRjIJSAtQ/CXrgZFQZHwPlFbEsrLnW0yLI6jp+Vz0O7ESgecpiSh9WOWUxCA7x1p6RmrLOnlIJPpDpNKPwG37AkCidtvdcXXHSrqNTYFr3x2WAs+YacyUh+1CxjXo0GW6l+7CJv0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591860701; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wXCsR1YyaQ3W0L8EQrAD8r3RAvvyUOCpNzEe0nXoLwM=; b=jOCaSxvCyu/VDAXCFTVhZGLheNL2pWC6FcWitLSUC6Y7DYw+MfTp6/7DjWAyGMkXk/W/Aix/5s3eDHymj1nOtQHTc+ZsAd11xdYENNlp0zQx4uzGqlxl/Ou8soV8tVTdxyPXw1yhh+IiqHUVDrbHFfFNPhsO4yp1zFmv6qwjaj0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591860701932914.6361303464716; Thu, 11 Jun 2020 00:31:41 -0700 (PDT) Received: from localhost ([::1]:37958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHga-0001q8-CI for importer@patchew.org; Thu, 11 Jun 2020 03:31:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHea-0008AF-R0 for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:36 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55719 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHeZ-0004gh-US for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:36 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-43-lIdU18dJMAKswz8W2FQOYg-1; Thu, 11 Jun 2020 03:29:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 23F9618B642B; Thu, 11 Jun 2020 07:29:31 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6AE678931; Thu, 11 Jun 2020 07:29:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CB90F17516; Thu, 11 Jun 2020 09:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wXCsR1YyaQ3W0L8EQrAD8r3RAvvyUOCpNzEe0nXoLwM=; b=jMEzJ4ZDCtBLigqmVdEdaWBda9c0lNYG9Ga0gEWVecf6/xfIEbqnTlxgrZrFlZlAVPhuwk ofCwF18pvJKihceABlaGT+UtzQ9oz2Xlh0Kqixvj0s97yTfFqxGoTNyc2T0uYmtTB9x/ig WsSBwm0RgB3TmAQDx+t+66WFRtPMy/E= X-MC-Unique: lIdU18dJMAKswz8W2FQOYg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 04/10] floppy: move cmos_get_fd_drive_type() from pc Date: Thu, 11 Jun 2020 09:29:13 +0200 Message-Id: <20200611072919.16638-5-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:35 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: John Snow --- include/hw/block/fdc.h | 1 + include/hw/i386/pc.h | 1 - hw/block/fdc.c | 26 +++++++++++++++++++++++++- hw/i386/pc.c | 25 ------------------------- 4 files changed, 26 insertions(+), 27 deletions(-) diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h index 5d71cf972268..479cebc0a330 100644 --- a/include/hw/block/fdc.h +++ b/include/hw/block/fdc.h @@ -16,5 +16,6 @@ void sun4m_fdctrl_init(qemu_irq irq, hwaddr io_base, DriveInfo **fds, qemu_irq *fdc_tc); =20 FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc, int i); +int cmos_get_fd_drive_type(FloppyDriveType fd0); =20 #endif diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 8d764f965cd3..5e3b19ab78fc 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -176,7 +176,6 @@ typedef void (*cpu_set_smm_t)(int smm, void *arg); void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs); =20 ISADevice *pc_find_fdc0(void); -int cmos_get_fd_drive_type(FloppyDriveType fd0); =20 /* port92.c */ #define PORT92_A20_LINE "a20" diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 8024c822cea3..ea0fb8ee15b9 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -32,7 +32,6 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/timer.h" -#include "hw/i386/pc.h" #include "hw/acpi/aml-build.h" #include "hw/irq.h" #include "hw/isa/isa.h" @@ -2809,6 +2808,31 @@ static Aml *build_fdinfo_aml(int idx, FloppyDriveTyp= e type) return dev; } =20 +int cmos_get_fd_drive_type(FloppyDriveType fd0) +{ + int val; + + switch (fd0) { + case FLOPPY_DRIVE_TYPE_144: + /* 1.44 Mb 3"5 drive */ + val =3D 4; + break; + case FLOPPY_DRIVE_TYPE_288: + /* 2.88 Mb 3"5 drive */ + val =3D 5; + break; + case FLOPPY_DRIVE_TYPE_120: + /* 1.2 Mb 5"5 drive */ + val =3D 2; + break; + case FLOPPY_DRIVE_TYPE_NONE: + default: + val =3D 0; + break; + } + return val; +} + static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope) { Aml *dev; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2128f3d6fe8b..c5db7be6d8b1 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -385,31 +385,6 @@ static uint64_t ioportF0_read(void *opaque, hwaddr add= r, unsigned size) =20 #define REG_EQUIPMENT_BYTE 0x14 =20 -int cmos_get_fd_drive_type(FloppyDriveType fd0) -{ - int val; - - switch (fd0) { - case FLOPPY_DRIVE_TYPE_144: - /* 1.44 Mb 3"5 drive */ - val =3D 4; - break; - case FLOPPY_DRIVE_TYPE_288: - /* 2.88 Mb 3"5 drive */ - val =3D 5; - break; - case FLOPPY_DRIVE_TYPE_120: - /* 1.2 Mb 5"5 drive */ - val =3D 2; - break; - case FLOPPY_DRIVE_TYPE_NONE: - default: - val =3D 0; - break; - } - return val; -} - static void cmos_init_hd(ISADevice *s, int type_ofs, int info_ofs, int16_t cylinders, int8_t heads, int8_t sectors) { --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591860691; cv=none; d=zohomail.com; s=zohoarc; b=CpLWWa1XwgvqtTgwWFv5KufPIpoTWrgfWOvZWpMDQ2Dt2XMcn+m5vmWJXQGPQc0j81fGAyM3/tz60iVRXiKWBVHkmZ1M/lXE593lcMeewE40IcY4qqI4OkosH1n5y648SuFxnPfOPUXAZ5/CIAI4bou65M8mS3gVH9r6csBLE3w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591860691; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eAHPxJn6eStiRZaXlBN+e0nyBGWa/Oak+UsiY2V0GP8=; b=NdK9Iqy1NYVCw/awBp6mlcvkHPRkWwS1Z0HDrJQkx8C1eiST0mUzwGbjDfBG8Z9Mcs8l4MFFzQ4mhHsiIZdE37g6nahbxashpp5gV3f5LPzHFDzkj20TYN/3FY4PoGsE+9tKJFgy1PKnwJpu7RI1NkU4dd/mcsXp9/20uZH76vw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591860691253731.9871146239685; Thu, 11 Jun 2020 00:31:31 -0700 (PDT) Received: from localhost ([::1]:37306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHgP-0001a7-Nr for importer@patchew.org; Thu, 11 Jun 2020 03:31:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHec-0008Ap-AK for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:38 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:42305 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHeb-0004hH-JB for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:38 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-378-v2EULl2yM1GhO8saMm1zJQ-1; Thu, 11 Jun 2020 03:29:32 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A31A7805731; Thu, 11 Jun 2020 07:29:31 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE6CE100238E; Thu, 11 Jun 2020 07:29:30 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D667D17532; Thu, 11 Jun 2020 09:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eAHPxJn6eStiRZaXlBN+e0nyBGWa/Oak+UsiY2V0GP8=; b=Wj1x9DuITIaPMDJjzThaEWi3WPu6MOoV1Le9zjgOHh4ddhU5hsC8I80mq4Ym5fgo6t6wvh RvSkl9zFXtyW8jhlo2pSQ4YH7wDLyf6LCE+CoXuC6ZxBdeJMaRiMpH9npatJAscO+2N2UV NNV/Z4gD2uUeBCRvj/UMouPNCjlnFlA= X-MC-Unique: v2EULl2yM1GhO8saMm1zJQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 05/10] acpi: move aml builder code for i8042 (kbd+mouse) device Date: Thu, 11 Jun 2020 09:29:14 +0200 Message-Id: <20200611072919.16638-6-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 39 --------------------------------------- hw/input/pckbd.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7726d5c0f7cb..9fed13a27333 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -937,42 +937,6 @@ static void build_hpet_aml(Aml *table) aml_append(table, scope); } =20 -static Aml *build_kbd_device_aml(void) -{ - Aml *dev; - Aml *crs; - - dev =3D aml_device("KBD"); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0303"))); - - aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); - - crs =3D 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(dev, aml_name_decl("_CRS", crs)); - - return dev; -} - -static Aml *build_mouse_device_aml(void) -{ - Aml *dev; - Aml *crs; - - dev =3D aml_device("MOU"); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0F13"))); - - aml_append(dev, aml_name_decl("_STA", aml_int(0xf))); - - crs =3D aml_resource_template(); - aml_append(crs, aml_irq_no_flags(12)); - aml_append(dev, aml_name_decl("_CRS", crs)); - - return dev; -} - static void build_isa_devices_aml(Aml *table) { bool ambiguous; @@ -980,9 +944,6 @@ static void build_isa_devices_aml(Aml *table) Aml *scope =3D aml_scope("_SB.PCI0.ISA"); Object *obj =3D object_resolve_path_type("", TYPE_ISA_BUS, &ambiguous); =20 - aml_append(scope, build_kbd_device_aml()); - aml_append(scope, build_mouse_device_aml()); - if (ambiguous) { error_report("Multiple ISA busses, unable to define IPMI ACPI data= "); } else if (!obj) { diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index 60a41303203a..29d633ca9478 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -26,6 +26,7 @@ #include "qemu/log.h" #include "hw/isa/isa.h" #include "migration/vmstate.h" +#include "hw/acpi/aml-build.h" #include "hw/input/ps2.h" #include "hw/irq.h" #include "hw/input/i8042.h" @@ -561,12 +562,42 @@ static void i8042_realizefn(DeviceState *dev, Error *= *errp) qemu_register_reset(kbd_reset, s); } =20 +static void i8042_build_aml(ISADevice *isadev, Aml *scope) +{ + Aml *kbd; + Aml *mou; + Aml *crs; + + crs =3D 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)); + + kbd =3D aml_device("KBD"); + aml_append(kbd, aml_name_decl("_HID", aml_eisaid("PNP0303"))); + aml_append(kbd, aml_name_decl("_STA", aml_int(0xf))); + aml_append(kbd, aml_name_decl("_CRS", crs)); + + crs =3D aml_resource_template(); + aml_append(crs, aml_irq_no_flags(12)); + + mou =3D aml_device("MOU"); + aml_append(mou, aml_name_decl("_HID", aml_eisaid("PNP0F13"))); + aml_append(mou, aml_name_decl("_STA", aml_int(0xf))); + aml_append(mou, aml_name_decl("_CRS", crs)); + + aml_append(scope, kbd); + aml_append(scope, mou); +} + static void i8042_class_initfn(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ISADeviceClass *isa =3D ISA_DEVICE_CLASS(klass); =20 dc->realize =3D i8042_realizefn; dc->vmsd =3D &vmstate_kbd_isa; + isa->build_aml =3D i8042_build_aml; set_bit(DEVICE_CATEGORY_INPUT, dc->categories); } =20 --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591861022; cv=none; d=zohomail.com; s=zohoarc; b=TFBFD5gsaUC3XZNWeayz4+HY06sZIQ4kNqupfo1bsgPTDIwLtQRvICbfZTaBA/POUaOXnKoIEBHGi57JN/wjpd0D+mNIQavmPV/oFUYwtQROOftcHhv/En7B0f1yxdPLJig0gpMFjs3ZCwYDWRkfXbZBMzvOw454QeGIGqYlXXA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591861022; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lHWY3T2haDr1DgUFNK5I86s2ugCm0pczOcfR2a7I8ns=; b=DI/+D+xOyfIRtbRh3/30MCi1vL486BzGvUW2hoC48DYmC5wuTTJILiF4k19b5ZiEs4kq6KBYOVu0f5ugBmYMue/tUYu3bVZegW6+ernGSBGQzBLYwd+AROGCTvUDGJHkva7ID/fT+ipXFUKD84Ka0wLLB+30UTFAZnEZZMImHzM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591861022912711.2615790379226; Thu, 11 Jun 2020 00:37:02 -0700 (PDT) Received: from localhost ([::1]:57282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHll-00026G-0n for importer@patchew.org; Thu, 11 Jun 2020 03:37:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHew-0000X7-31 for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:58 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:25045 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHev-0004l9-6Z for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:57 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-118-0DRwrBW0OduljZLuFXcwpQ-1; Thu, 11 Jun 2020 03:29:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE5C218B6423; Thu, 11 Jun 2020 07:29:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3D4C5C541; Thu, 11 Jun 2020 07:29:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E2E3817538; Thu, 11 Jun 2020 09:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lHWY3T2haDr1DgUFNK5I86s2ugCm0pczOcfR2a7I8ns=; b=hx4ELaevfHOsOMUf9LwAcwZNO7XTrq5gKEWPYgMAwyYpE7ORZqOYYS4SSKyPiPuUp7LPQT jvqVbrob+JQOax4C4Z+gLuSxQBaLyHOOh7K5sn0XniAXykvjGblzEmT5XzatmAwezsDZpe 71AuzSXgGWlPKbMKVI9QvCPNs+rSh94= X-MC-Unique: 0DRwrBW0OduljZLuFXcwpQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 06/10] acpi: factor out fw_cfg_add_acpi_dsdt() Date: Thu, 11 Jun 2020 09:29:15 +0200 Message-Id: <20200611072919.16638-7-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Add helper function to add fw_cfg device, also move code to hw/i386/fw_cfg.c. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Igor Mammedov --- hw/i386/fw_cfg.h | 1 + hw/i386/acpi-build.c | 24 +----------------------- hw/i386/fw_cfg.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/hw/i386/fw_cfg.h b/hw/i386/fw_cfg.h index 9e742787792b..275f15c1c5e8 100644 --- a/hw/i386/fw_cfg.h +++ b/hw/i386/fw_cfg.h @@ -25,5 +25,6 @@ FWCfgState *fw_cfg_arch_create(MachineState *ms, uint16_t apic_id_limit); void fw_cfg_build_smbios(MachineState *ms, FWCfgState *fw_cfg); void fw_cfg_build_feature_control(MachineState *ms, FWCfgState *fw_cfg); +void fw_cfg_add_acpi_dsdt(Aml *scope, FWCfgState *fw_cfg); =20 #endif diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9fed13a27333..86be45eea17c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1759,30 +1759,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, =20 /* create fw_cfg node, unconditionally */ { - /* when using port i/o, the 8-bit data register *always* overlaps - * with half of the 16-bit control register. Hence, the total size - * of the i/o region used is FW_CFG_CTL_SIZE; when using DMA, the - * DMA control register is located at FW_CFG_DMA_IO_BASE + 4 */ - uint8_t io_size =3D object_property_get_bool(OBJECT(x86ms->fw_cfg), - "dma_enabled", NULL) ? - ROUND_UP(FW_CFG_CTL_SIZE, 4) + sizeof(dma_addr_t= ) : - FW_CFG_CTL_SIZE; - scope =3D aml_scope("\\_SB.PCI0"); - dev =3D aml_device("FWCF"); - - aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0002"))); - - /* device present, functioning, decoding, not shown in UI */ - aml_append(dev, aml_name_decl("_STA", aml_int(0xB))); - - crs =3D aml_resource_template(); - aml_append(crs, - aml_io(AML_DECODE16, FW_CFG_IO_BASE, FW_CFG_IO_BASE, 0x01, io_= size) - ); - aml_append(dev, aml_name_decl("_CRS", crs)); - - aml_append(scope, dev); + fw_cfg_add_acpi_dsdt(scope, x86ms->fw_cfg); aml_append(dsdt, scope); } =20 diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index da60ada59462..c55abfb01abb 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -15,6 +15,7 @@ #include "qemu/osdep.h" #include "sysemu/numa.h" #include "hw/acpi/acpi.h" +#include "hw/acpi/aml-build.h" #include "hw/firmware/smbios.h" #include "hw/i386/fw_cfg.h" #include "hw/timer/hpet.h" @@ -179,3 +180,30 @@ void fw_cfg_build_feature_control(MachineState *ms, FW= CfgState *fw_cfg) *val =3D cpu_to_le64(feature_control_bits | FEATURE_CONTROL_LOCKED); fw_cfg_add_file(fw_cfg, "etc/msr_feature_control", val, sizeof(*val)); } + +void fw_cfg_add_acpi_dsdt(Aml *scope, FWCfgState *fw_cfg) +{ + /* + * when using port i/o, the 8-bit data register *always* overlaps + * with half of the 16-bit control register. Hence, the total size + * of the i/o region used is FW_CFG_CTL_SIZE; when using DMA, the + * DMA control register is located at FW_CFG_DMA_IO_BASE + 4 + */ + Object *obj =3D OBJECT(fw_cfg); + uint8_t io_size =3D object_property_get_bool(obj, "dma_enabled", NULL)= ? + ROUND_UP(FW_CFG_CTL_SIZE, 4) + sizeof(dma_addr_t) : + FW_CFG_CTL_SIZE; + Aml *dev =3D aml_device("FWCF"); + Aml *crs =3D aml_resource_template(); + + aml_append(dev, aml_name_decl("_HID", aml_string("QEMU0002"))); + + /* device present, functioning, decoding, not shown in UI */ + aml_append(dev, aml_name_decl("_STA", aml_int(0xB))); + + aml_append(crs, + aml_io(AML_DECODE16, FW_CFG_IO_BASE, FW_CFG_IO_BASE, 0x01, io_size= )); + + aml_append(dev, aml_name_decl("_CRS", crs)); + aml_append(scope, dev); +} --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591860706; cv=none; d=zohomail.com; s=zohoarc; b=DOFcX8qir1DI1h4c3ee1S6vBeNPa2hYq9qy2QFeMTqYbbBSot/vez+sHyxLNAmtPSQIj3GjwsRmjfvd6vZWQ1J44Mozsb7Q4HEo0kyqeXQ4vWzN2f11LtJ+xisQtCL6M4CYdjW+jVXSAQ5NLO7axWmq3PSduU97Dwh9Y1SoNqhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591860706; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q/FjwBLKzVq6/82OVquguZUIfN7aJ7ZiA74RDZbhct0=; b=CPYWFTWoORgEzxTkQPoB6wjAFUd099NtYC5YQ2fKEQcEruJmAHlLA9KkcxRXC42HzPVBZkA+M2E+xjS/nk05jDPK1XpHPa1Q/QlvI6DID9RW+j1tLouFQOdy6TXrPES0Vg38Bgu0dX7AKHoSIGxTWFNqJKSLBHvv86VIlvqp3IA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591860706479317.20046593950656; Thu, 11 Jun 2020 00:31:46 -0700 (PDT) Received: from localhost ([::1]:38668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHgf-00027c-6s for importer@patchew.org; Thu, 11 Jun 2020 03:31:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHeh-0008Mr-Hs for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:43 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:29775 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHeg-0004hm-N4 for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:43 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-502-y3aNmbz3MbeIzDeLh_aN1w-1; Thu, 11 Jun 2020 03:29:40 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 556558015CB; Thu, 11 Jun 2020 07:29:39 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BE3360CD3; Thu, 11 Jun 2020 07:29:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EC0091753B; Thu, 11 Jun 2020 09:29:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q/FjwBLKzVq6/82OVquguZUIfN7aJ7ZiA74RDZbhct0=; b=fQe5gJZIbuhliQu+7r+2+22+rbJztTrFI2XpbJ2wgZjz9vx1IX/tt1VzzmYZHgJbyBSndx IxFHawjPYWFcjdBjLFxfFyXtiAA55CPhHHrpRZVEDilKTAHvxp04UL2FDuWvCtHo9aJKM0 8AbXaAzQqQjbSx7mUi82YsptqLokTz0= X-MC-Unique: y3aNmbz3MbeIzDeLh_aN1w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 07/10] acpi: simplify build_isa_devices_aml() Date: Thu, 11 Jun 2020 09:29:16 +0200 Message-Id: <20200611072919.16638-8-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) x86 machines can have a single ISA bus only. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/acpi-build.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 86be45eea17c..c8e47700fc53 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -940,19 +940,14 @@ static void build_hpet_aml(Aml *table) static void build_isa_devices_aml(Aml *table) { bool ambiguous; - - Aml *scope =3D aml_scope("_SB.PCI0.ISA"); Object *obj =3D object_resolve_path_type("", TYPE_ISA_BUS, &ambiguous); + Aml *scope; =20 - if (ambiguous) { - error_report("Multiple ISA busses, unable to define IPMI ACPI data= "); - } else if (!obj) { - error_report("No ISA bus, unable to define IPMI ACPI data"); - } else { - build_acpi_ipmi_devices(scope, BUS(obj), "\\_SB.PCI0.ISA"); - isa_build_aml(ISA_BUS(obj), scope); - } + assert(obj && !ambiguous); =20 + scope =3D aml_scope("_SB.PCI0.ISA"); + build_acpi_ipmi_devices(scope, BUS(obj), "\\_SB.PCI0.ISA"); + isa_build_aml(ISA_BUS(obj), scope); aml_append(table, scope); } =20 --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591860813; cv=none; d=zohomail.com; s=zohoarc; b=CMd9RP0qu8r5vzV7GVU3GqGIaIcoVxX7b/FL6CldEC8DmufqA+dHP9u0NhAIIGRwq+NcAGuWHQI/BYkqgVz3yFi5hd+o/giQ2Hg8hvjq7AENGJuh364XRMvHvcXdzpmToCH7iw9KE4PSI5xqM+VZXvJq+tcNLHKx7PUhhsVCQQE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591860813; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=7pT/m32IlVrGoibXKxVStOiRuQansqkMi2DPhVM/YD0=; b=c5fgEswGo9a44Kw9Uf4oDy1geo1DJjbHodhTUkT0FLQxV/aUlY1889G6cq62VgNsezq9MngIu1Q3+K/Sgyijnn9LO859DWYQyYLils5mjTUqshJf+gtZBplsXElOKfOCGUPavtNr9L01OIGY3ce3ZstQzaopDPdPuZ+ORUshJzA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591860813932801.1645062012392; Thu, 11 Jun 2020 00:33:33 -0700 (PDT) Received: from localhost ([::1]:45090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHiO-0005DO-M9 for importer@patchew.org; Thu, 11 Jun 2020 03:33:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHeo-0000Bn-Af for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:50 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:46555 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHen-0004js-Jo for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:50 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-37-V97QMCPxPW-mr6oN4tOjdw-1; Thu, 11 Jun 2020 03:29:45 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C66E1009616; Thu, 11 Jun 2020 07:29:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 160D76E71C; Thu, 11 Jun 2020 07:29:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 011669D56; Thu, 11 Jun 2020 09:29:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=7pT/m32IlVrGoibXKxVStOiRuQansqkMi2DPhVM/YD0=; b=MFhg+3RkYItadOaGkJ+h1hbfkdEuI8a2Oj8yed8Et1Zy9+VDfqq/9G9McOt3ERtflW7j1E vQM93TyP9tCdRI/lVAeRUikGq9nOIH//ewYRw+KQYwvAzCyi/1Kc2Kqfb45D/yMvKYpvHj fYkG7a2fWPWDzY92E6rhTXJpme5hllY= X-MC-Unique: V97QMCPxPW-mr6oN4tOjdw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 08/10] acpi: drop serial/parallel enable bits from dsdt Date: Thu, 11 Jun 2020 09:29:17 +0200 Message-Id: <20200611072919.16638-9-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.81; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The _STA methods for COM+LPT used to reference them, but that isn't the case any more. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index c8e47700fc53..750fcf9baa37 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1316,15 +1316,6 @@ static void build_q35_isa_bridge(Aml *table) aml_append(field, aml_named_field("LPTD", 2)); aml_append(dev, field); =20 - aml_append(dev, aml_operation_region("LPCE", AML_PCI_CONFIG, - aml_int(0x82), 0x02)); - /* enable bits */ - field =3D aml_field("LPCE", AML_ANY_ACC, AML_NOLOCK, AML_PRESERVE); - aml_append(field, aml_named_field("CAEN", 1)); - aml_append(field, aml_named_field("CBEN", 1)); - aml_append(field, aml_named_field("LPEN", 1)); - aml_append(dev, field); - aml_append(scope, dev); aml_append(table, scope); } @@ -1348,7 +1339,6 @@ static void build_piix4_isa_bridge(Aml *table) { Aml *dev; Aml *scope; - Aml *field; =20 scope =3D aml_scope("_SB.PCI0"); dev =3D aml_device("ISA"); @@ -1357,19 +1347,6 @@ static void build_piix4_isa_bridge(Aml *table) /* PIIX PCI to ISA irq remapping */ aml_append(dev, aml_operation_region("P40C", AML_PCI_CONFIG, aml_int(0x60), 0x04)); - /* enable bits */ - field =3D aml_field("^PX13.P13C", AML_ANY_ACC, AML_NOLOCK, AML_PRESERV= E); - /* Offset(0x5f),, 7, */ - aml_append(field, aml_reserved_field(0x2f8)); - aml_append(field, aml_reserved_field(7)); - aml_append(field, aml_named_field("LPEN", 1)); - /* Offset(0x67),, 3, */ - aml_append(field, aml_reserved_field(0x38)); - aml_append(field, aml_reserved_field(3)); - aml_append(field, aml_named_field("CAEN", 1)); - aml_append(field, aml_reserved_field(3)); - aml_append(field, aml_named_field("CBEN", 1)); - aml_append(dev, field); =20 aml_append(scope, dev); aml_append(table, scope); --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591860945; cv=none; d=zohomail.com; s=zohoarc; b=CiOt5rbvfWjsIp86+Z/TFkjLU8MF7J6uorwury61WHO3kxqF5TzEfyOByZyTimNMa30VPDyztq3Kq1zuK9A3XeeFWK7NcNn2+YWWeNvPhU442vw6Uj0MtbkuEnjioeMq2mrZuyIOldxkRzI1xpTCQgke05hPaB7E8cV3ppI+Ng4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591860945; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=6k1jcxf8ypU/XW3uW5/tOJlrRS6jF0mmavKqpADz79A=; b=UqFL6DgqoVTAItWHNR82vfJrE1S9qDMRMYi4LE57NqE+zpRhpQG0Kf5lPllWB1leicRbqKgvgtMqvipk3Abz1IEZ5iwC+d/n22MAondZZr6wWApdYocIi9e3r14kgAVzV7k4TmimzfaQ1fAh9t6HrSXjF0BGEyYPoGKZ7qLXp6I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591860945617699.0071430209326; Thu, 11 Jun 2020 00:35:45 -0700 (PDT) Received: from localhost ([::1]:52722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHkW-0008JS-2j for importer@patchew.org; Thu, 11 Jun 2020 03:35:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHet-0000Q2-Ib for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:55 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46824 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHes-0004kU-O5 for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:55 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-114-St0AVwkaN22CXtFcv47h3g-1; Thu, 11 Jun 2020 03:29:52 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 783571009600; Thu, 11 Jun 2020 07:29:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3073E5C3E7; Thu, 11 Jun 2020 07:29:31 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0A4A39D57; Thu, 11 Jun 2020 09:29:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=6k1jcxf8ypU/XW3uW5/tOJlrRS6jF0mmavKqpADz79A=; b=QeX6Kedcr88gwUwkVbxDR7xIjRO+ckqisAK9h592cQk32qTQoULFiuysn78r8k4Wz4OyOt STQOJegkrfE3Kps6IM2wBsyuMUFCtA1mbNU1cSWLvD4liPPF3NxFgEzGaMZwlW1lGuzPyC pJg/mVJRWIxlUMjuHTzmoQPQrTXkCM4= X-MC-Unique: St0AVwkaN22CXtFcv47h3g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 09/10] acpi: drop build_piix4_pm() Date: Thu, 11 Jun 2020 09:29:18 +0200 Message-Id: <20200611072919.16638-10-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The _SB.PCI0.PX13.P13C opregion (holds isa device enable bits) is not used any more, remove it from DSDT. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/acpi-build.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 750fcf9baa37..02cf4199c2e9 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1320,21 +1320,6 @@ static void build_q35_isa_bridge(Aml *table) aml_append(table, scope); } =20 -static void build_piix4_pm(Aml *table) -{ - Aml *dev; - Aml *scope; - - scope =3D aml_scope("_SB.PCI0"); - dev =3D aml_device("PX13"); - aml_append(dev, aml_name_decl("_ADR", aml_int(0x00010003))); - - aml_append(dev, aml_operation_region("P13C", AML_PCI_CONFIG, - aml_int(0x00), 0xff)); - aml_append(scope, dev); - aml_append(table, scope); -} - static void build_piix4_isa_bridge(Aml *table) { Aml *dev; @@ -1486,7 +1471,6 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, aml_append(dsdt, sb_scope); =20 build_hpet_aml(dsdt); - build_piix4_pm(dsdt); build_piix4_isa_bridge(dsdt); build_isa_devices_aml(dsdt); build_piix4_pci_hotplug(dsdt); --=20 2.18.4 From nobody Sun May 19 05:00:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591860869; cv=none; d=zohomail.com; s=zohoarc; b=NeCBpaYzCVYhmxyhfIgwm8sSobpttsKNuFqUxJsVA7tq0Slu3QPLA0JG14qPOo63/chrrKATcExM6Ony/hO82zJZAjcRZ9VdwwtwWjdHQnbCA2kf5PKejSZUSVDdw0sFKyy+JQnTLA/I3YwgvNKCVSOMYkcsZ9K/3xlF/39Gdqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591860869; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=IsjyqkrZR1oJEETIAQjp1lgpXphxOfQXl25ii7XErus=; b=DLnjRTs5IcfHtZz+QFI3u5FDLf48VwkcwAMNEblrdviHcYUIixVGTGt/MpV1MN8yNO3OyVNTeJMmqNTwtnsYn+W5v0lHAh3njYsPcV2I/wfEC9k31kT5qVFUW8YeBN2tO4MPF+/PoPzY8v70zvjaVobLCzCaimR8HOgZ2o3sJKI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1591860869657912.7938823308305; Thu, 11 Jun 2020 00:34:29 -0700 (PDT) Received: from localhost ([::1]:48094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjHjI-0006Qx-Au for importer@patchew.org; Thu, 11 Jun 2020 03:34:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjHek-0008Sy-DJ for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:46 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35067 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jjHei-0004iA-LI for qemu-devel@nongnu.org; Thu, 11 Jun 2020 03:29:46 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-HrWx-M5MOkOH1uERIcEMlQ-1; Thu, 11 Jun 2020 03:29:40 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48A27801503; Thu, 11 Jun 2020 07:29:39 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-50.ams2.redhat.com [10.36.113.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4008060BF3; Thu, 11 Jun 2020 07:29:31 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 138949D58; Thu, 11 Jun 2020 09:29:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591860583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=IsjyqkrZR1oJEETIAQjp1lgpXphxOfQXl25ii7XErus=; b=b9MYr1mleYKBZqZ6Mi7XjsguBc1r+YcBWcomlEe0WMvih3vVtCG+YZAE1C2c/M2doeC7ol xQEghuH/nptv9LNoF7AF0VB/eVAK6OwXDFuvssjfSXdEMgruLY4G2GDXeP442mdObhUJ58 8aX7z80szU/h51UmhGanu92slv1MNbM= X-MC-Unique: HrWx-M5MOkOH1uERIcEMlQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v8 10/10] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion. Date: Thu, 11 Jun 2020 09:29:19 +0200 Message-Id: <20200611072919.16638-11-kraxel@redhat.com> In-Reply-To: <20200611072919.16638-1-kraxel@redhat.com> References: <20200611072919.16638-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=207.211.31.120; envelope-from=kraxel@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 03:29:35 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Max Reitz , Paolo Bonzini , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , John Snow , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Seems to be unused. Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 02cf4199c2e9..d93ea40c58b9 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1296,7 +1296,6 @@ static void build_q35_isa_bridge(Aml *table) { Aml *dev; Aml *scope; - Aml *field; =20 scope =3D aml_scope("_SB.PCI0"); dev =3D aml_device("ISA"); @@ -1306,16 +1305,6 @@ static void build_q35_isa_bridge(Aml *table) aml_append(dev, aml_operation_region("PIRQ", AML_PCI_CONFIG, aml_int(0x60), 0x0C)); =20 - aml_append(dev, aml_operation_region("LPCD", AML_PCI_CONFIG, - aml_int(0x80), 0x02)); - field =3D aml_field("LPCD", AML_ANY_ACC, AML_NOLOCK, AML_PRESERVE); - aml_append(field, aml_named_field("COMA", 3)); - aml_append(field, aml_reserved_field(1)); - aml_append(field, aml_named_field("COMB", 3)); - aml_append(field, aml_reserved_field(1)); - aml_append(field, aml_named_field("LPTD", 2)); - aml_append(dev, field); - aml_append(scope, dev); aml_append(table, scope); } --=20 2.18.4