TIS device model for Qemu
PATCH 3/3 TIS device model for Qemu
This patch adds a TIS device model compliant to the 1.2 TPM specification to Qemu. It implements all registers necessary to make the Linux TIS driver work (tpm_tis.c).
All of the basic registers supported by this type of device are implemented. Also the locality selection has been implemented, but has not been tested. The legacy registers as described in the specification are not supported.
Current caveat: The device has so far not yet been integrated with the virtual TPM available in the repository. It will require changes to the virtual TPM spawned by the vTPM manager to offer an additional message interface. The TIS interface itself then needs to have an additional transport implemented. (see vTPMTransmit array).
The relevant specification for the device model can be found here:
xen-unstable.hg/tools/ioemu/hw/pc.c +3 -0
@@ -875,6 +875,9 @@ static void pc_init1(uint64_t ram_size, } } +if (has_tpm_device ()) +tpm_tis_init (&pic_set_irq_new, isa_pic,11 ); +kbd_init ();DMA_init (0 );#ifdef HAS_AUDIO
xen-unstable.hg/tools/ioemu/hw/tpm_tis.c new file +1114 -0
1,114 lines not on this page · raw message
xen-unstable.hg/tools/ioemu/vl.h +4 -0
@@ -929,6 +929,10 @@ extern int acpi_enabled;void piix4_pm_init (PCIBus *bus,int devfn);void acpi_bios_init (void ); +/* tpm_tis.c */ +int has_tpm_device (void ); +void tpm_tis_init (SetIRQFunc *set_irq,void *irq_opaque,int irq); +/* piix4acpi.c */ extern void pci_piix4_acpi_init (PCIBus *bus,int devfn);
xen-unstable.hg/tools/ioemu/Makefile.target +1 -0
@@ -368,6 +368,7 @@ VL_OBJS+= usb-uhci.o VL_OBJS+= piix4acpi.o VL_OBJS+= xenstore.o VL_OBJS+= xen_platform.o +VL_OBJS+= tpm_tis.o DEFINES += -DHAS_AUDIO endif ifeq ($(TARGET_BASE_ARCH), ppc)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel