From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: Simon Glass <sjg@chromium.org>, Rick Chen <rick@andestech.com>,
Leo <ycliang@andestech.com>,
Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>,
Bin Meng <bmeng.cn@gmail.com>,
u-boot@lists.denx.de
Subject: Re: [PATCH v4 5/9] acpi: enable writing ACPI tables on QEMU
Date: Fri, 29 Dec 2023 09:32:45 +0200 [thread overview]
Message-ID: <ZY52HXjJGruD7fM3@hades> (raw)
In-Reply-To: <20231219150408.10949-6-heinrich.schuchardt@canonical.com>
On Tue, Dec 19, 2023 at 04:04:04PM +0100, Heinrich Schuchardt wrote:
> Invoke write_acpi_tables() via EVT_LAST_STAGE_INIT on QEMU except on X86.
> X86 calls write_acpi_tables() in write_tables().
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> v4:
> no change
> v3:
> no change
> v2:
> new patch
> ---
> drivers/misc/qfw_acpi.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/misc/qfw_acpi.c b/drivers/misc/qfw_acpi.c
> index 6e14b2a504..7ffed1e8c0 100644
> --- a/drivers/misc/qfw_acpi.c
> +++ b/drivers/misc/qfw_acpi.c
> @@ -9,9 +9,11 @@
> #include <acpi/acpi_table.h>
> #include <errno.h>
> #include <malloc.h>
> +#include <mapmem.h>
> #include <qfw.h>
> #include <tables_csum.h>
> #include <stdio.h>
> +#include <linux/sizes.h>
> #include <asm/byteorder.h>
> #include <asm/global_data.h>
>
> @@ -254,3 +256,26 @@ ulong acpi_get_rsdp_addr(void)
> file = qfw_find_file(dev, "etc/acpi/rsdp");
> return file->addr;
> }
> +
> +#ifndef CONFIG_X86
> +static int evt_write_acpi_tables(void)
> +{
> + ulong addr, end;
> + void *ptr;
> +
> + /* Reserve 64K for ACPI tables, aligned to a 4K boundary */
> + ptr = memalign(SZ_4K, SZ_64K);
> + if (!ptr)
> + return -ENOMEM;
> + addr = map_to_sysmem(ptr);
> +
> + /* Generate ACPI tables */
> + end = write_acpi_tables(addr);
> + gd->arch.table_start = addr;
> + gd->arch.table_end = addr;
is this a typo and should be
gd->arch.table_end = end; ?
> +
> + return 0;
> +}
> +
> +EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, evt_write_acpi_tables);
> +#endif
> --
> 2.40.1
>
Thanks
/Ilias
next prev parent reply other threads:[~2023-12-29 7:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 15:03 [PATCH v4 0/9] acpi: add ACPI support on QEMU ARM and RISC-V Heinrich Schuchardt
2023-12-19 15:04 ` [PATCH v4 1/9] acpi: Kconfig symbol CONFIG_QFW_ACPI Heinrich Schuchardt
2024-01-08 0:16 ` Simon Glass
2023-12-19 15:04 ` [PATCH v4 2/9] acpi: carve out qfw_acpi.c Heinrich Schuchardt
2023-12-29 7:33 ` Ilias Apalodimas
2024-01-08 0:16 ` Simon Glass
2023-12-19 15:04 ` [PATCH v4 3/9] arm: add ACPI fields to global data Heinrich Schuchardt
2023-12-19 17:02 ` Ilias Apalodimas
2023-12-20 4:46 ` Simon Glass
2024-01-08 0:16 ` Simon Glass
2023-12-19 15:04 ` [PATCH v4 4/9] riscv: " Heinrich Schuchardt
2024-01-08 0:16 ` Simon Glass
2023-12-19 15:04 ` [PATCH v4 5/9] acpi: enable writing ACPI tables on QEMU Heinrich Schuchardt
2023-12-29 7:32 ` Ilias Apalodimas [this message]
2024-01-08 0:16 ` Simon Glass
2023-12-19 15:04 ` [PATCH v4 6/9] riscv: add support for QEMU firmware tables Heinrich Schuchardt
2024-01-08 0:16 ` Simon Glass
2023-12-19 15:04 ` [PATCH v4 7/9] riscv: allow usage of ACPI Heinrich Schuchardt
2024-01-08 0:16 ` Simon Glass
2023-12-19 15:04 ` [PATCH v4 8/9] configs: qemu: add config fragment for ACPI Heinrich Schuchardt
2024-01-08 0:16 ` Simon Glass
2023-12-19 15:04 ` [PATCH v4 9/9] arm: enable support for QEMU firmware tables Heinrich Schuchardt
2023-12-20 12:48 ` Ilias Apalodimas
2024-01-08 0:16 ` Simon Glass
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=ZY52HXjJGruD7fM3@hades \
--to=ilias.apalodimas@linaro.org \
--cc=bmeng.cn@gmail.com \
--cc=heinrich.schuchardt@canonical.com \
--cc=rick@andestech.com \
--cc=sjg@chromium.org \
--cc=tuomas.tynkkynen@iki.fi \
--cc=u-boot@lists.denx.de \
--cc=ycliang@andestech.com \
/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.