From nobody Tue Feb 10 00:58:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623701399; cv=none; d=zohomail.com; s=zohoarc; b=H+YIQB2AA5nSd5KIXTEgcD2UXWWxR9VscxkBJ9d+76vKnjP8IDjUapbDeF+WDswscAVsXAhgXl6o//uhL0ZN/rX+PsKC+xjZrzlw3zr1fCYmXTngiSwVIHjxhGvTa4EmeqICJY5yimja9Kp+lXT33WZVHSo66KqmaQ3IpX4dygw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623701399; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=EPKTfv2HqhrWVRWhfR1Uo1UNdb0VcpdNpjLI/wWrdVo=; b=U0+vgZ1FcvJqmy9KmTc/O4veVipJATXCtGzsCYvboQDuH0eVsd3jxc8Yk62hOqYxWYJ6V969DSn990KZj+AlqViopxwYK9ZhYPW8LJt/GhMUtaoUAjYcW2ZL8tgbq/akknJYxWxWFX0TjBRpCZG838zYoPZGLtWPwxW+808hwUI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1623701399435816.1071245429819; Mon, 14 Jun 2021 13:09:59 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-470-sVBwWSl6NeCgArhh3VTUDA-1; Mon, 14 Jun 2021 16:09:56 -0400 Received: by mail-wr1-f71.google.com with SMTP id z13-20020adfec8d0000b0290114cc6b21c4so7476566wrn.22 for ; Mon, 14 Jun 2021 13:09:56 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (93.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.93]) by smtp.gmail.com with ESMTPSA id 2sm16640398wrz.87.2021.06.14.13.09.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 13:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623701398; 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=EPKTfv2HqhrWVRWhfR1Uo1UNdb0VcpdNpjLI/wWrdVo=; b=MubBnpHjjwBih/Gm1U/K0LQXk8i8gj8LI9keAIenzam2954i9yRaafXg3zUGxsiK61KFBV +KOQq67xk5hAfb6WO6yYPymc0Iwsgz6yXQtP7Iacb+TQhn/uPGbWxQJ/hjLwe2NwMz1PUv 5T+E52FP4I02XbL82fd2ExgGdhx7s6I= X-MC-Unique: sVBwWSl6NeCgArhh3VTUDA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EPKTfv2HqhrWVRWhfR1Uo1UNdb0VcpdNpjLI/wWrdVo=; b=mr6qGhWmOF7oqT0J2bphV5WnliM8eoVMGrb/U0RF4U9UucNTKxAX81vj+coBIqt9Nw of2mBKinNZ+44L8tf17ycXrGqsZwzGpXzsEWdMWtrZUXP/XNrWb+IOZuEQOcPskp/sOt Nqpy969MDXXjNHA3fo7UNKD5RepEJotyv5z9gfyIJZYoQNVbxFPh5MXLMv/L9TvcG4Dd pkMi82vIWJeBWZoh0uRZOhSqONT7EoJTpXuZxxHXp94fncIOVgy0QHzsb9nzuQ6YMdCj FtHQj4Nwrpcwuy3Pnhc7tvpFLVLxbcad68sDtKVSQ2jwHavjfGG2jAJiwp06eoCKkPbV ffgA== X-Gm-Message-State: AOAM532KZaSeZiXvoalrpkwjadgIC1ea+b7INwfDOAunPew0EV4zvatU Kcv78d1emSo8j7l7mJEI22HSRlMzTjnmZUDQaYHDvRFjfdiMbwLwgbJ/QMdQ6EeCGBvj1973afs Jg/ZTUUyOVNK9wg== X-Received: by 2002:a05:600c:154:: with SMTP id w20mr19010080wmm.185.1623701395828; Mon, 14 Jun 2021 13:09:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKrtErV8vdKFyKmCoLXADeqaBrA3K+NaN7fHpr2QZqO+iHRt2YFsbePDqVXE5fGAiZ4mv/tA== X-Received: by 2002:a05:600c:154:: with SMTP id w20mr19010065wmm.185.1623701395709; Mon, 14 Jun 2021 13:09:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Stefan Berger , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Markus Armbruster , Eric Blake , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 3/5] acpi: Eliminate all TPM related code if CONFIG_TPM is not set Date: Mon, 14 Jun 2021 22:09:38 +0200 Message-Id: <20210614200940.2056770-4-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210614200940.2056770-1-philmd@redhat.com> References: <20210614200940.2056770-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Stefan Berger Cc: M: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210614191335.1968807-4-stefanb@linux.ibm.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/acpi/tpm.h | 4 ++++ hw/acpi/aml-build.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h index 1a2a57a21f0..559ba6906c8 100644 --- a/include/hw/acpi/tpm.h +++ b/include/hw/acpi/tpm.h @@ -21,6 +21,8 @@ #include "hw/acpi/aml-build.h" #include "sysemu/tpm.h" =20 +#ifdef CONFIG_TPM + #define TPM_TIS_ADDR_BASE 0xFED40000 #define TPM_TIS_ADDR_SIZE 0x5000 =20 @@ -209,4 +211,6 @@ REG32(CRB_DATA_BUFFER, 0x80) =20 void tpm_build_ppi_acpi(TPMIf *tpm, Aml *dev); =20 +#endif /* CONFIG_TPM */ + #endif /* HW_ACPI_TPM_H */ diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index f0035d2b4a1..d5103e6d7b0 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -2044,6 +2044,7 @@ build_hdr: "FACP", tbl->len - fadt_start, f->rev, oem_id, oem_table_= id); } =20 +#ifdef CONFIG_TPM /* * build_tpm2 - Build the TPM2 table as specified in * table 7: TCG Hardware Interface Description Table Format for TPM 2.0 @@ -2101,6 +2102,7 @@ void build_tpm2(GArray *table_data, BIOSLinker *linke= r, GArray *tcpalog, (void *)(table_data->data + tpm2_start), "TPM2", table_data->len - tpm2_start, 4, oem_id, oem_tabl= e_id); } +#endif =20 Aml *build_crs(PCIHostState *host, CrsRangeSet *range_set, uint32_t io_off= set, uint32_t mmio32_offset, uint64_t mmio64_offset, --=20 2.31.1