[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v1 3/5] acpi: Eliminate all TPM related code if CONFIG_TPM is not
From: |
Stefan Berger |
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 |
From: Stefan Berger <stefanb@linux.ibm.com>
Cc: M: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210614191335.1968807-4-stefanb@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
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
- [PULL v1 0/5] Merge tpm 2021/06/15 v1, Stefan Berger, 2021/06/15
- [PULL v1 1/5] i386: Eliminate all TPM related code if CONFIG_TPM is not set, Stefan Berger, 2021/06/15
- [PULL v1 4/5] sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined, Stefan Berger, 2021/06/15
- [PULL v1 5/5] tpm: Return QMP error when TPM is disabled in build, Stefan Berger, 2021/06/15
- [PULL v1 2/5] arm: Eliminate all TPM related code if CONFIG_TPM is not set, Stefan Berger, 2021/06/15
- [PULL v1 3/5] acpi: Eliminate all TPM related code if CONFIG_TPM is not set,
Stefan Berger <=
- Re: [PULL v1 0/5] Merge tpm 2021/06/15 v1, Peter Maydell, 2021/06/16
- Re: [PULL v1 0/5] Merge tpm 2021/06/15 v1, Philippe Mathieu-Daudé, 2021/06/16