U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Brugger <mbrugger@suse.com>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
	Simon Glass <sjg@chromium.org>
Cc: Peter Robinson <pbrobinson@gmail.com>,
	Tom Rini <trini@konsulko.com>, Bin Meng <bmeng.cn@gmail.com>,
	Patrick Rudolph <patrick.rudolph@9elements.com>,
	Maximilian Brune <maximilian.brune@9elements.com>,
	Fiona Klute <fiona.klute@gmx.de>,
	Martin Stolpe <martinstolpe@gmail.com>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Moritz Fischer <moritzf@google.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH 1/5] acpi: new function acpi_update_checksum()
Date: Tue, 25 Mar 2025 15:49:20 +0100	[thread overview]
Message-ID: <9b35c8c5-d6ea-485b-9ab3-dc027163a515@suse.com> (raw)
In-Reply-To: <20250321232121.251800-2-heinrich.schuchardt@canonical.com>



On 22/03/2025 00:21, Heinrich Schuchardt wrote:
> Introduce a new function to update ACPI table headers.
> This allows to simplify the existing code.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

Reviewed-by: Matthias Brugger <mbrugger@suse.com>

> ---
>   include/acpi/acpi_table.h | 7 +++++++
>   lib/acpi/acpi.c           | 7 +++++++
>   2 files changed, 14 insertions(+)
> 
> diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
> index b8b1f1338c6..f8e5f552ab1 100644
> --- a/include/acpi/acpi_table.h
> +++ b/include/acpi/acpi_table.h
> @@ -1274,6 +1274,13 @@ ulong write_acpi_tables(ulong start);
>    */
>   struct acpi_table_header *acpi_find_table(const char *sig);
>   
> +/**
> + * acpi_update_checksum() - update ACPI table checksum
> + *
> + * @header - header of an ACPI table
> + */
> +void acpi_update_checksum(struct acpi_table_header *header);
> +
>   #endif /* !__ACPI__*/
>   
>   #include <asm/acpi_table.h>
> diff --git a/lib/acpi/acpi.c b/lib/acpi/acpi.c
> index f4d5c1e25d0..596301a43fe 100644
> --- a/lib/acpi/acpi.c
> +++ b/lib/acpi/acpi.c
> @@ -6,11 +6,18 @@
>    */
>   
>   #include <mapmem.h>
> +#include <tables_csum.h>
>   #include <acpi/acpi_table.h>
>   #include <asm/global_data.h>
>   
>   DECLARE_GLOBAL_DATA_PTR;
>   
> +void acpi_update_checksum(struct acpi_table_header *header)
> +{
> +	header->checksum = 0;
> +	header->checksum = table_compute_checksum(header, header->length);
> +}
> +
>   struct acpi_table_header *acpi_find_table(const char *sig)
>   {
>   	struct acpi_rsdp *rsdp;


  reply	other threads:[~2025-03-25 14:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 23:21 [PATCH 0/5] acpi: simplify updating ACPI table header checksum Heinrich Schuchardt
2025-03-21 23:21 ` [PATCH 1/5] acpi: new function acpi_update_checksum() Heinrich Schuchardt
2025-03-25 14:49   ` Matthias Brugger [this message]
2025-03-26  7:29   ` Ilias Apalodimas
2025-03-21 23:21 ` [PATCH 2/5] acpi: simplify updating header checksum Heinrich Schuchardt
2025-03-25 14:55   ` Matthias Brugger
2025-03-26  7:30   ` Ilias Apalodimas
2025-03-21 23:21 ` [PATCH 3/5] x86/acpi: " Heinrich Schuchardt
2025-03-25 14:58   ` Matthias Brugger
2025-03-21 23:21 ` [PATCH 4/5] qemu-sbsa: simplify updating ACPI table " Heinrich Schuchardt
2025-03-25 15:01   ` Matthias Brugger
2025-03-26  7:30   ` Ilias Apalodimas
2025-03-21 23:21 ` [PATCH 5/5] arm: " Heinrich Schuchardt
2025-03-25 15:03   ` Matthias Brugger
2025-03-26  7:31   ` Ilias Apalodimas
2025-04-10  1:46 ` [PATCH 0/5] acpi: " Tom Rini

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=9b35c8c5-d6ea-485b-9ab3-dc027163a515@suse.com \
    --to=mbrugger@suse.com \
    --cc=bmeng.cn@gmail.com \
    --cc=fiona.klute@gmx.de \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=martinstolpe@gmail.com \
    --cc=maximilian.brune@9elements.com \
    --cc=moritzf@google.com \
    --cc=patrick.rudolph@9elements.com \
    --cc=pbrobinson@gmail.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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