From nobody Wed May 22 03:23:06 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=1591782262; cv=none; d=zohomail.com; s=zohoarc; b=a4oNAqO9N7t1B6LxEZB77Z/ObsmW1q6HfXAxqM5UfeJTUtsv7KMvKJk0a0mQaVDCu4NmwZ6zZDAg9rl9DqFGpu9CPZfbSZYw/abIAQWdKb7MTSvlm5gk0dHnjPR0D7IwHaEdAuBXa3y9xnNi97L8JsV6c6UEHd9sjD5icd4Q3OU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782262; 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=BUqDbvxVFHotNjcJ10iHQqm7/wTRBBSoWFhsIgyD+P/fum3MGzfrHRJRFeyYCVhreLQGFxTT/nCBcklFMkEmKTcliCjsxizkj4ZSd8wQ8rTdYQA7BTh0TOM8EulvY9bsH1YQ3RzDLRNFPmtqal1W4l50deLD97e5m7nZpEt+Jz4= 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 1591782262686186.20571402818973; Wed, 10 Jun 2020 02:44:22 -0700 (PDT) Received: from localhost ([::1]:47568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixHR-0001Er-81 for importer@patchew.org; Wed, 10 Jun 2020 05:44:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixF9-0006ND-R4 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:30142 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 1jixF8-0001dV-6D for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41:59 -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-455-h1H-rf8zOIubQCN0UYH4QQ-1; Wed, 10 Jun 2020 05:41:53 -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 EC61E100CD1B; Wed, 10 Jun 2020 09:41:45 +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 ED68E500DA; Wed, 10 Jun 2020 09:41:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A8AFE1750A; Wed, 10 Jun 2020 11:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782117; 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=CqttTWRfTuIAiGVINCnHrwf3MzdGfzb1/QyjDqm9gEu0b5KpFeCXh6pLjdjNRIpTVXrvT6 pyPRI7voKRaNuKBlowwnMA0HtDWkVsAHLlZDM04UHSDidW/h5LTWWfIs7KLZ/4qmoh+lWi BYclcDH+5E3J+kg1XRfdfy+1q3SNic8= X-MC-Unique: h1H-rf8zOIubQCN0UYH4QQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 1/9] acpi: move aml builder code for floppy device Date: Wed, 10 Jun 2020 11:41:23 +0200 Message-Id: <20200610094131.13346-2-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-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/09 21:17:20 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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 --- 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 Wed May 22 03:23:06 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=1591782223; cv=none; d=zohomail.com; s=zohoarc; b=IYEPdOOFfG5eXiwcxdB2gd8+MFSw2TQdOPcW2NDwoPBgeqgJgects6rM8G2LuAt1FIvv6e+AUIbvervmVIQ1OrDy9QM1L1+tWSNXgmsv8dUt+4G+rI2OsobapHXelCD9YdGFi3zaUwJsFvhp3b5s0SrEJPeBcEqYTGGJDxQkYnM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782223; 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=GyNlYZLg4TzzqgQpng0gzFx+LeYJs2WuCI//wJv85YsnUn3VaL23xI2De9/hAIDsiuRF9Vgs/MIZ7NHg1rinLxHwtcQTqyy+7qlJHtT+D65gSPGsi/EZcPhtC/kKBABEbK5Lj7LqVgrlneQ+Z/osrefejYGFmuSTq/Iyr0TxwAM= 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 15917822234053.652200081062688; Wed, 10 Jun 2020 02:43:43 -0700 (PDT) Received: from localhost ([::1]:44708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixGn-0008PP-IG for importer@patchew.org; Wed, 10 Jun 2020 05:43:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixF2-0006F1-R6 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41:52 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:24552 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 1jixF1-0001cS-EY for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41:52 -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-501-ar-yb7LKOHqqconUvmPqjQ-1; Wed, 10 Jun 2020 05:41:47 -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 65E0B805731; Wed, 10 Jun 2020 09:41: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 067DB500DE; Wed, 10 Jun 2020 09:41:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B2F1517510; Wed, 10 Jun 2020 11:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782110; 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=SxaJ2CsjlQDNX3015bw2o0jZgacryW7BHykxca1lhVQbhVox8EIv/vs4bl2umYo2DnHaxB Ot/lbLIL/zlaSqPWJFE/cjvBHY6fdm6SttVfcBTtCfzkQqoTLvYEWPsh7ZTx43Rvn84OFO 1Dc9ZbCEM7RydlRx8uXOF1CvqizFcXw= X-MC-Unique: ar-yb7LKOHqqconUvmPqjQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 2/9] floppy: make isa_fdc_get_drive_max_chs static Date: Wed, 10 Jun 2020 11:41:24 +0200 Message-Id: <20200610094131.13346-3-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-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=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/09 23:22:15 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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 Wed May 22 03:23:06 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=1591782222; cv=none; d=zohomail.com; s=zohoarc; b=YbMl/bk9dBpS2VHxdf+1VLxAv/0m1YlxOgscGfIC0+dwQlKMDXniL36f9Fua180gYs89D3QqHlDtzka5o1hEL9A3/yFUEXZVXdQEiMLJM/X76Fta2M5J5xqCbJGErvCy/9/Nsko877MrIvm6LIb482eLm9Pb1NDHfxk2Ia6teXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782222; 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=Mv829hKLYHrXyz3X+qbjRYg4iwkTS9CIHPurCr7sAKPoTWv9pTBcqtDJyXr9wO9bleUxly2fv/xXawKFOV09Ylvhx3UvgTmEhbC4qdwfl3l7BtrQHzWDsq9Tu5dMBVno+/K/q9PBjTpuwmdLeoiQyz+frtakYzxTOxmv1cIFec0= 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 1591782222688399.3368133671037; Wed, 10 Jun 2020 02:43:42 -0700 (PDT) Received: from localhost ([::1]:44526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixGl-0008Kx-OC for importer@patchew.org; Wed, 10 Jun 2020 05:43:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixF9-0006LS-7q for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:21501 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 1jixF8-0001dX-An for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41:58 -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-233-f5ftdopiMeeiDfMtJu9osQ-1; Wed, 10 Jun 2020 05:41:54 -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 64F2F100D11F; Wed, 10 Jun 2020 09:41:47 +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 0DB0982022; Wed, 10 Jun 2020 09:41:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C07C017511; Wed, 10 Jun 2020 11:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782117; 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=CcBmao+gSh92feh1c0QipukvjAW+jwa7XR423UBHawEJcXNAyr+eGM6lSr2y7qXeWO8LRQ 7dQeKCOVh10dTWedkJPQ6uB6m0QZ20PKY3mitXhR3iohRRjXvczIaMDA0SDW7I1CQ1CTL2 k32+/nwKyAe2dCVAhlOfejZfSgFWSI0= X-MC-Unique: f5ftdopiMeeiDfMtJu9osQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 3/9] floppy: move cmos_get_fd_drive_type() from pc Date: Wed, 10 Jun 2020 11:41:25 +0200 Message-Id: <20200610094131.13346-4-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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/09 21:17:20 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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 Wed May 22 03:23:06 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=1591782365; cv=none; d=zohomail.com; s=zohoarc; b=A2YpkyzPNtmpPA475glnHKO/BExiLM1HyaNbrxbOf7TwqtZCksU3E7GVkUfj2huBrobMtNX69DsyVbtnLxmtXjkf2RI18WV5OiVPIYflvEdfi/CFYLg/NSLO+rpCEC3UB5AJN4MQN2POAHYW2ixfjPD3Dh25SVJL1fwAyq52oLA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782365; 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=K74CjK9t+7x7mG+N8dFfrXaXIazho2nkqRBEcPf7wV+d9/EG0FF8/VXulLWUxgw9BU7FwI4//K6Ph4ETlVJBuOQy5QvV/apC+2jCtgoXMBEP6oX8ISvml40GlO/LNkKbEKACiWQUHbkDqSma7YwIQ3VFe7TOonu+lOiOQxBn+mU= 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 15917823651581019.4918277407294; Wed, 10 Jun 2020 02:46:05 -0700 (PDT) Received: from localhost ([::1]:54198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixJ5-00045V-SP for importer@patchew.org; Wed, 10 Jun 2020 05:46:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixFL-0006k2-DU for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:11 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:55298 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 1jixFK-0001fE-5L for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:11 -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-150-bHrGR4xrO_eblMmCUqrL-g-1; Wed, 10 Jun 2020 05:42:06 -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 BCB72102CC3C; Wed, 10 Jun 2020 09:42:03 +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 13FA75D9D3; Wed, 10 Jun 2020 09:41:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CB2E517516; Wed, 10 Jun 2020 11:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782129; 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=NT/r2Sv7eO7G28g0vO8nt3gC+CEmDYPVMKMu+I52rYAxMxtVSEj5U1NKdamsHAbeDtHZaW o6VIdZROCAnkljz1SRht/8iOgpUPI9FO4t8yjN95Jkkjtnwu3EwWK3B/F1kYLUPQmvXhrg enC23FRjH9/pO1faWyv4oqhvY+BCnFI= X-MC-Unique: bHrGR4xrO_eblMmCUqrL-g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 4/9] acpi: move aml builder code for i8042 (kbd+mouse) device Date: Wed, 10 Jun 2020 11:41:26 +0200 Message-Id: <20200610094131.13346-5-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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/09 23:51:15 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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 Wed May 22 03:23:06 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=1591782527; cv=none; d=zohomail.com; s=zohoarc; b=dPFM3FWyqeaJvCteR4a0PuGve8wb7ZZd1jH7uRDUWaPjeI9OJ9h6aVQ3ZLZw+Df6rn6Fgj5XM3sPfoLPBN0pDckXrXvPpr1+4x1XGH2/9FfNX+O0OGwNJoXOZDs2aprX2/2LriWMTCnlnWbHzhlqKqTLEXG3LOwuFgW+0KctQko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782527; 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=Xrxxuy2gFPBEopGQPSdTPa501eXrW0lryVQgZ6f0Lv5nwkNVSWWItNeEEu7WpZz50lX7S1f3KFIAAQ+GFUkGgGlKxHQrs0Q9Nn0F/aW0/m6+fgYKB73h69rri83Fk/4iYo77OnHyxKCjpJfmHdlcKJcmHxmUEywvtbAghoO4hrI= 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 1591782527714679.1222543188575; Wed, 10 Jun 2020 02:48:47 -0700 (PDT) Received: from localhost ([::1]:35238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixLi-0008Gw-Ca for importer@patchew.org; Wed, 10 Jun 2020 05:48:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixFE-0006Xx-2X for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:04 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:27393 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 1jixFD-0001ea-18 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:03 -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-156-WmB40t3TNhO6x9INB-punQ-1; Wed, 10 Jun 2020 05:42:01 -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 C4CB28AB38F; Wed, 10 Jun 2020 09:41:52 +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 DFB7C101E1C1; Wed, 10 Jun 2020 09:41:51 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D78B117532; Wed, 10 Jun 2020 11:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782122; 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=elBaCIIFk2A1HewW6E6fuyw1jfUo6bbkcRFeWnUlfnpTIb0GoEtLoD12f5sj1G1bXnLAcj x6b0Tk2SE95k9G8wq+dPdhOQX74x/WUcG6vYyIl6SWjiXXSnXCmTHBuLU19hRWgrLNsyMc Phz/lZr6xI/RbbhGofI3oiPVRAM4zh4= X-MC-Unique: WmB40t3TNhO6x9INB-punQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 5/9] acpi: factor out fw_cfg_add_acpi_dsdt() Date: Wed, 10 Jun 2020 11:41:27 +0200 Message-Id: <20200610094131.13346-6-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-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.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/09 23:51:15 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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 Wed May 22 03:23:06 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=1591782491; cv=none; d=zohomail.com; s=zohoarc; b=jfPJfIPZYG2nHdUrDVv+3P4LtoTNW+fR8AcIPbQfnwWts161e2gbMq+S7IcO0paGHPins7ZO3/j8d5Tt4lMVd1kB/I9Je6fxN+DTl2q3LsehNoH8XadnWApzGIY6/MTjcGTJiaf7K7enUX9LApHzmNsjZcsCzlL3w3GPD4B0tjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782491; 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=kHacnlytK8tD0S4Ic6whGYiamoPCuQyIAFu+w3CIkNxl5lbWebSqPUlqxfUjuQishOPLgDtsnI6plui5fq7GARNeOB0Tcc23JCHsW+Rzgz+n7rdJ7KPx/oc3incUo3DPLc7zCwLfbBCEFg+Wu6/VKNpOFLinSPojc1aMdAtNdG8= 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 1591782491262771.8084065494603; Wed, 10 Jun 2020 02:48:11 -0700 (PDT) Received: from localhost ([::1]:33156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixL8-00079i-1D for importer@patchew.org; Wed, 10 Jun 2020 05:48:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixFA-0006O7-8y for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:00 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28730 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 1jixF9-0001dq-9a for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41:59 -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-426-1dUgAqulPo6Ttynuy8ihTg-1; Wed, 10 Jun 2020 05:41:55 -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 43EAD8014D4; Wed, 10 Jun 2020 09:41: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 CA4FD10190DE; Wed, 10 Jun 2020 09:41:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E0B1317538; Wed, 10 Jun 2020 11:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782118; 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=SwpITIYr7SS9njLUM5SrST66ES6pgNabvr/8BPZ/xA9aXWec/R/nZJh9cqod9EcQmvq1SL RF85RPJy5I39aHE/UBFEjXSHDFbIjlzDWdOwNyNL6f8zjEGGEcGDCnoC22blBVA7Jes+ls bb51/iP6w/dlSC2N0yuR4UcpC4Ce3TY= X-MC-Unique: 1dUgAqulPo6Ttynuy8ihTg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 6/9] acpi: simplify build_isa_devices_aml() Date: Wed, 10 Jun 2020 11:41:28 +0200 Message-Id: <20200610094131.13346-7-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-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.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/09 23:51:15 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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 Wed May 22 03:23:06 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=1591782391; cv=none; d=zohomail.com; s=zohoarc; b=dOn9WnOm9ISFF2rF4dwoiXgRWu65I4F/xLyui+cVdnZ8fX1J3CazigXvCZMmAUfjwlJ3u8sUrxgQYjDh0InSbixeC4IhDIhJxB1z70DMfiI3dTCq6LbSdLKWmaauAWaiaQ29qnf0GDktM+3znzqBnvfrfalLn6lq0MrZ5/kBVtE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782391; 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=ZvxuBJzE8IyjhB72HUXy1D90ryLjGxiQJ3j+w5sRA1KksVp5moTAxcq+3dSYh2FBrLqBaHcDyl+mzI7NsBksnGTI0BPiNNxmd3ovmrNdBA1sR8FYECz5KJ7UR6rzD4LysUUTJW2CHU0RHaU8wLWRzIiRYtsIXOji3vtueFf/zek= 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 1591782391263816.7434371133257; Wed, 10 Jun 2020 02:46:31 -0700 (PDT) Received: from localhost ([::1]:56422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixJV-00055J-UE for importer@patchew.org; Wed, 10 Jun 2020 05:46:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixFA-0006Op-Ip for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:00 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:53698 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 1jixF7-0001dQ-N9 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:00 -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-437-NslEXJPuMPGQqJ6ZhtcAOA-1; Wed, 10 Jun 2020 05:41:55 -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 C29DB86ABD5; Wed, 10 Jun 2020 09:41:47 +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 D9E40104B4FB; Wed, 10 Jun 2020 09:41:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EA1101753B; Wed, 10 Jun 2020 11:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782116; 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=HF+XQyQ/U2BCNqM/ZF/a7UUVH8OyQuYycJ3SN9NnASM3YAffWajZ5a5+QzOrAKvV+J4KF3 ZA9xeEnnNvkbEar6rZmNfC7jF6XK3mPQbf4cF0+ef8YOO0T5HNzZfdkNOetBAY4k/nXTgA XssS1n3vyAQBGW5xENLfueE6WBCOrYg= X-MC-Unique: NslEXJPuMPGQqJ6ZhtcAOA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 7/9] acpi: drop serial/parallel enable bits from dsdt Date: Wed, 10 Jun 2020 11:41:29 +0200 Message-Id: <20200610094131.13346-8-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-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=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/09 23:22:15 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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 Wed May 22 03:23:06 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=1591782214; cv=none; d=zohomail.com; s=zohoarc; b=kCkyyJF87j2w7uZIBq+Z7WNBhV87rwhp4IpsBtk0c5JqAPIi9R27AofergOge28VOm6OrVfHdwzcFMfa5RoKEXcmm8Az68vj/F66p8uyhBhItTTBZgrMGY+P9UrrI267rMtOPMy33oaVm8o0qXmsZt3b9HI3m6HkJsNgYSYYQMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782214; 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=WR8HwvKpB8VNcsSGiX4sbNAFiPc5PL5vvKlmw6KS5gbF1zwzyvwxmEiOfxS7xmPnbsoc0B86VVjHnSNL3Y+DOP6bxeHpTvn4jq/oIPoQ1ijqZs23ivo/GzYZ1jtN6wpnW/y/+eTn1BE+nIHve0moHPRiTjTlZEQewp/5rh4N+G0= 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 1591782214425952.321595466983; Wed, 10 Jun 2020 02:43:34 -0700 (PDT) Received: from localhost ([::1]:44380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixGe-0008Gx-VP for importer@patchew.org; Wed, 10 Jun 2020 05:43:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixF5-0006HC-Sj for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:42408 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 1jixF3-0001cm-S5 for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:41: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-478-vakMg6lNNkaLtIWyOgihVQ-1; Wed, 10 Jun 2020 05:41:51 -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 E2A8483DB39; Wed, 10 Jun 2020 09:41:47 +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 D3523104B4EF; Wed, 10 Jun 2020 09:41:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id F36039D56; Wed, 10 Jun 2020 11:41:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782113; 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=gMVDQT3h6LocepzPPxnwLyEwnF77MQyDMEsistp9Yg8TcwJYNdmwGJv3pgdWSus4tl1hTH HaXua0HQJ/bPHF0QTScFxcujR03TKKzJz+XI4S3N20ENVW596YGnab8GaM/REYDQlBaTvZ 2EUm39jbIEr1/vqRlr6t17Tq9603VWU= X-MC-Unique: vakMg6lNNkaLtIWyOgihVQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 8/9] acpi: drop build_piix4_pm() Date: Wed, 10 Jun 2020 11:41:30 +0200 Message-Id: <20200610094131.13346-9-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-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/09 23:51:15 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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 --- 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 Wed May 22 03:23:06 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=1591782372; cv=none; d=zohomail.com; s=zohoarc; b=DI+GnSJFGhbX+KdsFiTgzOWuDuOIlkctX2ZN3EUwQF2lTkTWje46Z0j2Xf4IFbe+Q2r7hNbw07eMrx5/Q0gFsvAHEYCPsIjG3kKiH/L9+ZJ57KEgwx8Ei+2zdlhlaSOS6phL6EWNz2qcRJPzkCq12aZ+ErKrZN1WWmh83uSHoVw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591782372; 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=nPKv2o03v1JGidGf9KUaqyn0kyT9S2dvUtAOLb5TfCeZXd/JUDkv884aVfOgHvOrwzcv0yn+cclh67DoV5qP4d1QZfyPkohtPt9s/Jv9JXp2xIalTMz1laczyFSDfaoiBvpEXYLHQfwoH5bff+PQxMzPq86wD0bgMUYIsDRZfB0= 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 159178237286082.02608950300055; Wed, 10 Jun 2020 02:46:12 -0700 (PDT) Received: from localhost ([::1]:54826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jixJD-0004LH-Ix for importer@patchew.org; Wed, 10 Jun 2020 05:46:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jixFI-0006f7-3u for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:08 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:57197 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 1jixFH-0001ez-Em for qemu-devel@nongnu.org; Wed, 10 Jun 2020 05:42:07 -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-4-AUroBb34Od-iLssZBLwYlg-1; Wed, 10 Jun 2020 05:42:02 -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 8EF7519200CC; Wed, 10 Jun 2020 09:41:57 +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 CB0E25C1BD; Wed, 10 Jun 2020 09:41:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 086EA9D57; Wed, 10 Jun 2020 11:41:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591782126; 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=YsZZF7S4cMhGOaAc0ZdcDTO+esOL2Y1Tor4yC847bRyk9qASoNmMxWwrXLNvtEgZWoYank 9VSXWflBw1enDIBY8oNNfbHzfqwD4EAztCerRRv4a9Fl6XikNBUO0rSGOlu93gGa6vBecl /bNRr1ciH5CNswq2cxAro+PDXRixvpA= X-MC-Unique: AUroBb34Od-iLssZBLwYlg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v7 9/9] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion. Date: Wed, 10 Jun 2020 11:41:31 +0200 Message-Id: <20200610094131.13346-10-kraxel@redhat.com> In-Reply-To: <20200610094131.13346-1-kraxel@redhat.com> References: <20200610094131.13346-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/09 23:51:15 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Paolo Bonzini , 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