On Tue, 21 Jul 2020 at 17:07, Philippe Mathieu-Daudé <phi...@redhat.com> wrote:
>
> Hi Stefan,
>
> I'm trying to understand what is modelling the
> TYPE_TPM_TIS_ISA device.
>
> It inherits from TYPE_ISA_DEVICE, so I expected
> to see an ISA device, but then I noticed:
>
> 1/ it doesn't use the ISA I/O space, it directly
> maps the device in the system memory at a fixed
> address that is not addressable by the ISA bus:
>
> #define TPM_TIS_ADDR_BASE           0xFED40000

Why do you think this is mapping to the system memory?
tpm_tis_isa_realizefn() does:

    memory_region_add_subregion(isa_address_space(ISA_DEVICE(dev)),
                                TPM_TIS_ADDR_BASE, &s->mmio);

which puts it into the ISA memory address space.

The weird thing about this is not which AS it's
going in but the fact that the TPM_TIS_ADDR_BASE
is way higher than an actual ISA bus can address
(so for instance it's out of range of the size of
the ISA memory window on the Jazz board).

> 2/ it is not plugged to an ISA BUS (ISABus*)

Won't it autoplug into the ISA bus if you say "-device tpm-tis",
the same as any other ISA device ?

> 3/ no machine plug it using isa_register_ioport()
>    (it is not registered to the ISA memory space)

There's no requirement for an ISA device to have IO ports...

thanks
-- PMM

Reply via email to