From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: Andreas Niederl <andreas.niederl@iaik.tugraz.at>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/5] Provide SSDT for enabled TPM device
Date: Fri, 18 Feb 2011 12:02:19 -0500 [thread overview]
Message-ID: <4D5EA61B.5030002@linux.vnet.ibm.com> (raw)
In-Reply-To: <1298043215-10083-3-git-send-email-andreas.niederl@iaik.tugraz.at>
On 02/18/2011 10:33 AM, Andreas Niederl wrote:
> Signed-off-by: Andreas Niederl<andreas.niederl@iaik.tugraz.at>
> ---
> Makefile.target | 3 +++
> hw/acpi.c | 28 ++++++++++++++++++++++++++++
> hw/pc.h | 1 +
> hw/tpm.h | 2 ++
> hw/tpm_acpi.c | 40 ++++++++++++++++++++++++++++++++++++++++
> hw/tpm_ssdt.dsl | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> hw/tpm_ssdt.hex | 41 +++++++++++++++++++++++++++++++++++++++++
> hw/tpm_tis.c | 1 +
> rules.mak | 7 ++++++-
> vl.c | 23 +++++++++++++++++++++++
> 10 files changed, 200 insertions(+), 1 deletions(-)
> create mode 100644 hw/tpm_acpi.c
> create mode 100644 hw/tpm_ssdt.dsl
> create mode 100644 hw/tpm_ssdt.hex
>
> diff --git a/Makefile.target b/Makefile.target
> index 5a0fd40..33ffe19 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -211,6 +211,9 @@ obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
> # Inter-VM PCI shared memory
> obj-$(CONFIG_KVM) += ivshmem.o
>
> +# TPM acpi support
> +obj-$(CONFIG_TPM) += tpm_acpi.o
> +
> # Hardware support
> obj-i386-y += vga.o
> obj-i386-y += mc146818rtc.o i8259.o pc.o
> diff --git a/hw/acpi.c b/hw/acpi.c
> index 8071e7b..93656c5 100644
> --- a/hw/acpi.c
> +++ b/hw/acpi.c
> @@ -35,6 +35,34 @@ struct acpi_table_header
> char *acpi_tables;
> size_t acpi_tables_len;
>
> +
> +/*
> + * add a table directly (e.g. iasl C source output)
> + */
> +int acpi_table_add_raw(const char *t, uint32_t length)
> +{
> + char *p;
> +
> + if (!acpi_tables) {
> + acpi_tables_len = sizeof(uint16_t);
> + acpi_tables = qemu_mallocz(acpi_tables_len);
> + }
> + acpi_tables = qemu_realloc(acpi_tables,
> + acpi_tables_len + sizeof(uint16_t) + length);
> + p = acpi_tables + acpi_tables_len;
> + acpi_tables_len += sizeof(uint16_t) + length;
> +
> + *(uint16_t*)p = cpu_to_le32(length);
> + p += sizeof(uint16_t);
> +
> + memcpy(p, t, length);
> +
> + /* increase number of tables */
> + (*(uint16_t*)acpi_tables) =
> + cpu_to_le32(le32_to_cpu(*(uint16_t*)acpi_tables) + 1);
> + return 0;
> +}
> +
Does it show up in Linux? I am trying to find the code that connects it
to the RSDT, but don't see any.
Stefan
next prev parent reply other threads:[~2011-02-18 18:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 15:33 [Qemu-devel] [PATCH 0/5] TPM device emulation Andreas Niederl
2011-02-18 15:33 ` [Qemu-devel] [PATCH 1/5] Add TPM 1.2 device interface Andreas Niederl
2011-02-18 16:37 ` Stefan Berger
2011-02-18 17:37 ` Andreas Niederl
2011-02-18 20:27 ` Stefan Berger
2011-02-21 17:03 ` Andreas Niederl
2011-02-22 16:47 ` Stefan Berger
2011-02-24 15:30 ` Andreas Niederl
2011-02-24 17:44 ` Stefan Berger
2011-02-18 21:03 ` Stefan Berger
2011-02-21 17:13 ` Andreas Niederl
2011-02-18 15:33 ` [Qemu-devel] [PATCH 2/5] Provide SSDT for enabled TPM device Andreas Niederl
2011-02-18 17:02 ` Stefan Berger [this message]
2011-02-21 16:55 ` Andreas Niederl
2011-02-18 15:33 ` [Qemu-devel] [PATCH 3/5] Add TPM host passthrough device backend Andreas Niederl
2011-02-18 15:33 ` [Qemu-devel] [PATCH 4/5] Add configure script and command line options for TPM interface Andreas Niederl
2011-02-18 15:33 ` [Qemu-devel] [PATCH 5/5] Adapt TPM host backend to use threadlets Andreas Niederl
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=4D5EA61B.5030002@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=andreas.niederl@iaik.tugraz.at \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.