qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Thomas Bleher <ThomasBleher@gmx.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Add TPM support
Date: Wed, 31 Oct 2007 12:54:38 +0000	[thread overview]
Message-ID: <20071031125438.GG7712@networkno.de> (raw)
In-Reply-To: <20071031120636.GA7567@thomas>

Thomas Bleher wrote:
> This patch adds support for an Atmel TPM chip.
> 
> Background: TPMs are rather complex chips, supporting many commands and
> implementing complex crypto protocols like Direct Anonymous Attestation
> (DAA). Therefore, this patch does not directly implement a TPM chip, but
> instead utilizes the TPM emulator project (http://tpm-emulator.berlios.de/).
> The TPM emulator can be run as a daemon, communicating through a unix domain
> socket.
> 
> This patch adds a "-tpm path" parameter to qemu, where "path" is the unix
> domain socket of the TPM emulator. If the parameter is given, the chip is
> registered in the emulated system. Otherwise, behaviour is unchanged.
> 
> The interface presented inside qemu is that of an Atmel TPM chip, simply
> because there is a Linux driver for this chip and the interface is very
> simple. I do not own any TPM chip, therefore the interface was written
> purely by looking at the Linux driver.
> 
> Use case: This patch makes it possible to experiment with software like IBMs
> Integrity Measurement Architecture (IMA), without having an actual TPM (this
> patch was developed for a demonstration involving IMA, among other things).
> It should also be possible to use Microsofts BitLocker technology, although
> this hasn't been tested yet.
> 
> ---
>  Makefile.target |    3 +
>  hw/tpm.c        |  219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  vl.c            |   12 +++
>  vl.h            |    4 +
>  4 files changed, 238 insertions(+), 0 deletions(-)
>  create mode 100644 hw/tpm.c
> 
> diff --git a/Makefile.target b/Makefile.target
> index 33dc285..3665e82 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -460,6 +460,9 @@ VL_OBJS += ne2000.o
>  VL_OBJS += pcnet.o
>  VL_OBJS += rtl8139.o
>  
> +# TPM device
> +VL_OBJS += tpm.o
> +
>  ifeq ($(TARGET_BASE_ARCH), i386)
>  # Hardware support
>  VL_OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
> diff --git a/hw/tpm.c b/hw/tpm.c
> new file mode 100644
> index 0000000..eaebd46
> --- /dev/null
> +++ b/hw/tpm.c
> @@ -0,0 +1,219 @@
> +/*
> + * TPM emulation
> + * Written by Thomas Bleher <ThomasBleher@gmx.de>.
> + *
> + * This driver emulates a TPM chip. TPM chips are quite complex, and a TPM
> + * emulator already exists, therefore this driver just connects to this
> + * emulator and forwards all the data. For the TPM emulator project, see
> + * http://tpm-emulator.berlios.de/
> + *
> + * The author does not own any TPM chip himself, so the Linux Kernel driver for
> + * Atmel TPM chips was taken as a reference. The code works fine with the Linux
> + * driver, but no tests have been done on other operating systems.
> + *
> + * Some structures are copied from the Linux Kernel source code.
> + */

So the License of this file is "GPL, Version 2"? The license should be
mentioned in the comment.


Thiemo

  reply	other threads:[~2007-10-31 12:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31 12:06 [Qemu-devel] [PATCH] Add TPM support Thomas Bleher
2007-10-31 12:54 ` Thiemo Seufer [this message]
2007-10-31 14:10   ` Thomas Bleher
2007-10-31 16:14     ` Thiemo Seufer
2007-11-01 15:55       ` Thomas Bleher
2007-11-05 14:15         ` Thomas Bleher
2007-11-05 15:40           ` Fabrice Bellard
2007-11-06  8:07             ` Thomas Bleher
2007-11-06 19:46               ` Fabrice Bellard
2007-11-07 12:05                 ` Thomas Bleher
2007-11-07 16:29                   ` Fabrice Bellard
2007-11-11 21:18                     ` Thomas Bleher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071031125438.GG7712@networkno.de \
    --to=ths@networkno.de \
    --cc=ThomasBleher@gmx.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).