From: Michal Simek <michal.simek@amd.com>
To: Raymond Mao <raymond.mao@linaro.org>,
u-boot@lists.denx.de, ilias.apalodimas@linaro.org,
sjg@chromium.org, jwerner@chromium.org
Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>,
Nikhil M Jain <n-jain1@ti.com>, Bin Meng <bmeng.cn@gmail.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Baruch Siach <baruch@tkos.co.il>,
Sean Anderson <seanga2@gmail.com>
Subject: Re: [PATCH 2/5] qemu-arm: Get bloblist from boot arguments
Date: Wed, 20 Dec 2023 12:03:22 +0100 [thread overview]
Message-ID: <5fc01bbe-01ac-43fc-b7a9-03ff149b6014@amd.com> (raw)
In-Reply-To: <20231219211114.393193-3-raymond.mao@linaro.org>
On 12/19/23 22:11, Raymond Mao wrote:
> Add platform custom function to get bloblist from boot arguments.
> Check whether boot arguments aligns with the register conventions
> defined in FW Handoff spec v0.9.
> Add bloblist related options into qemu default config.
>
> Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
> ---
> board/emulation/qemu-arm/Makefile | 1 +
> board/emulation/qemu-arm/lowlevel_init.S | 19 +++++++++
> board/emulation/qemu-arm/qemu-arm.c | 51 ++++++++++++++++++++++++
> configs/qemu_arm64_defconfig | 3 ++
> 4 files changed, 74 insertions(+)
> create mode 100644 board/emulation/qemu-arm/lowlevel_init.S
>
> diff --git a/board/emulation/qemu-arm/Makefile b/board/emulation/qemu-arm/Makefile
> index a22d1237ff..0eb262e4e2 100644
> --- a/board/emulation/qemu-arm/Makefile
> +++ b/board/emulation/qemu-arm/Makefile
> @@ -1,3 +1,4 @@
> # SPDX-License-Identifier: GPL-2.0+
>
> obj-y += qemu-arm.o
> +obj-y += lowlevel_init.o
> diff --git a/board/emulation/qemu-arm/lowlevel_init.S b/board/emulation/qemu-arm/lowlevel_init.S
> new file mode 100644
> index 0000000000..d72d7c938a
> --- /dev/null
> +++ b/board/emulation/qemu-arm/lowlevel_init.S
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: BSD-2-Clause */
> +/*
> + * Copyright (c) 2023, Linaro Limited
> + */
> +
> +#include <config.h>
> +
> +.global save_boot_params
> +save_boot_params:
> +#ifdef CONFIG_ARM64
> + adr x9, qemu_saved_args
> + stp x0, x1, [x9]
> + /* Increment the address by 16 bytes for the next pair of values */
> + stp x2, x3, [x9, #16]
There is specified how transfer list should be passed from one stage to another.
Which pretty much saying that when bloblist is enabled this is what you can
expect on arm64.
Why not to add it directly to?
arch/arm/cpu/armv8/start.S
WEAK(save_boot_params)
#if bloblist
(your code)
#endif
b save_boot_params_ret /* back to my caller */
ENDPROC(save_boot_params)
because pretty much all platforms which want to switch to it will just c&p your
code.
that being said qemu_saved_args can become just generic save_args and you can
also allocate space in .data section in this file.
> +#else
> + ldr r12, =qemu_saved_args
> + stm r12, {r0, r1, r2, r3}
And this part should go to arch/arm/cpu/armv7/start.S
M
next prev parent reply other threads:[~2023-12-20 11:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 21:11 [PATCH 0/5] Handoff bloblist from previous boot stage Raymond Mao
2023-12-19 21:11 ` [PATCH 1/5] bloblist: add API to check the register conventions Raymond Mao
2023-12-20 12:54 ` Ilias Apalodimas
2023-12-20 15:33 ` Raymond Mao
2023-12-19 21:11 ` [PATCH 2/5] qemu-arm: Get bloblist from boot arguments Raymond Mao
2023-12-20 11:03 ` Michal Simek [this message]
2023-12-20 15:36 ` Raymond Mao
2023-12-19 21:11 ` [PATCH 3/5] bloblist: Load the bloblist from the previous loader Raymond Mao
2023-12-20 10:57 ` Michal Simek
2023-12-20 14:53 ` Raymond Mao
2023-12-20 16:40 ` Michal Simek
2023-12-20 20:12 ` Raymond Mao
2023-12-19 21:11 ` [PATCH 4/5] fdt: update the document and Kconfig description Raymond Mao
2023-12-19 21:11 ` [PATCH 5/5] qemu-arm: get FDT from bloblist Raymond Mao
2023-12-20 10:55 ` Michal Simek
2023-12-20 13:08 ` Ilias Apalodimas
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=5fc01bbe-01ac-43fc-b7a9-03ff149b6014@amd.com \
--to=michal.simek@amd.com \
--cc=baruch@tkos.co.il \
--cc=bmeng.cn@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jwerner@chromium.org \
--cc=n-jain1@ti.com \
--cc=raymond.mao@linaro.org \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=tuomas.tynkkynen@iki.fi \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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