On Fri, 8 May 2020 at 17:24, Shannon Zhao <shannon.zha...@gmail.com> wrote:
>
> Hi,
>
> On 2020/5/5 22:44, Eric Auger wrote:
> > +static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)
> > +{
> > +    hwaddr pbus_base = vms->memmap[VIRT_PLATFORM_BUS].base;
> > +    PlatformBusDevice *pbus = PLATFORM_BUS_DEVICE(vms->platform_bus_dev);
> > +    MemoryRegion *sbdev_mr;
> > +    SysBusDevice *sbdev;
> > +    hwaddr tpm_base;
> > +
> > +    sbdev = (SysBusDevice *)object_dynamic_cast(OBJECT(tpm_find()),
> > +                                                TYPE_SYS_BUS_DEVICE);
>
> Does it need to check the tpm version like you do in previous patch?
>
> tpm_get_version(tpm_find()) == TPM_VERSION_2_0
>

I don't think so. The device node could in theory be used to describe
a TPM 1.2/1.3 as well, even though we never actually do that.

Reply via email to