From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] acpi: cleanups tcpa table generation
Date: Mon, 11 Aug 2014 08:49:36 -0400 [thread overview]
Message-ID: <53E8BBE0.3020201@linux.vnet.ibm.com> (raw)
In-Reply-To: <1406720068-16482-3-git-send-email-mst@redhat.com>
On 07/30/2014 07:34 AM, Michael S. Tsirkin wrote:
> Improve readability, no functional changes.
There's a subtle problem -- I am fixing this for v3.
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/i386/acpi-build.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 66cde2b..6ae3a9e 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -1209,17 +1209,13 @@ build_hpet(GArray *table_data, GArray *linker)
> static void
> build_tpm_tcpa(GArray *table_data, GArray *linker)
> {
> - Acpi20Tcpa *tcpa;
> - uint32_t log_area_minimum_length = TPM_LOG_AREA_MINIMUM_SIZE;
> - uint64_t log_area_start_address;
> - size_t len = log_area_minimum_length + sizeof(*tcpa);
> + Acpi20Tcpa *tcpa = acpi_data_push(table_data, sizeof *tcpa);
> + uint64_t log_area_start_address = acpi_data_len(table_data);
>
> - log_area_start_address = table_data->len + sizeof(*tcpa);
> -
> - tcpa = acpi_data_push(table_data, len);
> + acpi_data_push(table_data, TPM_LOG_AREA_MINIMUM_SIZE);
This 2nd acpi_data_push manipulates table_data and the BIOS linker
loader function further below now operates with this new table_data
offsets etc. We have to move this acpi_data_push all the way to the end
and then it works.
>
> tcpa->platform_class = cpu_to_le16(TPM_TCPA_ACPI_CLASS_CLIENT);
> - tcpa->log_area_minimum_length = cpu_to_le32(log_area_minimum_length);
> + tcpa->log_area_minimum_length = cpu_to_le32(TPM_LOG_AREA_MINIMUM_SIZE);
> tcpa->log_area_start_address = cpu_to_le64(log_area_start_address);
>
> /* LASA address to be filled by Guest linker */
next prev parent reply other threads:[~2014-08-11 12:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 11:34 [Qemu-devel] [PATCH 0/2] tpm: acpi generation tweaks Michael S. Tsirkin
2014-07-30 11:34 ` [Qemu-devel] [PATCH 1/2] tpm: remove code duplication Michael S. Tsirkin
2014-07-30 13:37 ` Stefan Berger
2014-07-30 11:34 ` [Qemu-devel] [PATCH 2/2] acpi: cleanups tcpa table generation Michael S. Tsirkin
2014-07-30 13:38 ` Stefan Berger
2014-08-11 12:49 ` Stefan Berger [this message]
2014-08-08 19:25 ` [Qemu-devel] [PATCH 0/2] tpm: acpi generation tweaks Stefan Berger
2014-08-10 20:04 ` Michael S. Tsirkin
2014-08-11 11:35 ` Stefan Berger
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=53E8BBE0.3020201@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=aliguori@amazon.com \
--cc=mst@redhat.com \
--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.