From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1888C48BE5 for ; Tue, 15 Jun 2021 15:30:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 22B6A6115B for ; Tue, 15 Jun 2021 15:30:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22B6A6115B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltB0q-0005P2-Ua for qemu-devel@archiver.kernel.org; Tue, 15 Jun 2021 11:30:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltAyT-0002RW-HN for qemu-devel@nongnu.org; Tue, 15 Jun 2021 11:27:33 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50064 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltAyP-0000XN-LX for qemu-devel@nongnu.org; Tue, 15 Jun 2021 11:27:33 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15FF4KTM028243; Tue, 15 Jun 2021 11:27:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=pm2GZHPTSetfhkrn/yYYCDVVMDeA502sznfYJXZrur8=; b=fwCHS4bH8mN/PKqL6+BTN8Sk9Hyu8yfizC8AssFy2PFy4URTvYhu8Gd7cWL+xZIuOr37 k/3J5HqiZXincnjG/BcHzL2rfEIjvjNZ9G/LoaCH+ik+gg+gRbRxPMQ2XVI0VLgXH1VN 52QIpL0i3ULF3bU7g1Jshnvj9e6YLLLPEVeLSi1oQSZMwrW9xtD70fbkW4K6jGQzuIoM /ax6JZXi7Iuy13MrrP7oCG3XocCVevgf5XaO2Vg0QhrgiAkOmoxN+c+loP2baO32v7gZ B2ta6OW4fDBfTb/ouioMaGxpSaQS7yNWlmrT4Ez47Be77Zdu7G6FDu2+F0vsUios7E9t 2w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 396wyujafn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jun 2021 11:27:27 -0400 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15FF4dux030217; Tue, 15 Jun 2021 11:27:27 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 396wyujafe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jun 2021 11:27:27 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15FFCCE7013488; Tue, 15 Jun 2021 15:22:19 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma04dal.us.ibm.com with ESMTP id 3965ytmfpm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jun 2021 15:22:19 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15FFMHw735520888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Jun 2021 15:22:18 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D159C78066; Tue, 15 Jun 2021 15:22:17 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 702507805E; Tue, 15 Jun 2021 15:22:17 +0000 (GMT) Received: from sbct-3.pok.ibm.com?044watson.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 15 Jun 2021 15:22:17 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 3/5] acpi: Eliminate all TPM related code if CONFIG_TPM is not set Date: Tue, 15 Jun 2021 11:21:50 -0400 Message-Id: <20210615152152.2496772-4-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210615152152.2496772-1-stefanb@linux.vnet.ibm.com> References: <20210615152152.2496772-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 1N21GD9GJl18NaSg3ZEAh77KAiUYmfsP X-Proofpoint-GUID: 6AkQXHIdFngS9jMRsjYftWRgbm3u2i2p X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-15_07:2021-06-14, 2021-06-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 spamscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106150095 Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no 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: peter.maydell@linaro.org, Igor Mammedov , "M : Michael S . Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Berger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Stefan Berger Cc: M: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20210614191335.1968807-4-stefanb@linux.ibm.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/acpi/aml-build.c | 2 ++ include/hw/acpi/tpm.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index f0035d2b4a..d5103e6d7b 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); } +#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 *linker, GArray *tcpalog, (void *)(table_data->data + tpm2_start), "TPM2", table_data->len - tpm2_start, 4, oem_id, oem_table_id); } +#endif Aml *build_crs(PCIHostState *host, CrsRangeSet *range_set, uint32_t io_offset, uint32_t mmio32_offset, uint64_t mmio64_offset, diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h index 1a2a57a21f..559ba6906c 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" +#ifdef CONFIG_TPM + #define TPM_TIS_ADDR_BASE 0xFED40000 #define TPM_TIS_ADDR_SIZE 0x5000 @@ -209,4 +211,6 @@ REG32(CRB_DATA_BUFFER, 0x80) void tpm_build_ppi_acpi(TPMIf *tpm, Aml *dev); +#endif /* CONFIG_TPM */ + #endif /* HW_ACPI_TPM_H */ -- 2.31.1