[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 13/58] acpi: tpm: Do not build TCPA table for TPM 2
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 13/58] acpi: tpm: Do not build TCPA table for TPM 2 |
Date: |
Fri, 12 Jun 2020 10:51:30 -0400 |
From: Stefan Berger <stefanb@linux.ibm.com>
Do not build a TCPA table for TPM 2 anymore but create the log area when
building the TPM2 table. The TCPA table is only needed for TPM 1.2.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/acpi-build.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 58fe505fb6..d05d010f77 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2216,6 +2216,10 @@ build_tpm2(GArray *table_data, BIOSLinker *linker,
GArray *tcpalog)
tpm2_ptr->log_area_minimum_length =
cpu_to_le32(TPM_LOG_AREA_MINIMUM_SIZE);
+ acpi_data_push(tcpalog, le32_to_cpu(tpm2_ptr->log_area_minimum_length));
+ bios_linker_loader_alloc(linker, ACPI_BUILD_TPMLOG_FILE, tcpalog, 1,
+ false);
+
/* log area start address to be filled by Guest linker */
bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE,
log_addr_offset, log_addr_size,
@@ -2752,10 +2756,10 @@ void acpi_build(AcpiBuildTables *tables, MachineState
*machine)
build_hpet(tables_blob, tables->linker);
}
if (misc.tpm_version != TPM_VERSION_UNSPEC) {
- acpi_add_table(table_offsets, tables_blob);
- build_tpm_tcpa(tables_blob, tables->linker, tables->tcpalog);
-
- if (misc.tpm_version == TPM_VERSION_2_0) {
+ if (misc.tpm_version == TPM_VERSION_1_2) {
+ acpi_add_table(table_offsets, tables_blob);
+ build_tpm_tcpa(tables_blob, tables->linker, tables->tcpalog);
+ } else { /* TPM_VERSION_2_0 */
acpi_add_table(table_offsets, tables_blob);
build_tpm2(tables_blob, tables->linker, tables->tcpalog);
}
--
MST
- [PULL v2 00/58] virtio,acpi,pci: features, fixes, cleanups, tests, Michael S. Tsirkin, 2020/06/12
- [PULL v2 01/58] msix: allow qword MSI-X table accesses, Michael S. Tsirkin, 2020/06/12
- [PULL v2 03/58] hw/acpi/nvdimm: add a helper to augment SRAT generation, Michael S. Tsirkin, 2020/06/12
- [PULL v2 07/58] acpi: rtc: use a single crs range, Michael S. Tsirkin, 2020/06/12
- [PULL v2 06/58] acpi: move aml builder code for rtc device, Michael S. Tsirkin, 2020/06/12
- [PULL v2 08/58] acpi: serial: don't use _STA method, Michael S. Tsirkin, 2020/06/12
- [PULL v2 10/58] acpi: parallel: don't use _STA method, Michael S. Tsirkin, 2020/06/12
- [PULL v2 09/58] acpi: move aml builder code for serial device, Michael S. Tsirkin, 2020/06/12
- [PULL v2 11/58] acpi: move aml builder code for parallel device, Michael S. Tsirkin, 2020/06/12
- [PULL v2 13/58] acpi: tpm: Do not build TCPA table for TPM 2,
Michael S. Tsirkin <=
- [PULL v2 15/58] acpi: Move build_tpm2() in the generic part, Michael S. Tsirkin, 2020/06/12
- [PULL v2 16/58] arm/acpi: TPM2 ACPI table support, Michael S. Tsirkin, 2020/06/12
- [PULL v2 12/58] tests/acpi: update DSDT expected files, Michael S. Tsirkin, 2020/06/12
- [PULL v2 19/58] tests: tpm-emu: Remove assert on TPM2_ST_NO_SESSIONS, Michael S. Tsirkin, 2020/06/12
- [PULL v2 21/58] bios-tables-test: Generate reference tables for Q35/TPM-TIS, Michael S. Tsirkin, 2020/06/12
- [PULL v2 20/58] bios-tables-test: Add Q35/TPM-TIS test, Michael S. Tsirkin, 2020/06/12