mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
arm: Eliminate all TPM related code if CONFIG_TPM is not set
Peter Maydell <peter.maydell@linaro.org> 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-3-stefanb@linux.ibm.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
11fb99e6f4
commit
f50be48a7b
3 changed files with 12 additions and 0 deletions
|
@ -205,6 +205,7 @@ static void acpi_dsdt_add_gpio(Aml *scope, const MemMapEntry *gpio_memmap,
|
|||
aml_append(scope, dev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TPM
|
||||
static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)
|
||||
{
|
||||
PlatformBusDevice *pbus = PLATFORM_BUS_DEVICE(vms->platform_bus_dev);
|
||||
|
@ -236,6 +237,7 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)
|
|||
aml_append(dev, aml_name_decl("_CRS", crs));
|
||||
aml_append(scope, dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
build_iort(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
|
||||
|
@ -642,7 +644,9 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
|
|||
}
|
||||
|
||||
acpi_dsdt_add_power_button(scope);
|
||||
#ifdef CONFIG_TPM
|
||||
acpi_dsdt_add_tpm(scope, vms);
|
||||
#endif
|
||||
|
||||
aml_append(dsdt, scope);
|
||||
|
||||
|
@ -745,11 +749,13 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
|
|||
build_iort(tables_blob, tables->linker, vms);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TPM
|
||||
if (tpm_get_version(tpm_find()) == TPM_VERSION_2_0) {
|
||||
acpi_add_table(table_offsets, tables_blob);
|
||||
build_tpm2(tables_blob, tables->linker, tables->tcpalog, vms->oem_id,
|
||||
vms->oem_table_id);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XSDT is pointed to by RSDP */
|
||||
xsdt = tables_blob->len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue