The CRBState::ppi_enabled boolean was only set in the
hw_compat_3_1[] array, via the 'ppi=false' property.
We removed all machines using that array, lets remove
that property and all the code around it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20260307152635.83893-11-philmd@linaro.org>
---
hw/tpm/tpm_tis.h | 1 -
hw/acpi/tpm.c | 4 ----
hw/i386/acpi-build.c | 2 +-
hw/tpm/tpm_crb.c | 12 +++---------
hw/tpm/tpm_tis_common.c | 4 +---
hw/tpm/tpm_tis_isa.c | 7 ++-----
6 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h
index 184632ff66b..0df45f0c716 100644
--- a/hw/tpm/tpm_tis.h
+++ b/hw/tpm/tpm_tis.h
@@ -75,7 +75,6 @@ typedef struct TPMState {
size_t be_buffer_size;
- bool ppi_enabled;
TPMPPI ppi;
} TPMState;
diff --git a/hw/acpi/tpm.c b/hw/acpi/tpm.c
index cdc02275365..922030a29bf 100644
--- a/hw/acpi/tpm.c
+++ b/hw/acpi/tpm.c
@@ -25,10 +25,6 @@ void tpm_build_ppi_acpi(TPMIf *tpm, Aml *dev)
Aml *method, *field, *ifctx, *ifctx2, *ifctx3, *func_mask,
*not_implemented, *pak, *tpm2, *tpm3, *pprm, *pprq, *zero, *one;
- if (!object_property_get_bool(OBJECT(tpm), "ppi", &error_abort)) {
- return;
- }
-
zero = aml_int(0);
one = aml_int(1);
func_mask = aml_int(TPM_PPI_FUNC_MASK);
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index f622b91b76a..6b7cd00c5db 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2218,7 +2218,7 @@ void acpi_setup(void)
tables.tcpalog->data, acpi_data_len(tables.tcpalog));
tpm = tpm_find();
- if (tpm && object_property_get_bool(OBJECT(tpm), "ppi", &error_abort)) {
+ if (tpm) {
tpm_config = (FwCfgTPMConfig) {
.tpmppi_address = cpu_to_le32(TPM_PPI_ADDR_BASE),
.tpm_version = tpm_get_version(tpm),
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 8723536f931..40ffc7b006b 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -43,7 +43,6 @@ struct CRBState {
size_t be_buffer_size;
- bool ppi_enabled;
TPMPPI ppi;
};
typedef struct CRBState CRBState;
@@ -228,16 +227,13 @@ static const VMStateDescription vmstate_tpm_crb = {
static const Property tpm_crb_properties[] = {
DEFINE_PROP_TPMBE("tpmdev", CRBState, tpmbe),
- DEFINE_PROP_BOOL("ppi", CRBState, ppi_enabled, true),
};
static void tpm_crb_reset(void *dev)
{
CRBState *s = CRB(dev);
- if (s->ppi_enabled) {
- tpm_ppi_reset(&s->ppi);
- }
+ tpm_ppi_reset(&s->ppi);
tpm_backend_reset(s->tpmbe);
memset(s->regs, 0, sizeof(s->regs));
@@ -303,10 +299,8 @@ static void tpm_crb_realize(DeviceState *dev, Error **errp)
memory_region_add_subregion(get_system_memory(),
TPM_CRB_ADDR_BASE + sizeof(s->regs), &s->cmdmem);
- if (s->ppi_enabled) {
- tpm_ppi_init(&s->ppi, get_system_memory(),
- TPM_PPI_ADDR_BASE, OBJECT(s));
- }
+ tpm_ppi_init(&s->ppi, get_system_memory(),
+ TPM_PPI_ADDR_BASE, OBJECT(s));
if (xen_enabled()) {
tpm_crb_reset(dev);
diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c
index f594b15b8ab..712d64b60f1 100644
--- a/hw/tpm/tpm_tis_common.c
+++ b/hw/tpm/tpm_tis_common.c
@@ -821,9 +821,7 @@ void tpm_tis_reset(TPMState *s)
s->be_buffer_size = MIN(tpm_backend_get_buffer_size(s->be_driver),
TPM_TIS_BUFFER_MAX);
- if (s->ppi_enabled) {
- tpm_ppi_reset(&s->ppi);
- }
+ tpm_ppi_reset(&s->ppi);
tpm_backend_reset(s->be_driver);
s->active_locty = TPM_TIS_NO_LOCALITY;
diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c
index 61e95434f5b..aadca4ed79b 100644
--- a/hw/tpm/tpm_tis_isa.c
+++ b/hw/tpm/tpm_tis_isa.c
@@ -94,7 +94,6 @@ static void tpm_tis_isa_reset(DeviceState *dev)
static const Property tpm_tis_isa_properties[] = {
DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_IRQ),
DEFINE_PROP_TPMBE("tpmdev", TPMStateISA, state.be_driver),
- DEFINE_PROP_BOOL("ppi", TPMStateISA, state.ppi_enabled, true),
};
static void tpm_tis_isa_initfn(Object *obj)
@@ -132,10 +131,8 @@ static void tpm_tis_isa_realizefn(DeviceState *dev, Error **errp)
memory_region_add_subregion(isa_address_space(ISA_DEVICE(dev)),
TPM_TIS_ADDR_BASE, &s->mmio);
- if (s->ppi_enabled) {
- tpm_ppi_init(&s->ppi, isa_address_space(ISA_DEVICE(dev)),
- TPM_PPI_ADDR_BASE, OBJECT(dev));
- }
+ tpm_ppi_init(&s->ppi, isa_address_space(ISA_DEVICE(dev)),
+ TPM_PPI_ADDR_BASE, OBJECT(dev));
}
static void build_tpm_tis_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
--
2.53.0