From nobody Tue Nov 11 22:40:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1566245978; cv=none; d=zoho.com; s=zohoarc; b=WdEsqKWUG8d7VAqgIEek9BMru4PN5iGc+NiGjFvk/Rc5lr3ypeVjY3Ou9SuCUOYYq4cvr8YvuY9PrBf7E22AYrP9dG8aEUrxlDvXgYfo7rqLDCptcl2dlRTboonGaJJBBSBlzahr4MVotoVShXL2qpNTbIrHZ6f3A2hAL5702Ts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566245978; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=pj7Gc7TY1hWb2Vay0SQtf3pTVgcm4YVS5TFdWn8LG1s=; b=kAsYQziI+hhGW7CD6SaDTn0x/MHLURrkKEDKC2JLGEE2FrBXNjSU9gMh80iovQbrzqPWANY2pRfVXKvM9PG8SqgtzamSwpBODwqPhwKqRpdIQAx/CV15+yviHt6nN1EJnOOj61Zss5C/9DIPwC1GXJGoXMi4NOkOsROGMuTlduk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566245978293803.4571728666956; Mon, 19 Aug 2019 13:19:38 -0700 (PDT) Received: from localhost ([::1]:57238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzo7s-0001CX-Sd for importer@patchew.org; Mon, 19 Aug 2019 16:19:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45554) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzo5r-0007jI-KR for qemu-devel@nongnu.org; Mon, 19 Aug 2019 16:17:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzo5k-0003Nk-Ie for qemu-devel@nongnu.org; Mon, 19 Aug 2019 16:17:31 -0400 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:40348) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzo5k-0003NU-Dr for qemu-devel@nongnu.org; Mon, 19 Aug 2019 16:17:24 -0400 Received: by mail-ot1-x344.google.com with SMTP id c34so2881901otb.7 for ; Mon, 19 Aug 2019 13:17:24 -0700 (PDT) Received: from serve.minyard.net ([47.184.134.43]) by smtp.gmail.com with ESMTPSA id v5sm5805897otk.64.2019.08.19.13.17.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 13:17:22 -0700 (PDT) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 770CE1800D4; Mon, 19 Aug 2019 20:17:19 +0000 (UTC) Received: by t430.minyard.net (Postfix, from userid 1000) id 51EE1301220; Mon, 19 Aug 2019 15:17:18 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=pj7Gc7TY1hWb2Vay0SQtf3pTVgcm4YVS5TFdWn8LG1s=; b=ueKnuAux1SnpHP45LvnmPwXZJ7sTdIpIAQCjskY9wxaLvSzy4IT8CLaACnhE2KwsUq ebeRg+1y76Zas4E/NzPcfhAvsbrVIOad/UtgaL+xCwo8LGDfC+9jv7NS3C6n8GEdIsWw mAgIt/d6gHGHjSeny7BENfMBxNCnaKj5KvWSG5IkAwY3KmwRxoOqV1tLse1H6gIlwTGZ lX1wvIi+VhrVmMfrAUs9nAdW/TdaTI6hu/r93fO7AW191TTKazz9sAC4R4pZbYppCuuD mdvsgcLIHSrRXEYOL2R/q/R7tW8VHJNq5fKuIWdqvz6s3j4jozSZwvKedK+ddQ9SO5uC xFuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=pj7Gc7TY1hWb2Vay0SQtf3pTVgcm4YVS5TFdWn8LG1s=; b=Uo5ezftJOUz1kxCG9YC0uXLa00fmEdTQGTS6v8DqQ0kBUUUA5R8IK+AG/QysucsQO6 982vPmzXwnk8ZJ4LS2RGshWyfdxG9QPrViNEklpBG2P0os/Q63M29FCda/Dt20ry//z6 M7YKqhrv325WcKT+HwolkUyN5uW28+16oZRaGqAYwzdQwTEIs7Ln7zvJxXHrDup5a0KO 9tknuRKpOambk1zQCPs0RfPaaYFqNGynCtwjfZDMWIaIpzuYSgDJXeXrSCBdNDnMdHJU 9AwALrUQueL/O+BkvLNDGnPQnbOOGdiufBJ6q2VOYwJYqnCLtSf0Xm2sS6E+JBNW7O6X cPUA== X-Gm-Message-State: APjAAAX75EOKPvm3tEgSPVgYdPfcFeEZ44UeFmbGHUfY7eXdo7t8RPuq YE4kQvZw9pFGsDj9IPOu44DEOr0= X-Google-Smtp-Source: APXvYqyhVRn2PuTAKa8g4vHQ+dglE5w3nQ4JX/bh1tKNir4FQ1EFcH+ACaLCd524/K0YGR8WJ63LwQ== X-Received: by 2002:a05:6830:1411:: with SMTP id v17mr19202604otp.108.1566245843629; Mon, 19 Aug 2019 13:17:23 -0700 (PDT) From: minyard@acm.org To: QEMU Developers Date: Mon, 19 Aug 2019 15:17:04 -0500 Message-Id: <20190819201705.31633-15-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190819201705.31633-1-minyard@acm.org> References: <20190819201705.31633-1-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::344 Subject: [Qemu-devel] [PATCH 14/15] ipmi: Fix SSIF ACPI handling to use the right CRS 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: Corey Minyard , Igor Mammedov , "Michael S . Tsirkin" 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" From: Corey Minyard Pass in the CRS so that it can be set to the SMBus for IPMI later. Cc: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Corey Minyard --- hw/acpi/ipmi-stub.c | 2 +- hw/acpi/ipmi.c | 13 +++++++------ hw/i386/acpi-build.c | 2 +- include/hw/acpi/ipmi.h | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/acpi/ipmi-stub.c b/hw/acpi/ipmi-stub.c index f525f71c2d..8634fb325c 100644 --- a/hw/acpi/ipmi-stub.c +++ b/hw/acpi/ipmi-stub.c @@ -10,6 +10,6 @@ #include "qemu/osdep.h" #include "hw/acpi/ipmi.h" =20 -void build_acpi_ipmi_devices(Aml *table, BusState *bus) +void build_acpi_ipmi_devices(Aml *table, BusState *bus, const char *resour= ce) { } diff --git a/hw/acpi/ipmi.c b/hw/acpi/ipmi.c index 651e2e94ea..96e48eba15 100644 --- a/hw/acpi/ipmi.c +++ b/hw/acpi/ipmi.c @@ -13,7 +13,7 @@ #include "hw/acpi/acpi.h" #include "hw/acpi/ipmi.h" =20 -static Aml *aml_ipmi_crs(IPMIFwInfo *info) +static Aml *aml_ipmi_crs(IPMIFwInfo *info, const char *resource) { Aml *crs =3D aml_resource_template(); =20 @@ -48,7 +48,8 @@ static Aml *aml_ipmi_crs(IPMIFwInfo *info) info->register_spacing, info->register_length)= ); break; case IPMI_MEMSPACE_SMBUS: - aml_append(crs, aml_return(aml_int(info->base_address))); + aml_append(crs, aml_i2c_serial_bus_device(info->base_address, + resource)); break; default: abort(); @@ -61,7 +62,7 @@ static Aml *aml_ipmi_crs(IPMIFwInfo *info) return crs; } =20 -static Aml *aml_ipmi_device(IPMIFwInfo *info) +static Aml *aml_ipmi_device(IPMIFwInfo *info, const char *resource) { Aml *dev; uint16_t version =3D ((info->ipmi_spec_major_revision << 8) @@ -74,14 +75,14 @@ static Aml *aml_ipmi_device(IPMIFwInfo *info) aml_append(dev, aml_name_decl("_STR", aml_string("ipmi_%s", info->interface_name)= )); aml_append(dev, aml_name_decl("_UID", aml_int(info->uuid))); - aml_append(dev, aml_name_decl("_CRS", aml_ipmi_crs(info))); + aml_append(dev, aml_name_decl("_CRS", aml_ipmi_crs(info, resource))); aml_append(dev, aml_name_decl("_IFT", aml_int(info->interface_type))); aml_append(dev, aml_name_decl("_SRV", aml_int(version))); =20 return dev; } =20 -void build_acpi_ipmi_devices(Aml *scope, BusState *bus) +void build_acpi_ipmi_devices(Aml *scope, BusState *bus, const char *resour= ce) { =20 BusChild *kid; @@ -101,6 +102,6 @@ void build_acpi_ipmi_devices(Aml *scope, BusState *bus) iic =3D IPMI_INTERFACE_GET_CLASS(obj); memset(&info, 0, sizeof(info)); iic->get_fwinfo(ii, &info); - aml_append(scope, aml_ipmi_device(&info)); + aml_append(scope, aml_ipmi_device(&info, resource)); } } diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 5b0ec1b89e..0c94e21a1a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1290,7 +1290,7 @@ static void build_isa_devices_aml(Aml *table) } else if (!obj) { error_report("No ISA bus, unable to define IPMI ACPI data"); } else { - build_acpi_ipmi_devices(scope, BUS(obj)); + build_acpi_ipmi_devices(scope, BUS(obj), "\\_SB.PCI0.ISA"); } =20 aml_append(table, scope); diff --git a/include/hw/acpi/ipmi.h b/include/hw/acpi/ipmi.h index c38483565c..c14ad682ac 100644 --- a/include/hw/acpi/ipmi.h +++ b/include/hw/acpi/ipmi.h @@ -16,6 +16,6 @@ * bus matches the given bus. The resource is the ACPI resource that * contains the IPMI device, this is required for the I2C CRS. */ -void build_acpi_ipmi_devices(Aml *table, BusState *bus); +void build_acpi_ipmi_devices(Aml *table, BusState *bus, const char *resour= ce); =20 #endif /* HW_ACPI_IPMI_H */ --=20 2.17.1