From nobody Thu Nov 13 22:08:05 2025 Delivered-To: importer@patchew.org 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; 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=1582751039; cv=none; d=zohomail.com; s=zohoarc; b=Xcmh/zkUDvm1hNiaO7sAjw2Hq0ZQaJJl+CQquKEq9a6FoCEELl3gRV3cDFjWmD4ITjk4bBZK6XEjirJlkN8Cuz/QriXhjuq1357GBIF4DfSv+vyCfwW4qnGWBOnrGhC5MmJ0D87kUGLJJpJ9HkkWNd8dUqxOHXQtviKfNAkvAwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582751039; 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=ydEUTzYDeS8m3DXDxDiuUpRyMkCwaTisv5HItnAGSLg=; b=DuFcn0XDhv/kq5lCWiHWYo0yUBh40WnCWVNjc7g1LktxyET2o4vV53eJtzoUa1GQPJ8OUwIY2MVms0qDTE7UrBmQy69sqXV7wM6ezRWNnEIm/zS5dHKWSqzyU7jWSVLyDaKssA8kPZRXljwVwSwJaptOMPva5e2Sa7htVjtNAjc= 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 1582751039853163.10380269151347; Wed, 26 Feb 2020 13:03:59 -0800 (PST) Received: from localhost ([::1]:49994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j73qY-0003Je-ID for importer@patchew.org; Wed, 26 Feb 2020 16:03:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45603) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j73mn-0006Nu-02 for qemu-devel@nongnu.org; Wed, 26 Feb 2020 16:00:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j73ml-0002B4-Mx for qemu-devel@nongnu.org; Wed, 26 Feb 2020 16:00:04 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:24449 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j73ml-00029T-If for qemu-devel@nongnu.org; Wed, 26 Feb 2020 16:00:03 -0500 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-263-DWI_X6o6N-60FDyp5M2Gbw-1; Wed, 26 Feb 2020 16:00:01 -0500 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 10060477; Wed, 26 Feb 2020 21:00:00 +0000 (UTC) Received: from laptop.redhat.com (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E4E95C545; Wed, 26 Feb 2020 20:59:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582750803; 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=ydEUTzYDeS8m3DXDxDiuUpRyMkCwaTisv5HItnAGSLg=; b=P8lRq7wSHO7mEEJAY82KQbpmnV9Jas7ElruLXUHqBfcd1asPWVH0/0Es1E7db3cYRTXcAk SZkZYyNuNzwGGK6X/sVwU1N0sru9IQHJnGDjX1+XRn7WRUbAmUBtOmFCGZHjyrb2w0yzYI AdSuda3d0dQFHpeOH5Oek5mqQTv18OU= X-MC-Unique: DWI_X6o6N-60FDyp5M2Gbw-1 From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, stefanb@linux.ibm.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org Subject: [PATCH v4 01/10] tpm: rename TPM_TIS into TPM_TIS_ISA Date: Wed, 26 Feb 2020 21:59:33 +0100 Message-Id: <20200226205942.11424-2-eric.auger@redhat.com> In-Reply-To: <20200226205942.11424-1-eric.auger@redhat.com> References: <20200226205942.11424-1-eric.auger@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-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: marcandre.lureau@redhat.com, lersek@redhat.com, ardb@kernel.org, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" As we plan to introduce a sysbus TPM_TIS, let's rename TPM_TIS into TPM_TIS_ISA. Signed-off-by: Eric Auger Reviewed-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel --- RFC v2 -> PATCH: - added Philippe and Stefan's R-b --- hw/i386/acpi-build.c | 6 +++--- hw/tpm/tpm_tis.c | 4 ++-- include/sysemu/tpm.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 9c4e46fa74..26777f8828 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2026,7 +2026,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, } } =20 - if (TPM_IS_TIS(tpm_find())) { + if (TPM_IS_TIS_ISA(tpm_find())) { aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE, TPM_TIS_ADDR_SIZE, AML_READ_WRITE)); } @@ -2197,7 +2197,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, /* Scan all PCI buses. Generate tables to support hotplug. */ build_append_pci_bus_devices(scope, bus, pm->pcihp_bridge_en); =20 - if (TPM_IS_TIS(tpm)) { + if (TPM_IS_TIS_ISA(tpm)) { if (misc->tpm_version =3D=3D TPM_VERSION_2_0) { dev =3D aml_device("TPM"); aml_append(dev, aml_name_decl("_HID", @@ -2304,7 +2304,7 @@ build_tpm2(GArray *table_data, BIOSLinker *linker, GA= rray *tcpalog) (char *)&tpm2_ptr->log_area_start_address - table_data->data; =20 tpm2_ptr->platform_class =3D cpu_to_le16(TPM2_ACPI_CLASS_CLIENT); - if (TPM_IS_TIS(tpm_find())) { + if (TPM_IS_TIS_ISA(tpm_find())) { tpm2_ptr->control_area_address =3D cpu_to_le64(0); tpm2_ptr->start_method =3D cpu_to_le32(TPM2_START_METHOD_MMIO); } else if (TPM_IS_CRB(tpm_find())) { diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 31facb896d..c609737272 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -91,7 +91,7 @@ typedef struct TPMState { TPMPPI ppi; } TPMState; =20 -#define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS) +#define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS_ISA) =20 #define DEBUG_TIS 0 =20 @@ -1008,7 +1008,7 @@ static void tpm_tis_class_init(ObjectClass *klass, vo= id *data) } =20 static const TypeInfo tpm_tis_info =3D { - .name =3D TYPE_TPM_TIS, + .name =3D TYPE_TPM_TIS_ISA, .parent =3D TYPE_ISA_DEVICE, .instance_size =3D sizeof(TPMState), .instance_init =3D tpm_tis_initfn, diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 15979a3647..1691b92c28 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -43,12 +43,12 @@ typedef struct TPMIfClass { enum TPMVersion (*get_version)(TPMIf *obj); } TPMIfClass; =20 -#define TYPE_TPM_TIS "tpm-tis" +#define TYPE_TPM_TIS_ISA "tpm-tis" #define TYPE_TPM_CRB "tpm-crb" #define TYPE_TPM_SPAPR "tpm-spapr" =20 -#define TPM_IS_TIS(chr) \ - object_dynamic_cast(OBJECT(chr), TYPE_TPM_TIS) +#define TPM_IS_TIS_ISA(chr) \ + object_dynamic_cast(OBJECT(chr), TYPE_TPM_TIS_ISA) #define TPM_IS_CRB(chr) \ object_dynamic_cast(OBJECT(chr), TYPE_TPM_CRB) #define TPM_IS_SPAPR(chr) \ --=20 2.20.1